EVM -> Solana

EIP-2612 on Solana: Approve and Act in One Transaction

EIP-2612 adds 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 single permit 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 permit and 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:

NeedEIP-2612Solana
One step for approve and actpermit plus the action in one callTwo instructions in one transaction
Holder pays no feeA relayer submits the signed permitThe relayer signs as fee payer
Replay protectionA per-owner nonce and a deadline in the signed messageThe transaction's recent blockhash, which also sets its expiry
Signature formatEIP-712 typed data bound to the token's domainThe holder's signature on the transaction itself
Token changesThe token must implement the extensionNone. Every token works the same way.

Approve and act in one transaction

Add an ApproveChecked 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.

TypeScript
const instructions = [
  // Lets the vault's PDA pull up to 1 token from the user's token account.
  getApproveCheckedInstruction({
    source: userTokenAccount,
    mint,
    delegate: vaultAuthority,
    owner: user,
    amount: 1_000_000n,
    decimals: 6,
  }),
  // Your program's instruction, which spends the allowance in the same transaction.
  depositInstruction,
];
Often you can skip the approval
The 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.

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.

01
Build
Set the sponsor as fee payer and add the holder's instructions.
02
Holder signs
The signature authorizes the approval and the action.
03
Sponsor signs
The signature authorizes paying the fee.
04
Send
The network charges the sponsor.
A sponsored approve-and-act transaction.
TypeScript
const message = pipe(
  createTransactionMessage({ version: 0 }),
  // The sponsor pays the fee. The user only authorizes the instructions.
  (m) => setTransactionMessageFeePayerSigner(sponsor, m),
  (m) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m),
  (m) => appendTransactionMessageInstructions(instructions, m),
);

// Signs with every signer attached to the message: the user and the sponsor.
const transaction = await signTransactionMessageWithSigners(message);

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 may be deprecated in a future release.

Next steps

© 2026 Solana Vakfı. Tüm hakları saklıdır.
EIP-2612 on Solana: Approve and Act in One Transaction | Solana