Chapter 01

The difference between a native transfer and a token allowance

Interacting with digital assets on Ethereum requires understanding a critical architectural distinction: native ETH behaves differently than ERC-20 tokens. When you send ETH, you sign a transaction that directly deducts your balance and transfers value to a recipient. The recipient has no authority over your remaining ETH balance.

ERC-20 tokens, however, do not reside in your wallet address; they are ledger entries stored inside the smart contract of that specific token. When you trade on a decentralized exchange or deposit tokens into a lending pool, the external contract cannot automatically seize your tokens. You must first call the token contract's approve function. This instruction records an allowance granting the specified spender contract permission to call transferFrom and withdraw tokens from your address up to that maximum threshold.

Chapter 02

The danger of infinite approvals and static allowances

To streamline the user experience, most decentralized applications automatically request infinite approvals—setting the allowance to the maximum integer value of 2^256 - 1. This prevents the user from having to submit and pay gas for a separate approval transaction every time they want to execute a trade.

While convenient, infinite approvals create severe long-term vulnerability. An approval does not expire when you close your browser; it remains permanently recorded on-chain until explicitly overwritten or revoked. If the approved protocol contract suffers a smart contract exploit, an access control bug, or a governance takeover years later, attackers can drain tokens from any wallet that previously granted an unlimited allowance—even if the user hasn't visited that website in months. Limiting allowances to the exact amount intended for immediate trade mitigates this systemic exposure.

Chapter 03

Off-chain signatures: EIP-712 typed data and EIP-2612 Permit

To eliminate the need for a separate on-chain approval transaction altogether, many modern tokens implement EIP-2612 (Permit). Instead of broadcasting a transaction and paying gas to approve a spender, the user signs an off-chain cryptographic message conforming to the EIP-712 typed structured data standard.

The dApp or a relayer submits this signed message along with the execution transaction. While this saves gas, it introduces significant phishing risks: - Malicious phishing websites present deceptive EIP-712 signing prompts designed to look like routine website logins or airdrop claims. - In reality, the signed message contains an EIP-2612 Permit that authorizes the attacker's drainer contract to withdraw all user tokens. - Because signing an off-chain message requires no gas and broadcasts no immediate transaction from the user's wallet, users often believe the signature was harmless until their tokens disappear.

Before signing any typed data prompt, carefully review the parsed parameters in your wallet interface: verify the verifyingContract address, ensure the spender is the legitimate protocol router, check the value field, and inspect the deadline timestamp.

Chapter 04

How to inspect and revoke active allowances

Maintaining security hygiene requires periodically auditing and revoking outstanding approvals. A wallet holder can revoke an allowance by calling the token's approve function and setting the allowance value to 0.

To execute revocations: 1. Use trusted block explorer token approval tools (such as Etherscan Token Approval Dashboard) or open-source revocation interfaces. 2. Filter active allowances by asset, contract address, and exposure value. 3. Submit revocation transactions for protocols you no longer actively use, or reduce infinite allowances to zero. 4. Utilize hardware wallets that support clear signing, allowing you to inspect the exact spender contract address and permitted token amount on the physical device screen before confirming.

Chapter 05

An operational approval hygiene routine

To interact safely with decentralized applications without treating every signature as a scam: - Use dedicated burner wallets: Keep long-term holdings in cold storage accounts that never interact with dApps or sign smart contract approvals. - Reject infinite approvals: Whenever prompted, manually edit the permission field in your wallet to match the exact transaction amount. - Verify the spender address: Never rely solely on a website's domain; confirm the spender contract matches official project documentation. - Schedule routine audits: Revoke approvals monthly or immediately following the conclusion of an on-chain activity.

Explore our self-custody wallet recovery and approval guide and our parent Ethereum desk for ongoing security and protocol research.

Chapter 06

EIP-2612 Permit signatures and offline authorization vectors

Standard ERC-20 token interactions historically required two separate on-chain transactions: an initial "approve" transaction granting a decentralized application smart contract permission to spend tokens, followed by the execution transaction that transfers the funds. To streamline user onboarding, EIP-2612 introduced the "permit" architecture, allowing users to sign structured cryptographic messages offline using their private key.

The permit payload combines structured domain parameters: Permit Payload = sign(Domain Separator, hash(owner, spender, value, nonce, deadline))

The permit payload is passed directly to the destination contract in a single transaction, eliminating the gas cost and waiting time of a separate approval transaction. However, the EIP-2612 permit mechanism has become a primary target for sophisticated phishing drainers. Because permit authorizations execute via off-chain cryptographic signatures ("eth_signTypedData_v4") without submitting an on-chain transaction from the victim's address, malicious dApps can trick users into signing blanket spending allowances disguised as benign login prompts or gasless airdrop claims.

Chapter 07

Contract approval inspection and programmatic revocation runbook

Securing Web3 wallets against cumulative counterparty risk requires regular auditing of existing smart contract allowances:

1. Query allowances using command-line tools such as "cast call <token_address> allowance(address,address)(uint256) <owner> <spender>". 2. Inspect pending approval events on block explorers before executing transactions. 3. Utilize open-source revocation interfaces or issue direct contract transactions setting the approved spending limit to zero.

To revoke an excessive or obsolete token approval, the token holder must issue a new "approve" transaction setting the approved balance to zero: IERC20(tokenAddress).approve(spenderAddress, 0);

Security-conscious operators should never leave infinite allowances ("type(uint256).max") open indefinitely. If a previously audited decentralized exchange protocol suffers a smart contract exploit, attackers can use the protocol's lingering authorization permissions to drain tokens directly from user wallets without needing access to private keys. Setting exact allowances tailored to each trade and regularly purging obsolete protocol allowances eliminates this persistent vulnerability from institutional and retail crypto portfolios.