ERC-20 allowance, explained
The DeFi primitive that turns one approval into a standing permission.
Allowance is the reason a Uniswap router, lending vault, bridge, or marketplace can pull ERC-20 tokens from a user's wallet. It is also the reason users accumulate invisible standing approvals across years of DeFi usage.
on this page
The standard, in one card.
- Core functions
- approve · allowance · transferFrom
- Canonical spec
- EIP-20
- Common patches
- ERC-2612 · Permit2 · ERC-1363
- LUKSO equivalent
- LSP7 operators + LSP6 permissions
The origin story.#
ERC-20 included approve, allowance, and transferFrom from the beginning. The pattern solved a real problem: contracts needed a way to pull tokens as part of a larger operation. The ERC-20 spec intentionally kept that mechanism small, and the ecosystem filled in the missing UX with routers, signatures, dashboards, and wallet warnings.
How ERC-20 Allowance actually works.#
approve · decreaseAllowance · permit transferFrom allowance The state is simple: allowance[owner][spender] is a number. approve writes it. transferFrom checks it and moves tokens. A spender can spend up to that number until the allowance is reduced, consumed, or reset.
What's broken about ERC-20 Allowance.#
The risk is not that allowance is complicated. The risk is that it is too simple for modern app intent. A user wants to approve one swap, one deposit, or one bridge action. The token contract records a generic spender limit.
-
Approval and intent are split.#
The user approves a spender first. The spender chooses the later transferFrom parameters. A wallet can show the approval amount, but it cannot prove that the future spend will match the swap, bridge, or deposit the user thinks they are authorizing.
ERC-20approve(spender, value)LSP6AllowedCalls + permissionsworkarounds tried- EIP-2612 permit
- Permit2 signature scopes
- transaction simulation
- revoke dashboards
-
Max approvals become the default UX.#
Dapps request uint256 max allowances because asking for a fresh approval on every action is expensive and annoying. That makes the spender a long-lived risk even after the user leaves the app.
ERC-20approve(router, type(uint256).max)LSP6scoped controllerworkarounds tried- exact approvals
- approval expiration in Permit2
- revoke.cash
- wallet warnings
-
Allowance is token-local.#
Each token contract owns its own approval table. A user has to audit permissions one token at a time, and a wallet cannot express one coherent policy such as 'this app can swap up to 50 USDC per day and nothing else' across assets.
allowancetoken.allowance(owner, spender)Universal Profileaccount permissionsworkarounds tried- Permit2 shared router
- wallet policy engines
- custom vault wrappers
LUKSO designed it differently.#
LSP7 keeps an operator model for assets, but the meaningful shift comes when that model is paired with LSP6. The spender is no longer just an address in a token mapping. It can be a named controller whose powers are constrained by the user's account.
- LSP7 Digital Asset LSP7 replaces allowance with operators and transfer data, then composes with account-level permissions.
- LSP6 Key Manager Scopes what a controller can call, which standards it can touch, and what data keys it can mutate.
- LSP0 ERC-725 Account The account becomes the policy object. Permissions live with the user, not scattered across token approvals.
ERC-20 Allowance vs LSP6 in one table.#
| row | ERC-20 Allowance | LSP6 |
|---|---|---|
| grant location | inside each ERC-20 token | on the account via LSP6 |
| spender action | transferFrom(owner, to, amount) | controller calls through Universal Profile |
| common UX | max approval | scoped controller permission |
| revocation | per token / per spender | remove or narrow controller |
FAQ.#
-
What is ERC-20 allowance? #
Allowance is the amount of a token that an owner has approved a spender to transfer with transferFrom. It is set with approve and read with allowance.
-
Why do dapps ask for unlimited allowance? #
Unlimited allowance avoids repeated approval transactions. The tradeoff is that the spender keeps a standing permission until the user revokes it or the token contract changes the allowance.
-
Does permit remove ERC-20 allowance risk? #
No. ERC-2612 permit moves the approval into a signature, but the result is still an ERC-20 allowance. It improves UX and can reduce approval transactions; it does not make the spender model disappear.