English
  • AfrikaansAfrikaans
  • عربيعربي
  • বাংলাবাংলা
  • CatalàCatalà
  • 简体中文简体中文
  • 中文(繁體)中文(繁體)
  • DanskDansk
  • NederlandsNederlands
  • EnglishEnglishcheck-icon
  • FilipinoFilipino
  • SuomalainenSuomalainen
  • FrançaisFrançais
  • DeutschDeutsch
  • ελληνικάελληνικά
  • हिंदीहिंदी
  • MagyarMagyar
  • IndonesiaIndonesia
  • ItalianaItaliana
  • 日本語日本語
  • 한국인한국인
  • LietuviųLietuvių
  • MelayuMelayu
  • PolskiPolski
  • PortuguêsPortuguês
  • РусскийРусский
  • CрпскиCрпски
  • SlovenskýSlovenský
  • EspañolEspañol
  • KiswahiliKiswahili
  • SvenskaSvenska
  • แบบไทยแบบไทย
  • TürkçeTürkçe
  • YкраїніYкраїні
  • اردواردو
  • Tiếng ViệtTiếng Việt

EIP-2612: How Gasless Approvals are Revolutionizing DeFi UX

Arya .ETH
Published On Dec 21, 2025 | Updated On Dec 21, 2025 | 12 min read
A glowing Ethereum logo surrounded by neon lights and futuristic machinery with the text "EIP-2612" illuminated at the base.
What makes EIP-2612 a game-changer for Ethereum? Gasless transactions that simplify DeFi interactions.

If you’ve ever used a decentralized exchange or lending protocol on Ethereum, you are intimately familiar with the two-step dance: first, you sign an approve transaction to grant the protocol permission to spend your tokens, paying a gas fee. Then, you sign a second transaction to actually perform the swap or deposit, paying another gas fee. This clunky, confusing, and expensive process has been a major user experience bottleneck since the dawn of DeFi. ERC-2612: Permit Extension for EIP-20 Signed Approvals is the elegant cryptographic solution that fixes this fundamental problem. It introduces a mechanism for "gasless approvals," allowing users to authorize a contract to spend their tokens with an off-chain signature instead of a full-blown transaction. This seemingly small change represents a monumental leap forward in making decentralized applications as seamless and intuitive as their centralized counterparts.

TL;DR

ERC-2612 is an extension to the ERC-20 standard that eliminates the need for a separate, on-chain approve transaction before interacting with a dApp.

  • Gasless Approvals: It allows users to grant token allowances by signing a message off-chain (which costs no gas). This signature is then bundled into the main function call (e.g., swap or deposit).

  • One Transaction, Not Two: The result is a unified user experience where the approval and the action are combined into a single on-chain transaction, saving the user time and the gas cost of one transaction.

  • Leverages EIP-712: It uses the EIP-712 standard for typed structured data hashing and signing. This makes signature requests human-readable and protects users from common phishing attacks.

  • Uniswap's Permit2 Generalizes the Concept: While ERC-2612 must be built into the token itself, Uniswap's Permit2 contract extends this gasless approval model to any ERC-20 token, creating a universal and more secure approval layer for the entire ecosystem.

  • Atomic and Secure: By combining approval and execution, permit makes the process atomic. If the main transaction fails, the approval is never granted, eliminating the risk of dangling, unused allowances.

The Old Way of Approval

To understand why ERC-2612 is so revolutionary, we must first dissect the problem it solves. The original ERC-20 token standard provides two primary methods for a third party (like a DEX contract) to move tokens on behalf of a user:

  1. approve(spender, amount): The user calls this function on the token contract. This function sets an "allowance," granting the spender (the DEX contract) permission to withdraw up to amount of the token from the user's wallet. This is a state-changing transaction and costs gas.
  2. transferFrom(sender, recipient, amount): After being approved, the DEX contract can call this function to pull the tokens from the sender (the user) and move them to a recipient (e.g., a liquidity pool).

This design, while functional, creates a disjointed user journey.

The Old Way of Approval in ERC-20
The Old Way of Approval in ERC-20

Typical Flow

Here’s a typical user flow for swapping on a DEX:

  1. User Intention: The user decides to swap 100 DAI for ETH.

  2. Transaction 1: The Approval: The DEX front-end prompts the user to sign a transaction calling approve on the DAI token contract, with the DEX router as the spender and the amount as 100 DAI. The user pays gas and waits for the transaction to be confirmed.

  3. Transaction 2: The Swap: Once the approval is confirmed, the front-end prompts the user to sign a second transaction, this time calling the swap function on the DEX router. The user pays gas again and waits for this second confirmation.

This flow is plagued with issues:

  • User Confusion: New users are often baffled. "Why am I being asked to sign two transactions? Did the first one fail?"

  • Added Costs: The user pays for two separate transactions. During times of high network congestion, the cost of a simple approve can be substantial.

  • Wasted Time: The user must wait for two separate blocks to be mined, doubling the interaction time.

  • Dangling Approvals: If a user approves a contract but never completes the second transaction (perhaps due to a front-end bug or simply changing their mind), the approval remains active on-chain, potentially posing a long-term security risk if the approved contract is ever compromised.

Origins and Status of ERC-2612

The solution to this long-standing problem came from the team at Uniswap, a project whose user experience was directly hampered by the approve-then-swap flow.

  • Proposal and Timeline: The EIP-2612 was formally proposed in April 2020. After community vetting and proving its value in production, it was moved to "Final" status, making it an official and stable extension to the ERC-20 standard.

  • The Authors: The standard was authored by Martin T. B. from the Uniswap team. This origin is significant, as it was born from a direct need to streamline the user experience of one of DeFi's most popular applications.

  • Widespread Adoption: As a finalized and highly effective standard, ERC-2612 (and permit-like functionality) has seen massive adoption across DeFi. Key implementers include:

    • Uniswap (UNI token): The native token of the protocol that inspired the standard.

    • Dai (DAI): One of the first major stablecoins to adopt the functionality.

    • Aave (aTokens): The yield-bearing tokens within the Aave ecosystem use permit.

    • 1inch: The 1INCH token and router contracts leverage permit for gas optimizations.

    • Many modern ERC-20 tokens are now deployed with permit functionality included by default, often via OpenZeppelin's standard library.

ERC-2612: The permit Revolution

ERC-2612 brilliantly refactors the approval process by moving it off-chain. Instead of sending a transaction to grant an allowance, the user simply signs a message containing the approval data. This signature is then relayed to the target contract, which can use it to claim the allowance on-chain within the same transaction that needs it.

The analogy is giving someone a signed, dated check with a specific payee and amount. They can take that check to the bank and cash it themselves to get the funds they need. The old method was equivalent to you having to physically go to the bank first, fill out a form to authorize that person, and then send them to the bank to complete their task.

This is all made possible by leveraging a cryptographic primitive (ecrecover) and a complementary standard for signing structured data (EIP-712).

ERC-2612: Permit Revolution
ERC-2612: Permit Revolution

A Technical Deep Dive

To be ERC-2612 compliant, an ERC-20 token contract must implement the permit function and some supporting mechanisms.

The permit Function Signature

function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r, 
bytes32 s
) external;

Let’s break down the parameters:

  • owner, spender, value: These are the core components of any approval: who is granting it, who is receiving it, and for how much.
  • deadline: This is a critical security feature. It’s a Unix timestamp after which the signature becomes invalid. This prevents a malicious actor from holding onto a signature and using it unexpectedly far in the future.
  • v, r, s: These three values are the components of the user's ECDSA signature.

Inside the function, the contract performs several checks:

  1. It verifies that block.timestamp is not past the deadline.
  2. It uses the signature components (v, r, s) along with the other parameters to cryptographically verify that the owner address was the one who signed the message. This is done using the ecrecover precompile.
  3. It checks and increments a nonce to prevent replay attacks.

If all checks pass, it calls the internal \_approve function, granting the spender the specified allowance.

Role of EIP-712: Readable, Secure Signatures

A core pillar of ERC-2612 is its reliance on EIP-712. In the early days of Ethereum, users were often asked to sign cryptic hexadecimal hashes. It was impossible for a user to know what they were actually authorizing.

EIP-712 solves this by creating a standard for hashing and signing typed, structured data. When a user is prompted to sign a permit message, a modern wallet like MetaMask will display the data in a clean, human-readable format.

This structured approach also includes a DOMAIN\_SEPARATOR, a unique hash generated for each contract. It incorporates details like the contract's name, version, chain ID, and address. This separator is mixed into the data that gets signed, ensuring that a signature created for Uniswap on Ethereum Mainnet cannot be maliciously replayed on another contract or even on Uniswap on a different chain like Polygon.

Replay Attack Prevention with Nonces

To prevent a valid signature from being submitted multiple times, ERC-2612 requires the token contract to track a nonce for each user. A nonce (number used once) is simply a counter.

  • The contract stores the current nonce for each address: mapping(address => uint256) public nonces;

  • The EIP-712 message signed by the user includes their current nonce.

  • When permit is called, the contract checks that the nonce in the signature matches the one stored on-chain.

  • After a successful permit call, the contract increments the user's nonce (nonces[owner]++).

This ensures that each signature can only be used exactly once.

Beyond ERC-2612: Uniswap's Permit2 for Universal Approvals

ERC-2612 is a fantastic standard, but it has one major limitation: it must be voluntarily implemented by the ERC-20 token contract itself. Many of the most widely used tokens, especially older ones like WETH, USDT, and USDC, were created before the standard was finalized and do not have the permit function. This leaves dApps needing to support two different approval flows.

To solve this, Uniswap developed Permit2, a separate, standalone smart contract that generalizes the permit concept and makes it available for any ERC-20 token.

Uniswap's Permit2 Functionality
Uniswap's Permit2 Functionality.

How Permit2 Works

Permit2 acts as a universal approval handler. The flow is as follows:

  1. One-Time Master Approval: A user makes a single, standard on-chain approve transaction to grant the Permit2 contract an essentially infinite allowance for their tokens. This is the only traditional approve transaction they need to make.

  2. Off-Chain Sub-Approvals: From this point on, to interact with any dApp that has integrated Permit2 (like the Uniswap Universal Router), the user simply signs an off-chain EIP-712 message. This message is not for the token, but for the Permit2 contract. It instructs Permit2 to grant a temporary and specific allowance to the dApp's contract from the user's master allowance.

  3. Atomic Execution: The dApp takes this signature and, in one transaction, calls a function on the Permit2 contract (like permitTransferFrom). Permit2 verifies the signature, temporarily grants the allowance to the dApp, and immediately executes the token transfer.

Key Advantages of Permit2:

  • Universal Compatibility: It brings the one-transaction, permit-style experience to virtually all ERC-20 tokens, regardless of whether they natively support ERC-2612.

  • Enhanced Security: Signatures for Permit2 are short-lived, typically expiring after a few minutes. This is a major security improvement over long-lived or infinite approvals given directly to dApps.

  • Better Approval Management: Users only need to manage one master approval (to the Permit2 contract) instead of dozens of approvals to different dApps. Revoking this single approval instantly cuts off access for all integrated applications.

Permit2 is the logical evolution of ERC-2612. It takes the core principle of gasless, signed approvals and deploys it as a shared, public good that retrofits modern UX onto the entire token ecosystem.

Security Considerations and Limitations

While powerful, these mechanisms are not without their considerations.

  • Adoption is Optional: For ERC-2612, dApps must still support the legacy approve flow as a fallback. For Permit2, both the user and the dApp must opt-in to its architecture.

  • Implementation Risk: The security of the token (for ERC-2612) or the entire approval system (for Permit2) rests on the correct implementation of the signature verification logic. This is why using audited, battle-tested contracts like Uniswap's Permit2 or OpenZeppelin's libraries is critical.

  • Centralization Point: Permit2, while a public good, is a single smart contract. Users must trust its security and immutability.

  • Phishing Remains a Threat: While EIP-712 makes signatures readable, a user can still be tricked into signing a malicious permit message. User vigilance is always the final line of defense.

Conclusion

ERC-2612 was a masterclass in elegant design, solving one of Ethereum's most persistent UX problems with clever cryptography. It laid the foundation for a smoother, more intuitive dApp experience. The development of Uniswap's Permit2 is the next chapter in this story, taking the powerful principles of ERC-2612 and deploying them at an ecosystem-wide scale. By abstracting approvals into a universal, secure, and efficient layer, Permit2 addresses the limitations of the original standard and pushes the DeFi user experience another giant leap forward. Together, these innovations are critical infrastructure, making the decentralized web more accessible and safer for everyone.

Resources and Further Readings

Frequently asked questions

Check out most commonly asked questions, addressed based on community needs. Can't find what you are looking for?
Contact us, our friendly support helps!

How do I integrate ERC-2612 permit in a dApp front end?

To support ERC-2612 smoothly, a dApp usually detects whether a token exposes permit, fetches the user’s current nonce from nonces(owner), builds the EIP-712 typed data (domain + Permit struct), and prompts the wallet to sign it. The signature is then passed into the target action (e.g., a router’s swap function that accepts permit params, or a custom permitAndAction method you add). The key UX win is that you only ask for one signature prompt and then broadcast one transaction, while still preserving a clean fallback to the legacy approve path for tokens that don’t support permit.

What’s the difference between ERC-2612 and Uniswap Permit2 for developers?

ERC-2612 is token-native: the token contract must implement permit, so your integration depends on each token’s feature set and quirks. Permit2 is contract-native: your app integrates a shared approval layer that can cover tokens without ERC-2612, which often improves consistency across assets. In practice, many apps use a hybrid strategy: prefer ERC-2612 when present for the simplest path, and fall back to Permit2 for “legacy” tokens. This approach gives you the broadest token coverage while keeping approvals more granular and time-bounded where Permit2 is used.

How can users safely manage and revoke permit-based allowances?

Even with permit and Permit2, the safety model still relies on users understanding what they’re signing and keeping allowances scoped. The best practice is to encourage exact-amount approvals and short deadlines rather than open-ended allowances, especially for high-value tokens. For Permit2 specifically, users should periodically review their master approval to the Permit2 contract and treat it like a power tool: incredibly useful, but worth checking occasionally. On the product side, you can help by defaulting to minimal allowances, displaying clear spend limits in UI, and offering quick links to allowance dashboards so users can prune permissions without playing “where did I approve this thing in 2022?”