Talking: Account abstraction on ZK-rollup and Ethereum

Talking: Account abstraction on ZK-rollup and Ethereum

Untitled - 3

While today our crypto wallets can be used to access and manage our cryptocurrencies, NFTs, and stake them, I think there is a lot more that can be done from an account perspective. StarkNet and zkSync followed Vitalik's vision with a long-standing feature: account abstraction.

Crypto wallet on blockchain transfer money with tokens

What is abstraction?

The process of abstraction is the practice of hiding information. This increases the ability to use computer systems at higher levels with little knowledge of the underlying processes.

In Programmer PoV, we assume that it hides all data of an object, but only keeps its relevant data, which reduces complexity and improves efficiency.

Developer : Abstraction theme

Definition of account abstraction

Ethereum Account Abstraction Blockchain

On the Ethereum network, there are currently two types of accounts.

  • EOA: External accounts are wallets that exist outside of the EVM (Ethereum Virtual Machine) for sending and receiving cryptocurrencies: cold wallets, such as Ledger, MetaMask, Phantom, etc.

Metamask crypto wallet

  • Contract accounts are "smart contracts" that exist in the EVM. For example, pools on Uniswap are basically smart contracts.

The goal of the Ethereum account abstraction is to reduce two account types to one, the contract account. A single account type will have the functionality to handle tokens and contracts. Developers and users will no longer need to differentiate between account types, as transactions will be moved entirely into the EVM, and out of the blockchain protocol.

External Account Precision

EOA has three attributes:

  • Represents the available ETH balance of the account.
  • Make sure each transaction is a unique nonce.
  • An address that uniquely identifies an account on the network.

It is worth mentioning that on Ethereum, every transaction must be initiated from EOA. This means that when a transaction is executed by the Ethereum Virtual Machine (EVM), the first account touched must be EOA, and the corresponding account must pay the miner to execute the entire transaction.

Every account on Ethereum is associated with a cryptographic object called Keypair:

  • Private key: used to sign digital messages
  • Public Key: Allows anyone to verify that a given signature is indeed signed by its corresponding private key

Account abstraction on StarkNet and zkSync

As of today, StarkNet and zkSync 2.0 are state-of-the-art in terms of account abstraction, and they both manage to achieve account abstraction in specific ways.

The account abstraction has two main goals:

  • Signature abstraction: Allow different account contracts to use different signature verification schemes.
  • Payment abstraction: Allows for different transaction payment models. For example, payment by another party/contract or using a token other than ETH for payment.

The StarkNet Account model is still represented by a contract, which is the so-called "account contract". In simple terms: any Cairo smart contract deployed on StarkNet can be an Account, the only requirement is that they must conform to a specific interface with methods for verifying and executing transactions.

Cairo Starknet developer code

On the zkSync side, an account also needs to implement two functions: validateTransaction and isValidSignature

ZkSync Solidity developer code

With this abstraction, we can directly see:

  • Use multiple key pairs to verify transactions (simple multi-signature integration)
  • Change our account Keypair
  • Use a different signature scheme than ECDSA

what can it bring

This is probably the most important part of this story: let's discuss the use case of account abstraction in more depth. We can divide these use cases into two distinct areas:

  • user simplification
  • technology use case

User Simplification: Session Keys

Suppose we are playing an on-chain game: currently we need to sign every transaction ourselves. That is to say, every time an action is taken (such as when collecting rewards, moving characters, sending messages), a transaction needs to be signed.

NFT game blockchain

Session keys are the idea of ​​authorizing a player to play a game for a specific amount of time. We generated a session key, saved it in the browser's local storage, and authorized it to sign transactions for only 10 minutes. After 10 minutes, the key will be revoked and we will need to create a new key and authorize again.

With this extension, we can also imagine creating batch transactions: the same abstraction as selecting a product in a supermarket and paying only once at the end.

User Simplification: Transaction Automation and Split Permissions

Using abstract accounts, it is possible to implement the functionality to change the primary signing key for a given wallet, and even manage multiple signing keys. We can keep our admin keys in cold wallets, while other keys are kept on less secure devices, and these will only be authorized to perform certain actions.

A cool example:

The most secure keys that I don't use much are the only ones capable of transferring or sending over $1k to another account, however, I can also use those unsecured keys on my computer to perform operations such as in Claim rewards on certain dapps, or perform any transactions in on-chain games.

Now let's assume that these keys are kept in a server that executes automated transactions / runs our own bot: we can ensure that these keys can only be used to perform actions we set ourselves and increase security.

A final utility could be a protocol that identifies DCA as a round-robin transaction on our behalf.

Tech Use Case: Paying for Others

This is one of the most interesting things we can do with the account abstraction. Imagine how exciting it would be to have one account pay for another account.

Summarize

We have seen how account abstraction can be a game changer for the future of blockchain. I personally believe that account abstraction will usher in a new era of use cases, especially in the video game industry chain.

Source:https://medium.com/@0xexomonk/blockchains-demystifying-account-abstraction-on-zk-rollups-ethereum-smart-contracts-c7ae864bc542

about

ChinaDeFi - ChinaDeFi.com is a research-driven DeFi innovation organization, and we are also a blockchain development team. Every day, from nearly 900 pieces of content from more than 500 high-quality information sources around the world, we look for content that is more in-depth and systematic, and synchronizes to the Chinese market at the fastest speed to provide decision-making auxiliary materials.

Layer 2 Daoist Friends - Welcome blockchain technology enthusiasts and research analysts who are interested in Layer 2 to contact Gavin (WeChat: chinadefi) to discuss the landing opportunities brought by Layer 2. Please pay attention to our WeChat public account "Decentralized Financial Community" .

img

Guess you like

Origin blog.csdn.net/chinadefi/article/details/126098788