permit to ERC20 so that a holder can approve a spender with an
offchain signature. It removes the separate approval transaction and lets
someone else pay the gas. Solana transactions provide both properties without a
token extension.
What permit solves on Ethereum
A standard ERC20 flow needs two transactions: the holder approves a contract, then calls the contract that spends the tokens. The holder pays gas for both. With EIP-2612, the holder signs an EIP-712 message, and a singlepermit call
sets the allowance from that signature.
ERC20 without permit
- Transaction 1:
approve(spender, amount). - Transaction 2: the action that calls
transferFrom. - The holder needs ETH for both.
ERC20 with EIP-2612
- The holder signs a typed message offchain.
- One transaction calls
permitand then the action. - A relayer can submit it and pay the gas.
How Solana covers the same needs
Three protocol features replace the permit extension, and the Token Program needs no change:Several instructions per transaction
Put the approval and the action in one transaction. Both succeed or both fail.
A separate fee payer
A relayer or your backend pays the fee while the holder signs only to authorize.
Delegates
When a spender must act later, approve it as a delegate with a fixed amount.
| Need | EIP-2612 | Solana |
|---|---|---|
| One step for approve and act | permit plus the action in one call | Two instructions in one transaction |
| Holder pays no fee | A relayer submits the signed permit | The relayer signs as fee payer |
| Replay protection | A per-owner nonce and a deadline in the signed message | The transaction’s recent blockhash, which also sets its expiry |
| Signature format | EIP-712 typed data bound to the token’s domain | The holder’s signature on the transaction itself |
| Token changes | The token must implement the extension | None. Every token works the same way. |
Approve and act in one transaction
Add anApproveChecked
instruction and your program’s instruction to the same transaction. Approve
exactly the amount the next instruction spends, so no allowance is left over. If
it may spend less, add a Revoke instruction at the end. A token account has
one delegate, so the approval replaces any existing one.
Often you can skip the approvalThe holder’s signature applies to every instruction that lists the holder as a
signer, and it extends to the CPIs that instruction makes. Your program can
therefore transfer the holder’s tokens directly, with no delegate. Use an
approval when you want to cap what the program can move.
Let a sponsor pay the fee
To give the holder a gasless flow, set a sponsor as the fee payer. The holder and the sponsor sign the same transaction, and the holder needs no SOL for the fee. The sponsor can also fund the rent deposit for any account the transaction creates.1
Build
Set the sponsor as fee payer and add the holder’s instructions.
2
Holder signs
The signature authorizes the approval and the action.
3
Sponsor signs
The signature authorizes paying the fee.
4
Send
The network charges the sponsor.
When you still need an offchain signature
Some designs collect a signature now and act on it later, for example an order book or an intent system. Two tools cover this:- Signed messages: the holder signs an offchain message with their wallet, and your program verifies it by checking an Ed25519 signature verification instruction in the same transaction. Include a nonce or an order ID in the message, and have your program record it as used so that each signed message works once. Add an expiry to limit how long an unused signature stays valid.
- Durable nonces: a transaction that uses a durable nonce in place of a recent blockhash does not expire, so a relayer can submit it later. It needs a nonce account, and it stays valid until the nonce authority advances the nonce. Durable nonces are planned to be replaced, around early 2027, so check the linked page before you build on them.