An ERC20 allowance is the amount of a token that you, the owner, have authorised another address (the spender) to move out of your balance. The EIP-20 token standard builds it from three methods: approve, allowance and transferFrom. When a decentralised exchange, bridge or vault asks you to approve a token, it is asking you to set one. TokenToolHub’s guide to ERC-20 allowances notes that many wallet drains use permission the user already granted, so the number deserves more attention than a wallet pop-up gives it.

What is an ERC20 allowance?
It is a number stored in the token contract that records how many tokens one spender may still move from one owner’s balance. Your wallet app only displays it. TokenToolHub ties each allowance to one owner, one token contract, one spender and one network.
According to TokenToolHub, approving a spender for Token A does not approve it for Token B, and an approval on Ethereum does not create the same allowance on BNB Smart Chain, Polygon, Arbitrum or Base. Standard ERC-20 allowances also do not cover native ETH, though wrapped ETH (WETH) is a token and can be approved. NFT standards use separate approval systems.
The token owner
The owner is the address that holds the token balance and grants permission. TokenToolHub notes that this can be an ordinary wallet, a multisig, a smart account or another contract.
The spender
The spender is the address allowed to call transferFrom against the owner’s balance. It is usually an exchange router, staking contract, bridge, lending market or vault, though an ordinary wallet address can be a spender too.
The approved amount
The amount is the ceiling the spender can move under the active allowance. TokenToolHub’s example shows how the token contract records it:
Alice owns: 1,000 units of a token Alice approves router: 300 Token contract stores: allowance of 300 (Alice to router) Router may move: up to 300 units with transferFrom
The amount can match a single trade exactly or, as covered below, be set so high that it never runs out.
Where the allowance fits in the ERC-20 token standard
The allowance is one part of a shared interface for fungible tokens on Ethereum. According to ethereum.org’s ERC-20 developer documentation, ERC-20 stands for Ethereum Request for Comments 20, and Fabian Vogelsteller proposed it in November 2015 as a token standard that implements an API for tokens within smart contracts. Fungible means each token is identical in type and value to every other token of the same kind.

The EIP-20 specification lists Fabian Vogelsteller and Vitalik Buterin as its authors, shows a created date of 19 November 2015 and carries Final status. Its abstract says the standard lets tokens be transferred and also approved so another on-chain third party can spend them.
ethereum.org lists four jobs the standard covers: transferring tokens between accounts, reading an account’s token balance, reading the total supply, and approving an amount of tokens that a third-party account can spend. A smart contract that implements the required methods and events can be called an ERC-20 token contract, and once deployed it keeps track of the tokens it created.
| Method or event | Called or emitted by | What it does |
|---|---|---|
totalSupply() |
Anyone (read-only) | Returns the total token supply |
balanceOf(_owner) |
Anyone (read-only) | Returns the token balance of the address _owner |
decimals() |
Anyone (read-only, optional) | Returns how many decimals the token uses |
transfer(_to, _value) |
Token holder | Sends tokens from the caller to _to and fires a Transfer event |
approve(_spender, _value) |
Token owner | Lets the spender withdraw up to _value; a new call overwrites the old allowance |
transferFrom(_from, _to, _value) |
Spender | Moves tokens from the owner within the allowance and fires a Transfer event |
allowance(_owner, _spender) |
Anyone (read-only) | Returns the amount the spender is still allowed to withdraw |
Approval event |
Token contract | Logs owner, spender and value on every successful approve call |
Decimals and raw amounts
Allowances are stored as whole numbers, not as the figure your wallet shows. EIP-20 explains that a token reporting 8 decimals means you divide the stored amount by 100000000 to get the user-facing figure. The decimals method is optional, and EIP-20 says other contracts must not expect it to be present. Proof of Talk’s article on token allowances advises recording raw integer values alongside verified decimals so a readable limit does not hide a scaling error.
How approve and transferFrom move an ERC20 token through the token contract
The owner grants, the spender spends, and the token contract enforces the limit. EIP-20 defines each step:
- Approve. The owner calls
approve(_spender, _value). EIP-20 says this lets the spender withdraw from the owner’s account multiple times, up to_value. - Record and log. The token contract stores the allowance and must emit an
Approvalevent, carrying the owner, spender and value, on every successfulapprovecall. - Spend. The spender later calls
transferFrom(_from, _to, _value). EIP-20 calls this a withdraw workflow that lets contracts transfer tokens on your behalf, and says it should throw unless the_fromaccount deliberately authorised the caller. Each call must fire aTransferevent. - Check. Anyone can call the read-only
allowance(_owner, _spender)method to see how much the spender is still allowed to withdraw.
Before a transferFrom goes through, TokenToolHub says the token contract checks that the owner has enough token balance, that the caller is the authorised spender, that the allowance covers the requested amount and that any extra token rules are met. A limited allowance then shrinks as it is used. TokenToolHub’s example:
Allowance: 1,000 Spender transfers: 250 Remaining allowance: 750
The spender does not need you to sign again for each later transfer. Cube Exchange’s explainer on token approvals walks through a lending deposit: you approve the lending contract, then call its deposit function, and inside that function the contract calls transferFrom to pull your tokens. Cube calls this pull-based settlement.
Approving is different from connecting
Connecting a wallet shows an app your public address. It does not grant any spending power. An approval is an on-chain transaction that creates a standing permission, and TokenToolHub points out that it normally moves no tokens at the moment you sign it and that disconnecting the site later leaves the permission in place.
Why Ethereum apps ask for approval instead of a token transfer
A plain transfer sends tokens to a contract without telling it anything. Per ethereum.org, the ERC-20 standard has no mechanism to notify a receiving contract, so tokens sent to a contract that cannot handle them can be stuck for good. As of 20 June 2024, ethereum.org counted at least $83,656,418 worth of ERC-20 tokens lost this way.
The documentation says transfer is not designed for depositing tokens to contracts and points to the approve and transferFrom pattern instead. It also names alternative token standards, ERC-223 and ERC-1363, that grew out of this problem. Cube Exchange adds that the approval pattern lets an app coordinate the token movement with its own bookkeeping in one transaction, pulling the exact amount it needs while its logic runs.
TokenToolHub lists the common places you meet an approval request:
- Exchange swaps: a router needs permission to move the token you are selling.
- Liquidity provision: each ERC-20 asset you deposit normally needs its own approval.
- Staking and vaults: the contract pulls the token into custody before issuing a position or vault shares.
- Lending: deposits, repayments and collateral move through allowances.
- Bridges: a bridge may move tokens into a custody contract before assets appear on the destination network.
- Payments and marketplaces: contracts collect one-time or repeated token payments, bids or fees.
Changing an ERC20 allowance: overwrites and the race condition
A new approve call replaces the old value. It does not add to it. TokenToolHub gives this example:
Current allowance: 100 Owner calls approve(spender, 40) New allowance: 40 (not 140)
Overwriting creates a timing problem. Zealynx’s allowance glossary entry describes how a spender watching the mempool can use the old allowance before the change confirms:
Approved allowance: 100 Owner sends approve(spender, 50) to reduce it Spender front-runs: transferFrom 100 Owner's approval confirms: allowance = 50 Spender transfers again: 50 Total taken: 150 (owner intended 50)
EIP-20 tells wallet interfaces to set the allowance to 0 before setting a new value for the same spender. It leaves this to clients on purpose, because forcing it in the contract would break backwards compatibility with tokens deployed earlier. Zeroing first takes two transactions, and TokenToolHub notes that some tokens reject a direct change from one nonzero allowance to another, so the two-step route is required there anyway.
Some libraries add increaseAllowance and decreaseAllowance helpers that adjust the value relative to its current level. Cube Exchange notes these are not part of the original standard.
Unlimited token approvals and why apps request them
Many apps ask for the largest possible value, type(uint256).max, so you approve once and skip paying for another approval on that token. TokenToolHub notes that many implementations treat this value as infinite and do not reduce it when the spender uses it.
Proof of Talk adds that OpenZeppelin’s ERC20 implementation documents this infinite treatment, and that its transferFrom does not emit a fresh Approval event when it reduces an allowance. Accounting built only on event logs can therefore be incomplete. Read the live value with allowance instead.
The risk lasts as long as the permission does:
- Future balances are exposed. TokenToolHub notes that an unlimited approval covers tokens that arrive after you granted it, not just what you held at the time.
- An empty wallet is not safe. Proof of Talk points out that a zero token balance leaves nothing to move today, but the permission still matters once a later deposit lands.
- Spenders can change. A contract that was safe when you approved it can be compromised or upgraded later, and your old approval still points at the same address.
- Your keys stay safe while tokens leave. A spender with a valid allowance does not need your seed phrase. TokenToolHub notes that a hardware wallet protects signing keys but does not cancel approvals you already granted, which matters even if you keep funds on one of the hardware wallets we compare.
Cube Exchange notes that many costly wallet drains start with a valid approval rather than a stolen private key. Our crypto hacks tracker by month and attack type covers the wider picture of how funds go missing.
Permits: an ERC-20 token approval created by signature
ERC-2612 (often written EIP-2612) adds a permit function. Instead of sending an approve transaction, you sign a typed message naming the owner, spender, value, a nonce and a deadline. Anyone can submit that signature on-chain, and the token then sets the allowance.
According to Cube Exchange, two safeguards make this work: a domain separator that binds the signature to one contract and chain, and a nonce that lets each signed permit be used only once. Zealynx adds that you skip paying gas for a separate approval transaction.
A permit is still a spending permission:
- Cube Exchange notes that a relayer can hold a valid permit back, and another party can submit it first.
- Proof of Talk explains that the deadline limits when the signature can be accepted. It is not an expiry date for the allowance it creates.
- TokenToolHub warns that a permit request can feel like a harmless message signature while granting spending power, so check the spender, token, amount, deadline and chain before you sign.
How to check and revoke an ERC20 allowance
To revoke, you call approve again for the same spender with a value of zero. TokenToolHub says a revocation commonly shows up as an Approval event with a zero value, and its guide sets out the limits:
- It is an on-chain transaction, so you sign it and pay a network fee.
- The old allowance stays live until the revocation confirms, and a spender can use it first.
- It covers one token on one network. Repeat it for every token and chain where you approved that spender.
- It stops future use only. Tokens already moved do not come back.
A practical routine looks like this:
- List each token, spender and approved amount for your address on every network you use.
- Deal first with unlimited, unfamiliar and old approvals, and those covering large balances.
- Send the zero-value approval, wait for confirmation, then read the live allowance again.
- Next time, approve only the amount a single action needs, accepting that you will pay for more approval transactions.
TokenToolHub also suggests keeping long-term holdings in a separate wallet from the one you use with apps. If you hold tokens in one of the self-custody crypto wallets we compare, any approval you grant from it stays in force until you change it on-chain.
Nonstandard ERC-20 token behaviour that affects approvals
Not every token follows the reference design. EIP-20 itself says callers must handle a false return and must not assume one never comes back. TokenToolHub lists the main variations:
- Older or nonstandard tokens may not return the expected success value from
approveortransfer. - Fee-on-transfer tokens deliver less than the requested amount, while the allowance may be reduced by the gross amount.
- Some tokens block approvals for blocklisted wallets or paused accounts.
- Upgradeable tokens can change their approval and transfer behaviour after an upgrade.
Cube Exchange notes that wrapper libraries such as SafeERC20 are widely used because of these differences, so apps do not misread a failed approve or transferFrom.
Frequently asked questions
What is an ERC20 allowance?
It is the amount of a token that an owner has authorised a spender address to move through the token contract with transferFrom. The owner sets it with approve, and anyone can read it with the allowance function.
Is ERC-20 the same as Ethereum?
No. Ethereum is the network, and ERC-20 is a token standard for smart contracts running on it. Standard ERC-20 allowances do not apply to native ETH, though wrapped ETH is an ERC-20 token and can be approved.
What is ERC-20 used for?
ERC-20 gives fungible tokens a shared interface so wallets and decentralised exchanges can work with any of them. According to ethereum.org, such tokens can represent reputation points, in-game skills, company shares, fiat currency such as USD or an ounce of gold.
Does an approval move tokens straight away?
Normally no. An approval records a permission in the token contract. Tokens only move later, when the spender calls transferFrom within the approved amount.
Does one approval cover every token in my wallet?
No. A standard approval applies to one token contract, one owner, one spender and one network. Each other token needs its own approval.
Does disconnecting a wallet from an app revoke an allowance?
No. Disconnecting ends the app’s session with your wallet. The allowance lives in the token contract and stays active until it is spent, changed or revoked on-chain.
Does revoking an allowance recover stolen tokens?
No. Revoking sets the allowance to zero and blocks future transfers by that spender. Transfers that already went through are not reversed.
Why do apps ask for unlimited approval?
It saves you from sending a new approval transaction before each swap or deposit. The trade-off is that the spender keeps access to your current and future balance of that token until you revoke it.

