# Account Abstraction on StarkNet by Martin Triay | Devcon Bogotá

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2023-10-09
- Duration: 07:27
- Topics: Science & Technology
- Watch: https://streameth.org/watch/yt-Osc_gwNW3Fw
- YouTube: https://www.youtube.com/watch?v=Osc_gwNW3Fw

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.
https://archive.devcon.org/archive/watch/6/account-abstraction-on-starknet/

An overview of how native account abstraction looks on StarkNet.

Speaker(s): Martin Triay
Track: Layer 2s
Keywords: accounts,abstraction,starknet

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

foreign [Music] hello everybody how's it going my name is Martin I work at open Zeppelin and today we're going to be talking about the construction and why um it's probably the future of crypto ux I'm probably a security tube let's begin so let's first Define what that kind of traction is and to better understand this it's better to speak about smart accounts you might be familiar with them already smart accounts are basically smart contracts that behaviors accounts they verify transactions they hold assets privileges roles like owner they can also call other contacts which is very important some known examples of this is a very popular knows it's safe a multisig Arjun wallet that has social degree and Instagram now a counter fraction is basically a smart account can also pay for its own transactions that's pretty much it uh what can we do with them well uh basically we can have custom validation schemes this means you can use ethereum signatures victim signatures whatever signature you want uh multi-signature or any other criteria or logic you want to implement for example this is only valid on Wednesdays you can Implement key rotation in case picture the scenario in which you lose your you compromise your keys instead of migrating all of your assets and roles and whatnot you simply rotate the keys and you're done you are safe we also have Origins social algori which is a very good feature and session case uh think of session Keys as basically um for example a Json web token or a set of pre of permissions you grant for example a website a web application so you sign once a set of permissions uh defined by some policy or something and then that website that can uh can um act on your behalf without you having to sign each transaction every time which basically gives us web 2 uh experience on web3 so how does it look today on starnet this is basically the interface of an account we are going to focus on the last four ones which are execute validate value declare and value deploy uh we can think of this in a two-step execution flow first the Valiant step the valid step uh you can Define arbitrary logic to determine whether a transaction is valid or not there's there's a few um limits in here for example you cannot read other contracts uh storage this is to prevent spam picture the scenario in which uh there's many transactions that depend on the storage of another contract that contract changes that storage and then invalids lots of transactions that could be a Spam so uh that's a prohibited um so this valid function is used by sequencers to know in advance whether a transaction is valid or not because uh instead of an eoa in which you can only you simply verify the signature you can only you cannot do that as simply in here because you need to execute some code and let's execute step does what you would expect finally since accounts are contracts you need to deploy them and you need to pay for deployments so how do you do this well basically we can do a counter factor deployments which is you calculate the address or of your contract before you send funds to that address that has no contract yet then there's this validated deploy function that the protocol uses to validate whether the funds on this address can be used to pay for this transaction or not and then basically you deploy your smart account well account of traction and uh finally uh in starnet you can use open sampling contracts for Cairo in which we have an account a regular account which is the stagnet signatures game we have an ethergent which is ethereum signatures and an account library that you can use to build your own custom um accounts and I hope that by now you you got the idea that it means a huge Improvement in onboarding user experience and security Martin that was fast sorry one last thing there's a pop-up for this uh talk yeah you can just ask me right now I mean since this was the last talk you have the chance to get some okay questions from the audience of course we still have time um so in the ethereum version of account abstraction you'll have a separate mempool and the boundaries and stuff so I guess in um stock net this role will be replaced by the sequencer itself good I didn't get the last part oh so like in the so in ethereum LED in order to execute account abstraction you get a separate mempool and a boundary system so what would be the equivalent for stocknet right so I mean you mean eap4337 that's right right uh and you're asking about the pay masters no we're talking about how like is there an alternative impul that actually relays like better transactions or how does it happen concretely on starknet uh the use of account abstraction uh so basically you send a transaction uh and the sequencer picks that transaction validates this valid function um if it's okay then it's inserted into the block I'm not sure I got the question right uh so account abstraction is actually built in right sorry oh that was it yes there's native account abstraction on the system there's no EOS so they're completely replaced by them how do you ensure that in the validation process the validation result will be the same in the actual execution um well what do you mean for example for example if one transaction depends on the Block timestamp uh okay sorry yeah yeah so uh that's part of the limitations so you cannot read any external uh information from the contract that includes like blocked timestamp other contract storage so you're gonna use anything that depends on anything else that the very same contract so doesn't mean that every wallet address on stocknet cannot use those functions no no the gun but not on the validate step they can on the execution step but the validation step has these constraints to prevent spam probably thanks for the great talk and one question could you just have a lot of execution code in the validate step and only at the end find out that it's not validate not not available [Music] all right thank you so much this was the end of day one thank you
