> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# ERC4337 on Solana: Account Abstraction in the Protocol

> Map ERC4337 bundlers, paymasters, and smart accounts to Solana fee payers, multi-instruction transactions, and PDA-based wallets.

ERC4337 adds bundlers, an EntryPoint contract, and paymasters so that smart
accounts can pay fees flexibly and batch calls. Solana transactions already
support a separate fee payer, several signers, and several instructions. This
guide maps each ERC4337 component to what you use on Solana.

## What ERC4337 adds to Ethereum

On Ethereum, only an externally owned account (EOA) can start a transaction and
pay its gas. A contract wallet with multisig, recovery, or spending rules still
needs an EOA to trigger it. ERC4337 works around this without changing the
protocol by adding a parallel transaction pipeline:

<Steps>
<Step title="User signs a UserOperation">

The smart account's owner signs a UserOperation, a transaction-like request.

</Step>
<Step title="Bundler collects it">

Bundlers watch a separate mempool and pack UserOperations into one transaction.

</Step>
<Step title="EntryPoint validates">

A singleton contract calls each smart account to check the signature and rules.

</Step>
<Step title="Paymaster pays">

An optional paymaster contract covers the gas, then the call executes.

</Step>
</Steps>

## ERC4337 components on Solana

Solana needs no parallel pipeline. Each ERC4337 component maps to a transaction
field or a program you write.

| ERC4337 | Solana | How it maps |
| --- | --- | --- |
| UserOperation | A transaction | A regular transaction already carries several instructions and signers. |
| Bundler and alt mempool | Not needed | An RPC node forwards the transaction to the current and upcoming leaders. |
| EntryPoint contract | The runtime | The runtime verifies every signature and passes signer privileges to the programs the transaction calls. |
| Paymaster | Fee payer | Any account owned by the System Program can sign as fee payer. It does not have to be the user. |
| Smart account | A wallet program with PDAs | A program holds assets in addresses it derives and signs for them when its rules pass. |
| Batched calls | Several instructions | One transaction runs its instructions in order and atomically. |
| Session keys | A scoped key in wallet state | The wallet program stores a temporary key with limits and checks them on each instruction. |
| Passkey signers | Signature verification programs | A wallet program can accept secp256r1 signatures by checking the signature verification instruction in the same transaction. |

## Sponsor fees without a paymaster

Every Solana transaction names a fee payer, and it is always the first signer.
To [sponsor a transaction](/developers/docs/core/fees/fee-sponsorship), your
service sets its own account as the fee payer. The user needs no SOL for the
fee, and the sponsor can also fund the rent deposit for any account the
transaction creates.

<Steps>
<Step title="App builds the transaction">

It sets the sponsor as fee payer and adds the user's instructions.

</Step>
<Step title="User signs">

The user's signature authorizes moving their assets.

</Step>
<Step title="Sponsor signs">

The sponsor's signature authorizes paying the fee.

</Step>
<Step title="Send">

The network charges the fee to the sponsor's account.

</Step>
</Steps>

<Warning>

**Validate before you sign as fee payer**

A sponsor that signs anything a client sends can be drained. Check what the
transaction does, limit the programs and amounts it may touch, and rate-limit
each user. [Kora](/developers/docs/tools/kora) is a fee-payer service that
applies these checks.

</Warning>

## Build a smart wallet with PDAs

The Solana counterpart of an ERC4337 smart account is a program that controls
[Program Derived Addresses (PDAs)](/developers/docs/core/pda). A PDA has no
private key. Only the program that derived it can sign for it, through a
cross-program invocation with `invoke_signed`.

```mermaid
flowchart TD
    P["Wallet program<br/>Checks the rules, then signs for its PDAs"]
    P -->|owns| P0["Wallet state<br/>Owners, thresholds, limits"]
    P -->|owns| P1["Vault PDA<br/>Holds SOL and token accounts"]
    P -->|owns| P2["Session account<br/>A temporary key and its scope"]
```

<div className="sol-mermaid" data-fallback="mermaid" data-mermaid="b7ba00ced059">
  <img className="block dark:hidden" src="/docs-assets/assets/docs/mermaid/b7ba00ced059-light.svg" alt="One wallet program serves every user. Each wallet is a set of accounts." />

  <img className="hidden dark:block" src="/docs-assets/assets/docs/mermaid/b7ba00ced059.svg" alt="One wallet program serves every user. Each wallet is a set of accounts." />

  <img className="block dark:hidden" src="/docs-assets/assets/docs/mermaid/b7ba00ced059-sm-light.svg" alt="One wallet program serves every user. Each wallet is a set of accounts." />

  <img className="hidden dark:block" src="/docs-assets/assets/docs/mermaid/b7ba00ced059-sm.svg" alt="One wallet program serves every user. Each wallet is a set of accounts." />
</div>

<p className="sol-caption">One wallet program serves every user. Each wallet is a set of accounts.</p>

The rules that ERC4337 accounts implement in `validateUserOp` live in the wallet
program's instructions:

- **Multisig:** require a threshold of the stored owners to sign before the
  program signs for the vault.
- **Spending limits:** track amounts per period in wallet state and reject
  instructions that exceed them.
- **Recovery:** let guardians replace the owner keys after a delay.
- **Session keys:** accept a temporary key for a limited set of instructions
  until it expires.

<Note>

**A program cannot start a transaction**

An external signer always submits and pays for the transaction: the user, a
relayer, or a backend service. The wallet program acts when that transaction
calls it.

</Note>

## Side by side

| Category | Ethereum with ERC4337 | Solana |
| --- | --- | --- |
| Where it lives | A standard on top of the protocol: bundlers, EntryPoint, paymasters | Transaction format and runtime |
| Who pays fees | The account, or a paymaster contract | Any System Program account that signs as fee payer |
| Batching | The smart account executes a batch | Several instructions in one transaction |
| Custom validation | `validateUserOp` in each smart account | Checks in a wallet program before it signs for a PDA |
| Code and state | Together in the smart account contract | A shared program plus per-wallet accounts |
| Starting a transaction | A bundler submits for the account | An external signer submits |

## Next steps

<Columns cols={3}>
<Card title="Accounts in the Complete Guide" href="/developers/docs/migrate-to-solana/ethereum/complete-guide#accounts">

Review account ownership, PDAs, and account abstraction.

</Card>
<Card title="Fee sponsorship" href="/developers/docs/core/fees/fee-sponsorship" arrow>

See a tested example of a sponsored transfer.

</Card>
<Card title="EIP-2612 on Solana" href="/developers/docs/migrate-to-solana/ethereum/standards/eip2612">

Replace permit signatures with one transaction.

</Card>
</Columns>
