Skip to content
Basis Desk
Security & Hacks · 7 min read Last reviewed October 1, 2026

Token Approvals: The Permission You Forgot You Gave

Smart contracts require explicit permission to move digital assets on a user's behalf. Understanding how allowances work, the risks of unlimited approvals, and the mechanics of revoking access is foundational to cryptocurrency security.

Editorial oversight: Julian Mercer, Chief Editor
Neutral

Key points

  • Token approvals are on-chain permissions required by the ERC-20 standard, allowing smart contracts to move specific tokens on a user's behalf.
  • Unlimited approvals save users network fees but create severe security risks if the authorized smart contract is later compromised.
  • Disconnecting a wallet from a DApp does not revoke approvals; users must submit an on-chain transaction to set the allowance to zero.
  • EIP-2612 (Permit) improves security by using off-chain signatures with expiration deadlines instead of permanent on-chain approvals.

Token approvals are cryptographic permissions that allow a decentralized application to move specific assets out of a user's wallet. Because the dominant token standards require these permissions to function, users routinely grant them when trading, lending, or staking digital assets. However, these authorizations remain active on the blockchain until explicitly revoked, creating a persistent security vulnerability if the application is later compromised.

The Mechanics of the ERC-20 Standard

To understand why token approvals exist, it is necessary to understand how tokens function on a blockchain. Native assets, such as Ethereum's $ETH or Bitcoin's $BTC, are built directly into the base layer of their respective networks. When a user sends a native asset, the network protocol handles the transfer directly.

Tokens, however, operate differently. A token is not a distinct digital file that moves between wallets; it is a ledger maintained by a smart contract. This contract contains a database mapping user addresses to their respective balances. When a user transfers a token like $USDC, they are not actually sending anything. Instead, they are sending an instruction to the token's smart contract to deduct a specific amount from their address and credit it to another address.

This system works seamlessly for simple peer-to-peer transfers. However, it creates a technical hurdle when users want to interact with decentralized applications (DApps), such as decentralized exchanges or lending protocols.

If a user wants a decentralized exchange to swap their tokens, the exchange contract cannot simply reach into the user's balance and take the tokens. The token contract's security model only recognizes the direct sender of a transaction. To solve this, the ERC-20 token standard introduced a two-step process utilizing a secondary ledger within the token contract: the allowance mapping.

The Two-Step Dance of Decentralized Finance

The allowance mapping is a record that states a specific user permits a specific smart contract to move a specific amount of their tokens. Interacting with most decentralized applications requires navigating this system.

First, the user must execute an approve transaction. This transaction is sent directly to the token contract (e.g., the USDC contract). It instructs the token contract to update its allowance mapping, officially granting the decentralized exchange permission to move a set amount of the user's tokens.

Second, the user executes the actual trade transaction on the decentralized exchange. The exchange contract then communicates with the token contract, utilizing a function called transferFrom. The token contract checks the allowance mapping. If the exchange contract has been granted sufficient permission by the user, the token contract executes the transfer, moving the tokens from the user to the exchange, and completing the swap.

This two-step process is the foundational architecture of decentralized finance. It ensures that no third-party contract can move a user's tokens without explicit, cryptographically signed consent.

The Convenience and Risk of Unlimited Approvals

While the approval mechanism is secure in theory, its practical application introduces significant friction. Every transaction on a blockchain requires the payment of a network fee, commonly referred to as gas. Requiring users to pay a gas fee to approve a token, and then a second gas fee to trade it, makes interacting with decentralized applications expensive and cumbersome.

To improve the user experience, developers introduced the concept of the unlimited approval. Instead of asking the user to approve the exact amount of tokens needed for a single trade, the application asks the user to approve the maximum possible integer allowed by the smart contract programming language (2^256 - 1).

By granting an unlimited approval, the user authorizes the smart contract to move an effectively infinite amount of that specific token. The primary benefit is cost reduction. Once an unlimited approval is granted, the user never has to pay the gas fee for an approve transaction for that specific token and that specific contract again.

Consider a scenario where a user trades a stablecoin for a governance token like $UNI on a decentralized exchange 10 times a month. Assume the network fee for an approval transaction is $2, and the fee for a swap is $5.

If the user approves only the exact amount needed before each trade, each interaction requires two transactions. The monthly cost is 10 approvals ($20) plus 10 swaps ($50), totaling $70.

If the user grants an unlimited approval during the first trade, they pay one approval fee ($2) and 10 swap fees ($50), totaling $52.

The unlimited approval saves $18 per month in this scenario. However, this cost reduction comes at the expense of security, as the exchange contract retains permanent authorization to move the user's entire stablecoin balance.

How Smart Contract Exploits Leverage Allowances

Unlimited approvals create a systemic vulnerability. When a user grants an allowance, they are trusting the security of the receiving smart contract. If that contract contains a bug or is compromised by a malicious actor, the attacker can exploit the existing allowances to drain funds directly from users' wallets.

In a typical smart contract exploit, the attacker does not steal the user's private keys. The user's wallet remains cryptographically secure. Instead, the attacker finds a flaw in the decentralized application's code that allows them to manipulate the transferFrom function.

Because thousands of users may have granted unlimited approvals to the application to save on gas fees, the application has the authority to move millions of dollars worth of tokens. The attacker forces the compromised application to exercise those permissions, sweeping the tokens from the users' wallets into the attacker's wallet.

This attack vector is responsible for a significant portion of the capital lost in decentralized finance hacks. Users often forget they have granted these permissions, leaving their wallets exposed to contracts they may not have interacted with for months or years.

Revoking Access: Taking Back Control

Because token approvals are state changes recorded on the blockchain, they do not expire automatically unless programmed to do so. To remove a vulnerability, a user must actively revoke the permission.

Revoking an approval is not a special function within the ERC-20 standard. It is simply the act of submitting a new approve transaction that overwrites the existing allowance with a value of zero.

To manage these permissions, users rely on block explorers or dedicated revocation tools. These platforms scan the blockchain's state, identify all active allowances associated with a user's address, and provide an interface to generate the zero-value approve transactions.

Because revoking is an on-chain state change, it requires the user to pay a network gas fee. Regular wallet maintenance—periodically reviewing and revoking allowances for contracts that are no longer actively used—is a standard security practice for self-custody.

The Evolution of Approvals: Permit Signatures

Recognizing the user experience and security flaws of the traditional approval system, Ethereum developers introduced EIP-2612, commonly known as the Permit extension.

EIP-2612 changes the architecture of token approvals by moving the authorization off-chain. Instead of submitting an approve transaction and paying a gas fee, the user signs a structured data message with their private key. This signature contains the spender's address, the permitted value, a nonce to prevent the signature from being used twice, and a strict deadline.

The user passes this off-chain signature to the decentralized application. The application then submits the signature to the blockchain alongside the trade transaction. The token contract verifies the signature cryptographically and executes the transfer in a single step.

This mechanism eliminates the need for a separate approval transaction, saving users gas fees without requiring them to grant unlimited, permanent access. Because permit signatures typically include a deadline, the authorization expires automatically if it is not used within a specified timeframe, significantly reducing the long-term attack surface.

Common Misconceptions

Several misunderstandings persist regarding how token approvals function and where the risks lie.

Disconnecting a wallet revokes approvals. This is false. Disconnecting a wallet from a decentralized application only severs the connection between the wallet software and the application's frontend website. It prevents the website from viewing the user's address or prompting new transactions. It does not alter the blockchain's state, and any previously granted allowances remain fully active.

Hardware wallets protect against malicious approvals. This is false. Hardware wallets secure the private key, ensuring it cannot be extracted by malware. However, if a user physically confirms a transaction on their hardware wallet that grants an unlimited approval to a malicious contract, the hardware wallet will execute the instruction perfectly. The device protects the key, not the user's judgment regarding which contracts to trust.

Approvals put native assets at risk. This is false. The approval mechanism is specific to token standards like ERC-20. Native assets like ETH do not use allowances. A compromised smart contract cannot drain native ETH from a user's wallet using the transferFrom vector, though it can drain wrapped versions of the asset (like WETH) if an approval was granted.

How This Connects to the Market

The mechanics of token approvals are a critical factor in institutional adoption and regulatory frameworks. As traditional financial institutions enter the digital asset space, the operational risks associated with unlimited approvals conflict with standard compliance and risk management protocols.

Institutional custodians cannot rely on the retail practice of granting infinite allowances to save on network fees. Instead, they utilize complex wallet architectures, such as multi-signature wallets and account abstraction, to enforce granular, time-bound permissions.

Regulators are increasingly focused on how digital assets are secured at the institutional level, as seen when the UK FCA outlined its tokenization push and upcoming safeguarding rules. Ensuring that smart contract permissions are strictly managed and routinely audited is becoming a baseline requirement for licensed entities operating in tokenized markets. The transition toward safer standards like EIP-2612 reflects a broader market maturation, prioritizing verifiable security over marginal cost savings.

Questions this story raises

Do token approvals expire automatically?
Standard ERC-20 approvals do not expire. They remain active on the blockchain until the user explicitly submits a new transaction to revoke them or change the allowance to zero. However, newer standards like EIP-2612 (Permit) include built-in deadlines.
Can a smart contract steal my native ETH through an approval?
No. Native assets like Ethereum (ETH) or Bitcoin (BTC) do not use the ERC-20 approval mechanism. Approvals only apply to tokens (like USDC, UNI, or WETH) that operate via smart contracts.
Does a hardware wallet protect me from bad approvals?
A hardware wallet protects your private key from being stolen by hackers. However, if you use your hardware wallet to sign a transaction granting an approval to a malicious contract, the contract can still drain your tokens.
Why do decentralized exchanges ask for unlimited approvals?
Decentralized applications request unlimited approvals to save users money on network fees (gas). By approving a massive amount once, the user avoids paying a separate approval fee for every future trade.

References

  1. [1] ERC-20 Token Standard — Ethereum Foundation
  2. [2] EIP-2612: permit – 712-signed approvals — Ethereum Improvement Proposals

Evergreen explainer written by Basis Desk's system and checked by an independent model pass for factual errors and advice language. Figures, fees and rules change — the references above are where to verify current specifics. Market figures marked "at the time of writing" come from live exchange data. Report an error: corrections@basisdesk.news · corrections policy.

The Daily Brief, in your inbox at 07:00 ET

Five stories, the numbers that moved, what to watch. Three minutes. No hype, no advice, unsubscribe in one click.

Not financial advice. Basis Desk publishes information, not recommendations. Crypto assets are volatile and you can lose what you invest.