What is an account?

An account represents a user onchain, and enables that user to interact with the blockchain.

Through an account, you can send transactions and interact with other contracts. In order for you to own an onchain asset, such as an ERC-20 token or an NFT, that asset must be associated with your account address.

Ethereum account structure

Within Ethereum individual user accounts are known as Externally Owned Accounts (EOAs).

EOAs differ from smart contracts in that EOAs are not controlled by code, but rather by a pair of private and public keys.

The account’s address is derived from those keys and only by possessing the private key can you initiate transactions from an account. While Ethereum contracts are passive, that is, they can only change if they were called inside a transaction, EOAs can initiate transactions.

While simple, because the signature scheme is fixed, EOAs have some drawbacks, including the following:

  • Control over the private key gives complete control over the account, so you must keep your seed phrase secure yet accessible.

  • Limited flexibility surrounding wallet functionality

EIP-4337 is a design proposal for Ethereum that outlines account abstraction, whereby all accounts are managed via a dedicated smart contract on the Ethereum network, as a way to increase flexibility and usability. You can add custom logic on top of the basic EOA functionality, thereby bringing account abstraction into Ethereum.

What is Account Abstraction?

Account abstraction enables more flexible account management. Rather than the protocol determining an account’s behavior, an account contract, which is a smart contract with programmable logic, defines a user’s account.

Using account abstraction you can now program how your account functions.

For example, you can:

  • Determine what it means for a signature to be valid, or what contracts your account is allowed to interact with. This is known as signature abstraction.

  • Pay transaction fees in different tokens. This is known as fee abstraction.

  • Design your own replay protection mechanism and allow sending multiple uncoupled transactions in parallel.

    In Ethereum, you cannot send two transactions in parallel, you must wait for confirmation of the first before sending the second. Otherwise, the second transaction can be rejected due to an invalid nonce. With account abstraction, a sequential nonce is not required. This is known as nonce abstraction.

Today, Starknet offers signature abstraction. In the future, we will enrich the current account abstraction design. For example, see the paymaster proposal for fee abstraction in the Starknet Community Forum.

Examples of customizing account functionality

Two examples of how you might program an account to function using account abstraction are:

Social recovery

A process where if you lose your wallet, you are able to retrieve it via a selected social network, vastly improving the typical experience of wallet recovery.

Operating your account via facial recognition

With signature abstraction, you can use your phone’s native hardware to sign transactions, making it practically impossible to take control of another user’s account, even if your phone is stolen.