Technical Definition

Approval / Allowance

An ERC-20 approval sets an allowance that lets a specified address or smart contract spend up to a defined amount of a user's tokens.

By Crypto University Editorial
Token approvalrevokeSmart contract

Key Insight

Approvals are necessary for many swaps and DeFi actions, but broad or forgotten allowances can create risk if the approved contract is malicious or later compromised. Users should understand what asset, spender, and amount they are authorizing.

Common Misconceptions

An approval is not the same as a one-time transfer. Unlimited approvals may remain active after you finish using an app. Always verify the spender address and do not approve unexpected prompts.

Detailed Explanation

Aliases and acronyms: Token approval; ERC-20 approval; spending allowance; approve; allowance

Plain-English explanation: Many DeFi apps cannot move an ERC-20 token from your wallet until you authorize a spender. The approval transaction records how much that spender is allowed to transfer on your behalf. The remaining permission is called the allowance.

Analogy: It is like giving a company permission to debit your bank account up to an agreed limit without giving it ownership of the whole account.

How it works: The token holder calls the ERC-20 approve function for a spender and amount. The token contract stores that allowance. The spender can then use transferFrom within the approved limit, and the allowance is reduced or otherwise handled according to the token implementation.

FAQs

Q: Does an approval move my tokens immediately?

A: No. It grants spending permission. A later transferFrom or related call is needed to move tokens.

Q: What is an unlimited approval?

A: It is an allowance set to a very large value so repeated interactions do not require a new approval each time.

Q: Can I reduce an allowance?

A: Yes, if the token follows the expected approval interface. Wallets and approval-management tools can submit a new allowance, often zero, to remove permission.

Sources

ERC-20 / EIP-20

OpenZeppelin - ERC-20

In Practice

A user approves a DEX router to spend up to 500 USDC. The router can transfer the necessary USDC for the user's swap, subject to the token contract's allowance rules.

Dig Deeper