Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

EIP-2612

EIP-2612 is an Ethereum Improvement Proposal that defines a standard 'permit' function for ERC-20 tokens, allowing approvals to be granted via secure off-chain signatures instead of on-chain transactions.
Chainscore © 2026
definition
ERC-20 PERMIT EXTENSION

What is EIP-2612?

EIP-2612 is an Ethereum Improvement Proposal that introduces a `permit` function for ERC-20 tokens, allowing gasless token approvals through off-chain signatures.

EIP-2612, also known as the permit extension for ERC-20 tokens, is a standard that enables token holders to approve a spender to move their tokens without having to execute an on-chain approve transaction. Instead, users sign a structured message (an EIP-712 typed signature) off-chain, which the spender can then submit to the blockchain. This eliminates the need for users to hold ETH to pay for gas for the initial approval, significantly improving the user experience for decentralized applications (dApps) and enabling gasless meta-transactions for token interactions.

The core mechanism involves a new function, permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s). The owner signs a message containing the spender address, the value (allowance amount), and a deadline for the permit's validity. This signature is passed as the v, r, s parameters. The contract verifies the signature against the owner's address and, if valid and before the deadline, updates the standard ERC-20 allowance mapping. This process is nonce-protected to prevent replay attacks, with each owner having a unique nonce that increments with each successful permit.

The primary use case for EIP-2612 is streamlining interactions in decentralized exchanges (DEXs) and lending protocols. For example, a user can sign a permit to approve a DEX router to spend their USDC, and the DEX can bundle this signed permit with the actual swap transaction in a single bundle, paid for by a relayer or the protocol itself. This removes the cumbersome two-transaction (approve then swap) pattern, reducing friction and cost. Major tokens like Uniswap (UNI), Chainlink (LINK), and many stablecoins have adopted this standard.

From a security perspective, EIP-2612 introduces important considerations. The inclusion of a deadline prevents stale signatures from being executed unexpectedly. The domain separator, part of the EIP-712 signing scheme, ensures signatures are only valid for a specific contract and network, preventing cross-chain and cross-contract replay attacks. Developers integrating permit must carefully handle signature malleability and ensure the signer is the token owner, as the contract logic does not call msg.sender for the approval but instead uses the recovered address from the signature.

The adoption of EIP-2612 represents a significant step in abstracting away blockchain complexity for end-users. By separating the signer of a transaction from the payer of the gas fees, it enables sponsored transactions and more fluid DeFi composability. It is a foundational primitive for account abstraction and smart contract wallets, allowing contracts to execute logic on behalf of users who have only signed a message, paving the way for more sophisticated and user-friendly blockchain applications.

how-it-works
PERMIT2 & GASLESS APPROVALS

How EIP-2612 Works

EIP-2612 is an Ethereum Improvement Proposal that introduces a new token standard extension, enabling gasless token approvals through off-chain signatures.

EIP-2612 defines a permit function extension for ERC-20 tokens that allows a token holder to approve a spender using a cryptographically signed message (a permit) instead of an on-chain transaction. This signature, which includes the spender's address, an allowance amount, and a deadline, can be submitted to the blockchain by any party, typically a relayer. The core innovation is the elimination of the initial approve transaction, enabling gasless onboarding where users can interact with a dApp without first holding the native token to pay for gas.

The mechanism relies on EIP-712, a standard for typed structured data signing, to create human-readable signatures. A user signs an EIP-712 structured message containing the permit details. This signed permit is then passed to the dApp's frontend. A relayer (often the dApp itself) takes this signature, pays the gas, and calls the token contract's permit function, which uses ecrecover to validate the signature and subsequently updates the user's allowance mapping. This process effectively decouples authorization from execution, separating the signer and the gas payer.

For a token to be EIP-2612 compliant, its contract must implement the permit function and store a nonce for each account to prevent signature replay attacks. The standard also requires the contract to implement the DOMAIN_SEPARATOR as defined by EIP-712, which uniquely identifies the contract and chain to ensure signatures are valid only for a specific contract on a specific network. This domain separation is critical for security, preventing a signature meant for a testnet contract from being replayed on mainnet.

The primary use case is streamlining user experience in DeFi and DEX interactions. For example, a user can sign a permit to provide liquidity on Uniswap v3 without first executing and paying for an approve transaction for each token. Major tokens like USDC and DAI have adopted this standard. It is a foundational primitive for meta-transaction systems and account abstraction, as it allows a third-party paymaster or bundler to sponsor transaction fees on behalf of the user.

While powerful, EIP-2612 introduces considerations. Users must trust the dApp interface to present the correct signing message, as a malicious site could trick them into signing a permit for a different spender or amount. Furthermore, the deadline parameter is crucial; once a signed permit expires, it becomes invalid, requiring a new signature. Developers integrating support must carefully handle signature verification and nonce management to avoid security vulnerabilities related to replay or signature malleability.

key-features
EIP-2612

Key Features & Benefits

EIP-2612 introduces permit signatures for ERC-20 tokens, enabling gasless token approvals and a superior user experience for DeFi.

01

Gasless Token Approvals

Users can sign a permit message off-chain, allowing a dApp or smart contract to execute an ERC-20 approval on their behalf without requiring the user to pay a gas fee for the approval transaction. This eliminates a major UX friction point in DeFi interactions.

  • User Flow: Sign a message → Submit signature to contract → Contract calls permit.
  • Key Benefit: Enables "single-transaction" deposits into protocols like Uniswap or Aave.
02

Signature-Based Authorization

Instead of sending a transaction to call the approve function, users authorize a spender and a spending allowance by signing a structured EIP-712 message. This signature contains:

  • Owner: The token holder's address.
  • Spender: The contract to grant allowance to.
  • Value: The allowance amount.
  • Deadline: An expiry timestamp for the signature.
  • Nonce: A unique number to prevent replay attacks.
03

Improved Security & UX

EIP-2612 enhances security over traditional approve by introducing explicit deadlines and per-user nonces. This prevents several classes of attacks and user errors.

  • Deadlines: Signatures expire, reducing risk from stale approvals.
  • Nonces: Prevent signature replay across different chains or contracts.
  • Explicit Allowance: The signed message clearly states the exact value and spender, improving transparency for wallet signer UIs.
04

Compatibility with Existing ERC-20

The standard is designed as a backward-compatible extension to ERC-20. Tokens implementing EIP-2612 must still support the standard approve and transferFrom functions. The new permit function is an additional method that smart contracts can call if the token supports it, enabling a graceful fallback for wallets or contracts that don't use permits.

05

Essential for DeFi & Meta-Transactions

This standard is a foundational primitive for gas abstraction and meta-transaction systems. It allows relayers or dApps to pay gas fees on behalf of users, enabling seamless onboarding. Major protocols like Uniswap, Aave, and Compound have integrated support for permit signatures to streamline user interactions with their liquidity pools and lending markets.

code-example
EIP-2612 IMPLEMENTATION

Code Example & Interface

This section details the practical implementation of EIP-2612, focusing on the required smart contract interfaces and a typical workflow for developers integrating gasless token transfers.

The core of EIP-2612 is the permit function, which must be added to an ERC-20 token contract. Its signature is function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external. This function verifies the provided EIP-712 signature, checks the deadline, and then approves the spender to transfer up to value tokens from the owner. A corresponding DOMAIN_SEPARATOR and PERMIT_TYPEHASH are also required for structured data hashing, ensuring the signature is bound specifically to this contract and chain.

For a user to execute a gasless transfer, their wallet (like MetaMask) first signs an EIP-712 structured message off-chain. This message contains the permit parameters: token address, owner, spender, value, a nonce (to prevent replay attacks), and the deadline. The signed message, represented by the v, r, s signature components, is then passed to a relayer (e.g., a dApp's backend server). The relayer submits the signed permit transaction, paying the gas fee to authorize the spender on-chain.

Following a successful permit call, the standard transferFrom workflow is used. The now-authorized spender (often a smart contract) can call transferFrom(owner, recipient, value) to execute the actual token transfer. This two-step process—off-chain signing followed by on-chain approval—decouples the permission from the gas payment. Developers must ensure their contracts handle the token's nonce correctly and respect the deadline to avoid transaction reverts due to expired or replayed signatures.

ecosystem-usage
EIP-2612

Ecosystem Adoption & Use Cases

EIP-2612, or ERC-2612, is a token standard that enables gasless token approvals via off-chain signatures, a critical infrastructure for improving user experience in DeFi and dApps.

01

Core Mechanism: Permit Function

The standard introduces a permit function that allows a token holder to approve a spender by signing an EIP-712 structured message off-chain. This signed permit can then be submitted by any party, allowing the spender to use the tokens while the signer pays no gas for the approval transaction.

  • Key Components: The signed message includes the owner, spender, value, deadline, and a nonce to prevent replay attacks.
  • User Benefit: Eliminates the need for a separate, costly approve transaction before interacting with a protocol.
02

Primary Use Case: DeFi & DEX UX

EIP-2612 is foundational for seamless DeFi interactions. It allows users to deposit tokens into a lending protocol or make a trade on a DEX in a single transaction.

  • Example: A user can sign a permit for Uniswap and execute a swap in one step, instead of first approving USDC and then swapping.
  • Adoption: Major protocols like Aave, Compound, and Uniswap V3 support permit for ERC-20 tokens that implement the standard, drastically reducing friction for new users.
03

Technical Prerequisite: EIP-712 Signatures

The permit function relies on EIP-712: Typed Structured Data Hashing and Signing. This provides a secure, human-readable format for off-chain messages.

  • Structured Data: The approval parameters are hashed according to a predefined schema, making the signature request clear in user wallets like MetaMask.
  • Security: EIP-712 prevents phishing by displaying the exact details (spender, amount) the user is signing, unlike a raw transaction.
04

Token Implementation & Domains

To be EIP-2612 compliant, an ERC-20 token must implement the permit function and manage a nonces mapping. A critical setup step is defining the EIP-712 domain separator.

  • Domain Separator: Uniquely identifies the contract and chain to prevent cross-chain and cross-contract replay attacks. It includes the contract's name, version, chainId, and verifyingContract address.
  • Requirement: The token must override the standard ERC-20 name() function to provide a string for the domain.
05

Related Standard: ERC-4494 for NFTs

EIP-2612 inspired ERC-4494, which brings gasless approvals to the NFT ecosystem with permit for ERC-721 tokens. It is designed for NFT marketplaces and rental protocols.

  • Key Difference: Uses deadline and nonce like EIP-2612 but approves based on a specific tokenId.
  • Use Case: Allows a user to sign a permit allowing a marketplace to list their CryptoPunk for sale without an on-chain approval transaction first.
06

Adoption Driver: Account Abstraction (ERC-4337)

EIP-2612 is a key enabling primitive for Account Abstraction (ERC-4337) and smart contract wallets. It allows UserOperations (UserOps) to bundle token approval and action into a single, sponsored transaction.

  • Workflow: A paymaster can submit a UserOp containing a permit signature to approve its own spending, then execute the protocol interaction, with the paymaster covering all gas costs.
  • Impact: This combination is essential for creating truly gasless, batchable transactions that abstract away wallet complexity.
security-considerations
EIP-2612

Security Considerations

EIP-2612 introduces a secure, gasless signature scheme for token approvals, but its implementation requires careful attention to nonce management, replay protection, and signature validation.

01

Nonce Replay Protection

EIP-2612 uses a per-owner, incrementing nonce to prevent signature replay attacks. Each permit signature is valid for a single, specific nonce value. Key considerations:

  • Nonce management must be atomic; the nonce must be incremented in the same transaction that consumes the signature.
  • Front-running is mitigated as a signature for nonce n is invalidated once nonce n is used.
  • Applications must track the signer's current nonce off-chain to generate valid signatures.
02

Signature Malleability & Validation

The standard uses EIP-712 typed structured data hashing to prevent ambiguity. Implementations must:

  • Reject high-s values in signatures (s > secp256k1n/2) to prevent malleability.
  • Use ecrecover to verify the signature against the EIP-712 PERMIT_TYPEHASH.
  • Validate that the recovered signer is the token owner and that the deadline has not expired.
  • Ensure the spender address in the signature matches the transaction caller.
03

Deadline Enforcement

Every permit includes a deadline UNIX timestamp. This is a critical security parameter:

  • It limits the window for a signature to be used, reducing the risk of a stolen signature being exploited later.
  • Contracts must check require(deadline >= block.timestamp).
  • Users and integrators must ensure their off-chain signing services use reasonable, short-lived deadlines to minimize exposure.
04

Domain Separator & Chain Safety

The EIP-712 domain separator binds the signature to a specific contract and blockchain, preventing cross-chain and cross-contract replay. The separator includes:

  • The token contract's name and version.
  • The chainId (e.g., 1 for Ethereum Mainnet).
  • The contract's own verifyingContract address.
  • Developers must ensure the chainId is correct, especially on testnets or forks, to prevent signatures from being replayed on different networks.
05

Integration Risks for dApps

dApps integrating EIP-2612 must handle several front-end and smart contract risks:

  • Gasless Relayers: If using a meta-transaction relayer, ensure it correctly passes the signed permit data and does not expose the signature.
  • UI/UX: Clearly communicate the allowance amount and deadline to users before signing.
  • Allowance Scope: A permit only grants approval; a separate transaction is needed to transfer tokens. Ensure the flow is atomic or clearly communicated to prevent user error.
PERMIT STANDARD COMPARISON

EIP-2612 vs. Traditional ERC-20 Approvals

A technical comparison of token approval mechanisms, highlighting the key differences in user experience, security, and transaction flow.

Feature / MechanismTraditional ERC-20 ApprovalsEIP-2612 (Permit)

Approval Transaction

User Requires Native Token (ETH) for Approval

Gas Fee for Approval Step

Mechanism

On-chain approve() transaction

Off-chain signature (EIP-712)

User Experience (UX)

Two transactions

One transaction (meta-transaction)

Front-running Risk on Approval

Standardized Signature Format

Deadline Enforcement

Typical Use Case

Direct DApp interactions

Gasless onboarding, batch operations

EIP-2612

Common Misconceptions

EIP-2612 introduced a standard for gasless token approvals, but its implementation and implications are often misunderstood. This section clarifies the most frequent points of confusion.

EIP-2612 is an Ethereum Improvement Proposal that defines a standard for gasless token approvals using off-chain signatures. It works by allowing a token holder (the owner) to sign a structured message (EIP-712 permit) containing approval details, which a third party (the spender) can then submit to the blockchain, paying the gas fee themselves. This separates the act of granting permission from the transaction that executes it, enabling meta-transactions for approvals.

Key Components:

  • permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s): The function that consumes the signature.
  • The signed data includes a nonce to prevent replay attacks and a deadline for expiry.
  • It requires the token contract to implement the ERC-20 DOMAIN_SEPARATOR and nonces mapping.
EIP-2612

Frequently Asked Questions (FAQ)

EIP-2612, also known as the Permit extension for ERC-20 tokens, is a standard for gasless token approvals. These questions address its core mechanics, use cases, and security considerations.

EIP-2612 is an Ethereum Improvement Proposal that defines a permit function for ERC-20 tokens, enabling users to approve token spending without an on-chain transaction. It works by allowing a user to sign an EIP-712 structured message (a "permit") off-chain, which includes the spender address, allowance amount, and a deadline. A relayer (often a dApp) can then submit this signed message to the token contract, paying the gas fee themselves. The contract verifies the user's signature against the stored DOMAIN_SEPARATOR and the message details, and if valid, grants the allowance directly, enabling a gasless user experience for the token holder.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
EIP-2612: Ethereum Permit Function for Gasless Token Approvals | ChainScore Glossary