TokenToolHub Wallet Security Guide

ERC-20 Allowances Explained: Spender Approvals, Unlimited Permissions, Wallet Drain Risk, and Revocation

An ERC20 allowance is an on-chain permission that lets a specified spender transfer a defined amount of one token from a wallet through the token contract. Allowances make decentralized exchanges, bridges, vaults, staking systems, payment contracts, and many other applications possible, but they also create continuing wallet exposure when users approve the wrong spender, authorize more than necessary, forget old permissions, or interact with a contract that later becomes malicious or compromised.

TL;DR

  • An ERC-20 allowance is token-specific permission. It applies to one owner, one token contract, one spender, and one blockchain network.
  • The approve function sets the allowance. The spender can later call transferFrom to move tokens within that approved amount.
  • Connecting a wallet is not the same as approving tokens. A connection reveals an address to an application, while an approval creates an on-chain spending permission.
  • An unlimited approval commonly uses the maximum uint256 value. Many implementations treat it as effectively infinite and do not reduce it as the spender uses tokens.
  • Unlimited approvals are convenient but durable. A compromised spender may access current and future balances of that token until the permission is reduced or revoked.
  • A spender does not need the owner's seed phrase to use a valid allowance. It calls the token contract from its own address or logic and relies on permission already granted by the owner.
  • A hardware wallet does not cancel old approvals. It protects signing keys, but an already authorized spender can use its allowance without another signature from the token owner.
  • Approval events show when allowances are set. Allowance consumption may not always emit a new Approval event, so current on-chain state must also be checked.
  • Revocation usually sets the allowance to zero. Revoking prevents future allowance-based transfers but cannot recover tokens already moved.
  • Signed permits can create allowances without an approval transaction. Users must verify the spender, token, amount, deadline, chain, domain, and message details before signing.
  • Use the TokenToolHub Approval Allowances Checker regularly. Review unfamiliar, unnecessary, unlimited, old, and high-value approvals across every wallet and network you use.
Critical distinction Many wallet drains use permission the user already granted. They do not always require a stolen seed phrase or private key.

When a wallet authorizes a malicious or compromised spender, that spender can use transferFrom within the approved limit. The owner's wallet may show no new signature request when the spender later uses that existing permission.

Review active token permissions before they become an incident

Use the TokenToolHub Approval Allowances Checker to inspect active ERC-20 spenders connected to your address. Prioritize unfamiliar contracts, unlimited values, approvals granted to abandoned applications, and permissions covering high-value balances. You can also run relevant tokens through the Token Safety Checker to review token-level restrictions and custom behavior that may affect approvals or transfers.

What an ERC-20 allowance is

An ERC-20 allowance is a number stored by a token contract. It records how many tokens a spender is authorized to transfer from a particular owner's balance.

The permission does not live inside the wallet application. It lives in the token contract's on-chain state.

A standard allowance can be understood as a mapping with three parts:

Allowance = token contract + token owner + approved spender + remaining amount

Suppose Alice owns 1,000 units of a token. Alice approves a decentralized exchange router to spend 300 units. The token contract records an allowance of 300 from Alice to that router.

The router can then call transferFrom to move up to 300 units from Alice as part of an authorized swap or another supported operation.

The token owner

The owner is the address holding the ERC-20 balance and granting permission.

In many cases, the owner is a normal externally owned wallet. It can also be a multisig, smart account, vault, treasury, bridge, or another contract.

The spender

The spender is the address authorized to use transferFrom against the owner's balance.

The spender is often a decentralized exchange router, staking contract, bridge, lending market, payment contract, vault, marketplace, or approval-management system.

An ordinary wallet address can technically be a spender as well. A spender does not need to be a verified application contract.

The approved amount

The amount is the maximum quantity the spender may transfer under the active allowance.

A limited allowance might authorize exactly 500 tokens. An unlimited approval commonly authorizes the largest possible unsigned integer value.

The token contract

Allowances are stored separately inside each ERC-20 token contract.

Approving a spender for Token A does not normally approve Token B. The same spender requires a separate allowance for each token.

The blockchain network

An approval on Ethereum does not automatically create the same allowance on BNB Smart Chain, Polygon, Arbitrum, Base, or another network.

Users should review approvals separately on every network where the wallet has interacted with tokens.

Allowance Flow: approve, transferFrom, and changing wallet exposure

The standard allowance flow has two main stages. The owner first authorizes the spender. The spender later uses some or all of that permission.

ERC-20 Allowance Flow A token owner approves a spender, the token contract stores the allowance, the spender calls transferFrom, and the owner's wallet exposure changes according to the remaining allowance. ERC-20 Allowance Flow The spender uses permission stored by the token contract. It does not need the owner's private key for each later transfer. Token owner Holds the token balance Chooses spender and amount Calls approve or signs permit Token contract Stores owner-spender allowance Checks balance and permission Updates allowance when required Approved spender Router, bridge, vault, staking contract, payment system, application, or wallet Can later call transferFrom Expected application use Spender transfers only the intended amount Allowance falls or remains infinite User can revoke remaining permission Compromise or malicious use Spender transfers approved tokens Current or future balance may be exposed Revocation stops only future use Exposure check: correct token, correct spender, approved amount, current balance, future deposits, contract upgrades, and revocation status A connection request is not an allowance. Approval or permit authorization creates the spending permission.
Owner

The token holder authorizes access

The owner selects a spender and amount through an approval transaction or supported signed permit.

Store

The token records the allowance

The permission exists inside the token contract for that owner-spender pair.

Spend

The spender calls transferFrom

The spender can transfer approved tokens without requesting the owner's signature for every later use.

Risk

Exposure remains until reduced

Limited approvals shrink as they are spent, while unlimited permissions may remain active until revoked.

The approve, allowance, and transferFrom functions

The ERC-20 allowance system relies on three standard functions. Each serves a different purpose.

The approve function

The owner calls approve(spender, amount) on the token contract. This sets the spender's allowance to the specified amount.

Calling approve again normally overwrites the existing allowance rather than adding to it.

If the current allowance is 100 and the owner approves 40, the new allowance normally becomes 40. It does not become 140.

The allowance function

The read-only allowance(owner, spender) function returns the amount the spender is still authorized to use.

Approval checkers call this function or inspect equivalent state to display active exposure.

The transferFrom function

The spender calls transferFrom(owner, recipient, amount). The token contract checks whether:

  • The owner has enough token balance.
  • The caller is authorized as the spender.
  • The allowance is at least the requested amount.
  • The transfer satisfies any additional token rules.

When the checks pass, the token contract moves tokens from the owner to the recipient.

Allowance consumption

A limited allowance normally decreases when transferFrom succeeds.

If a spender has an allowance of 1,000 and transfers 250, the remaining allowance normally becomes 750.

Infinite allowance behavior

Many implementations treat the maximum uint256 value as an infinite allowance. In those implementations, successful transferFrom calls do not reduce the stored amount.

This means the same authorization can be used repeatedly until it is explicitly changed.

How ERC-20 allowance logic appears in Solidity

Allowance code is usually compact, but the security impact depends on the spender contract and the amount users authorize.

Simplified allowance implementation

Allowance storage and spending simplified educational example
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract AllowanceExample {
    uint256 public constant MAX_UINT =
        type(uint256).max;

    mapping(address => uint256)
        public balanceOf;

    mapping(address => mapping(address => uint256))
        public allowance;

    event Transfer(
        address indexed from,
        address indexed to,
        uint256 value
    );

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    function approve(
        address spender,
        uint256 value
    ) external returns (bool) {
        require(
            spender != address(0),
            "Invalid spender"
        );

        allowance[msg.sender][spender] = value;

        emit Approval(
            msg.sender,
            spender,
            value
        );

        return true;
    }

    function transferFrom(
        address owner,
        address recipient,
        uint256 value
    ) external returns (bool) {
        uint256 currentAllowance =
            allowance[owner][msg.sender];

        require(
            currentAllowance >= value,
            "Allowance exceeded"
        );

        require(
            balanceOf[owner] >= value,
            "Insufficient balance"
        );

        if (currentAllowance != MAX_UINT) {
            allowance[owner][msg.sender] =
                currentAllowance - value;
        }

        balanceOf[owner] -= value;
        balanceOf[recipient] += value;

        emit Transfer(
            owner,
            recipient,
            value
        );

        return true;
    }
}

This example shows why an infinite allowance can remain unchanged after spending. Production token contracts may include fees, pauses, restrictions, permit support, temporary approvals, or nonstandard behavior.

Application contract using transferFrom

Spender contract workflow simplified payment example
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface IERC20Payment {
    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);
}

contract TokenPaymentExample {
    address public immutable treasury;

    constructor(address treasuryAddress) {
        treasury = treasuryAddress;
    }

    function pay(
        address token,
        uint256 amount
    ) external {
        require(
            IERC20Payment(token).transferFrom(
                msg.sender,
                treasury,
                amount
            ),
            "Payment failed"
        );
    }
}

Before calling pay, the user must approve this contract as a spender. The contract can move only tokens covered by an active allowance, but an unsafe implementation could use more allowance than the interface suggests.

Setting an allowance to zero

Approval revocation standard zero-value pattern
function revokeSpender(
    address token,
    address spender
) external {
    IERC20Approval(token).approve(
        spender,
        0
    );
}

A wallet normally revokes permission by calling the token's approve function with the same spender and a value of zero. The revocation must be confirmed on-chain before it is considered effective.

Why decentralized applications use approvals

Smart contracts cannot normally take ERC-20 tokens from a user's balance merely because the user called an application function. The token owner must first authorize the application.

Decentralized exchange swaps

A router needs permission to transfer the token being sold from the user's wallet into a liquidity pool or settlement contract.

The user approves the router, then submits the swap.

Liquidity provision

Adding liquidity requires the router or position manager to transfer both deposit assets from the provider.

Each ERC-20 asset normally requires its own approval.

Staking

A staking contract may call transferFrom to move the staking token into custody.

Vault deposits

A vault needs permission to transfer the underlying asset before issuing vault shares.

Lending and collateral

Lending contracts use allowances to transfer deposits, repayments, or collateral into the protocol.

Bridges

A bridge may transfer tokens into a custody contract, burn them, or route them through another system before creating or releasing assets on the destination network.

Payments and subscriptions

A payment contract can use allowances to collect one-time or repeated token payments.

Recurring payment models increase the importance of amount limits, expiration, and revocation.

Marketplaces

A marketplace may require token allowance when purchases, bids, fees, or settlements use an ERC-20 asset.

Wallet connection, transaction approval, and token allowance are different

Wallet interfaces can present several requests that look similar to beginners. They create very different permissions.

Connecting a wallet

A basic wallet connection allows an application to see the selected public address and request actions.

Connection alone does not authorize token transfers.

Signing a transaction

A transaction signature authorizes a specific on-chain call from the wallet.

An approval transaction creates continuing permission that can outlive the original application session.

Signing a login message

A login signature may prove address control without changing blockchain state.

Users must still read the message because a signature request can contain other authorization data.

Signing a permit

A permit signature can authorize an ERC-20 allowance without the owner sending a separate approval transaction.

It may feel like a message signature while producing spending permission once submitted on-chain.

Sending a token transfer

A direct transfer moves a specified amount immediately to a recipient.

An approval does not necessarily move tokens immediately, but it can authorize later movement.

User action Immediate token movement Continuing permission Main review question
Connect wallet No. Normally no token-spending authority. Is the application requesting additional transactions or signatures?
Approve token Normally no immediate transfer. Yes, up to the active allowance. Which token, spender, amount, and network are being approved?
Direct transfer Yes. No standard continuing allowance. Is the recipient and amount correct?
Permit signature Not necessarily at signature time. Can create an allowance when submitted. What spender, value, nonce, deadline, domain, and chain are signed?
Login signature No. Usually application authentication only. Is it truly a login message rather than asset authorization?
Revoke approval No asset recovery. Removes or reduces future spending authority. Did the zero or reduced allowance confirm on-chain?

Limited approvals and exact-amount permissions

A limited approval authorizes no more than a specified amount.

If a user plans to swap 200 tokens, an exact approval might authorize 200 tokens rather than the wallet's entire balance.

Why exact approvals reduce exposure

A compromised spender cannot use more than the remaining approved amount through that allowance.

The risk boundary becomes measurable.

Gas and transaction tradeoffs

Exact approvals may require new approval transactions for later interactions.

Users pay more network fees and approve more frequently, but they avoid leaving a broad permanent permission.

Small residual allowances

A limited allowance can leave a small remainder after use because the application spends less than expected.

Review and revoke unnecessary remainders when the application is no longer needed.

Slippage and variable amounts

Some applications need an allowance slightly above the expected spend because the final amount may vary.

The permission should still remain proportionate to the intended transaction.

Unlimited approvals and why applications request them

An unlimited approval commonly sets the allowance to the maximum uint256 value, which is an extremely large number.

Wallets may display this as unlimited, infinite, maximum, or a very large token quantity.

Convenience

The user approves once and can interact repeatedly without paying for another approval transaction.

Lower transaction friction

Applications can provide faster repeat swaps, deposits, repayments, or other operations.

Variable spending

A router or vault can process different amounts without requiring the user to predict every future transaction.

Persistent exposure

The permission may remain active months or years after the user stops using the application.

Future balances may be exposed

An unlimited approval is not limited to the token balance present when permission was granted.

If the wallet later receives more of that token, the spender may be able to transfer the new balance as well.

Allowance may not visibly decrease

Many token implementations leave the maximum uint256 allowance unchanged after transferFrom.

The permission can therefore continue after multiple legitimate uses.

Unlimited does not mean every asset

A standard unlimited approval applies only to the approved token contract.

Separate allowances are required for other ERC-20 tokens.

How approved spenders can drain tokens

A spender drain occurs when an address or contract uses a valid allowance to transfer tokens in a way the owner did not expect or no longer authorizes.

Malicious application from the beginning

A fake decentralized application asks the user to approve a malicious spender.

Once the approval confirms, the spender calls transferFrom and sends tokens to an attacker-controlled address.

Compromised application contract

A previously legitimate spender can become dangerous if its code, administrator, private keys, upgrade authority, or dependencies are compromised.

Existing user approvals may become available to the attacker.

Upgradeable spender

A spender contract may be a proxy. The current implementation appears safe, but an administrator can replace its logic.

Old approvals remain attached to the same spender address after the upgrade.

Compromised administrator

An attacker who gains control of the spender's administrator may add a withdrawal path or redirect token flows.

Malicious frontend substitution

A compromised website can present the correct branding while replacing the intended spender address with an attacker contract.

The approval transaction itself may still be valid and successful on-chain.

Phishing approval

A phishing page may describe the request as verification, rewards access, migration, support, wallet synchronization, or account recovery.

The transaction actually approves token spending.

Permit phishing

A site may request a typed-data signature that creates a permit allowance.

The user may not pay gas or see a normal approval transaction, but the signed permission can still authorize spending.

Old approval reused later

An attacker does not always need to trick the user today. An approval from months earlier may still be active.

Deposits after compromise

A wallet may have a zero token balance when a spender becomes compromised. If the user later deposits that token, the existing allowance may expose it.

Allowance plus malicious transfer destination

The spender chooses the recipient in its transferFrom call. A malicious spender can direct approved tokens to itself or another controlled wallet.

The TokenToolHub approval risks guide examines phishing approvals, compromised spenders, unlimited permissions, malicious routers, and approval-management habits in greater depth.

What a standard ERC-20 approval can and cannot do

Understanding the boundaries prevents both underestimating and overstating approval risk.

It can authorize transfers of one token

The spender can use the allowance for the specific token contract where approval was granted.

It cannot reveal the seed phrase

An approval does not expose the wallet's recovery phrase or private key.

It does not directly approve native currency

Standard ERC-20 allowances do not apply to a network's native asset such as ETH or BNB.

Wrapped versions such as WETH are tokens and can use allowances.

It does not automatically approve NFTs

NFT standards use separate approval systems.

It cannot exceed the remaining allowance

A compliant token should reject a transferFrom amount above the active allowance.

It cannot exceed the available balance

A large allowance does not create tokens. The owner must have enough balance when the transfer occurs.

It may cover future balances

The allowance remains available when the owner receives more of the same token, unless it has expired, been spent, or been revoked.

Custom token logic can change the practical outcome

Fee-on-transfer tokens, rebasing tokens, blocklists, pauses, transfer restrictions, and upgradeable tokens may behave differently from a simple ERC-20 implementation.

Approval events and allowance history

A standard Approval event normally records the owner, spender, and newly approved value.

Approval event fields

The owner and spender addresses are commonly indexed so explorers and applications can filter them.

The value identifies the new allowance.

Initial approval

The first Approval event can reveal when the wallet authorized the spender and how much permission was granted.

Allowance replacement

A later approval to the same spender usually replaces the previous amount.

Revocation event

A revocation commonly emits an Approval event with a value of zero.

Allowance spending may not emit Approval

The ERC-20 standard requires a Transfer event when transferFrom moves tokens, but it does not require an Approval event every time the allowance is consumed.

Some implementations emit an updated Approval event after spending, while others do not.

Current state is decisive

Event history helps reconstruct how permission changed, but the current allowance value determines remaining standard exposure.

Custom approval systems

Temporary allowances, shared approval managers, signature authorizations, smart-account permissions, and application-specific systems may require additional event and state analysis.

The smart contract events guide explains Approval, Transfer, ownership, role, fee, pause, mint, burn, and upgrade logs.

Changing allowances and transaction-ordering risk

Replacing one nonzero allowance with another can create a transaction-ordering risk.

Example of the allowance replacement issue

Assume a spender has an allowance of 100 tokens. The owner submits a transaction to reduce it to 40.

Before the reduction confirms, the spender sees the pending transaction and spends the original 100.

The owner's approval transaction then confirms and sets a new allowance of 40. The spender may have used the old 100 and still receive the new 40.

Zero-first workflow

A common mitigation is to set the allowance to zero first, wait for confirmation, and then set the new nonzero value.

This requires two transactions when moving between nonzero amounts.

Interface support varies

Some wallets and token applications handle zero-first changes automatically. Others submit a direct replacement.

Revocation transaction can still be raced

Until the zero-value transaction confirms, the old allowance remains active.

A malicious spender may attempt to use it first.

Network congestion matters

A revocation with a very low fee may remain pending while the dangerous approval continues to exist.

How ERC-20 approval revocation works

Standard revocation sets the allowance for the selected spender to zero.

Revocation is token-specific

Revoking one token does not revoke the same spender's allowances for other tokens.

Revocation is network-specific

Revoking on Ethereum does not remove approvals on another network.

Revocation requires an on-chain transaction

The owner normally pays network fees and signs a zero-value approval call.

Confirmation matters

The spender remains authorized until the revocation confirms and the token state updates.

Revocation cannot recover stolen tokens

It prevents future allowance use. It does not reverse transfers that already succeeded.

Revocation does not invalidate every signature

A pending or unused signed authorization may use a separate nonce, expiration, or approval system.

Review the relevant permit or signature mechanism.

Revocation can break future application use

The application may require a new approval the next time the user interacts.

This is expected and is often a reasonable security tradeoff.

Practical approval review and revocation workflow

1

Select wallet and network

Use the correct public address and review every network where the wallet has interacted.

2

Inventory token spenders

Identify each token, spender, allowance amount, age, application, and current wallet balance.

3

Prioritize exposure

Focus on unlimited, unfamiliar, abandoned, upgradeable, compromised, and high-value approvals.

4

Revoke and verify

Submit the zero-value approval, wait for confirmation, and recheck the live allowance.

Start with a read-only scan

Entering a public address into the Approval Allowances Checker should not require a seed phrase or private key.

Never enter recovery credentials into an approval-review website.

Identify the token

Confirm the network, contract address, symbol, decimals, wallet balance, and approximate value.

Identify the spender

Determine whether the spender belongs to a router, vault, bridge, staking protocol, exchange, marketplace, payment contract, approval manager, unknown contract, or ordinary wallet.

Read the allowance amount

Distinguish exact, residual, high, and unlimited values.

Review approval age

Old does not automatically mean dangerous, but forgotten approvals deserve attention because the user may no longer follow the application's security status.

Review spender code and authority

Determine whether the spender is verified, upgradeable, paused, abandoned, compromised, or controlled by a mutable administrator.

Review related wallet activity

When the spender, administrator, or transfer recipient requires deeper context, Nansen can help analysts inspect wallet labels and transaction relationships on supported networks. Confirm labels through contract code and on-chain flows.

Revoke unnecessary permission

Submit a transaction setting the allowance to zero.

Recheck current state

Confirm that the live allowance now reads zero after the transaction is finalized.

EIP-2612 permits and signed approvals

EIP-2612 extends ERC-20 with a permit function. It allows a token owner to authorize an allowance through a signed structured message instead of sending the initial approval transaction.

Why permits exist

A traditional token interaction may require two transactions:

  • Approve the application.
  • Call the application function.

Permit support can combine the authorization with the application workflow and reduce transaction friction.

Permit fields

A standard permit includes:

  • The token owner.
  • The spender.
  • The approved value.
  • The owner's current nonce.
  • A deadline.
  • The signature components.

Anyone can submit a valid permit

The owner signs the authorization, but another account can submit it to the token contract.

The signature itself expresses permission. It should not be treated as proof that the owner intended one specific later application action beyond the allowance.

Permit expiration

The deadline limits when the permit can be accepted by the token contract.

After a valid permit creates the allowance, the allowance may remain active according to the token's approval behavior. The permit deadline does not always mean the resulting allowance expires at the same time.

Permit nonce

The nonce helps prevent the same standard permit from being used repeatedly.

Successful use increments the owner's nonce.

Domain separation

The signed data should bind the authorization to the intended token contract and blockchain domain.

Users should verify the chain, verifying contract, spender, amount, and deadline shown by the wallet.

The EIP-2612 permit guide explains signed approvals, typed data, nonces, deadlines, relayers, domain separation, and permit-specific wallet risks.

Signed approval replay and domain risks

Well-designed permit systems use nonces and domain separation to prevent straightforward replay. Custom signatures can still create replay exposure when those protections are missing or implemented incorrectly.

Missing nonce protection

A signed approval without a consumed nonce may be usable more than once.

Weak domain separation

A signature may be accepted by another contract or network when the signed domain does not bind the authorization correctly.

Long or absent deadlines

A signature with a distant deadline remains usable for a longer period.

Wrong verifying contract

A phishing interface can request a signature for an unexpected token, approval manager, or spender.

Front-running a valid permit

Because anyone can submit a standard permit, another party may submit it before the intended application call.

Applications should not assume that permit submission itself proves a specific spending intention.

Permit plus immediate transfer

A malicious workflow can submit the permit and use the resulting allowance in the same transaction or transaction sequence.

The signature replay attacks guide explains nonces, domains, chains, verifying contracts, deadlines, message reuse, and signature validation risks.

Nonstandard token approval behavior

Not every token behaves exactly like a modern reference implementation.

Tokens requiring zero first

Some tokens reject a direct change from one nonzero allowance to another.

The user must approve zero first, then submit the new amount.

Tokens returning no boolean value

Older or nonstandard tokens may not return the expected success value from approve or transfer functions.

Applications often use compatibility wrappers to handle these differences.

Fee-on-transfer tokens

The spender requests one amount, but the recipient receives less after fees.

The allowance may be consumed based on the gross transferred amount.

Blocked approvals

A token may prevent approvals for blocklisted wallets, unauthorized spenders, or paused accounts.

Upgradeable token logic

Approval and transfer behavior can change after a token implementation upgrade.

Token-level forced transfers

A highly privileged token contract may move or destroy balances through separate administrative functions that do not rely on ERC-20 allowance.

Revoking approvals does not neutralize those token-level powers.

Temporary and expiring approvals

Newer approval extensions can limit permissions by transaction scope, block, or expiration time.

Support remains token-specific, so users should not assume every ERC-20 allowance expires automatically.

Hardware wallets and approval exposure

Hardware wallets protect private keys by keeping transaction signing inside a dedicated device. They reduce the chance that malware directly extracts the key.

They do not automatically protect tokens covered by an already granted allowance.

Why no new hardware-wallet confirmation may appear

The owner already signed the approval. The spender later submits its own transaction to the token contract.

The owner's hardware wallet is not signing that later transferFrom call.

Clear signing still matters

The device can help users inspect the token contract, spender, amount, and network when creating or revoking an approval.

Users should reject requests that cannot be interpreted confidently.

Wallet separation

A safer structure separates long-term storage from active decentralized application activity.

Hardware-wallet options such as Ledger or SafePal can support separated custody, but the user must still manage approvals carefully.

Long-term vault wallet

A long-term wallet can avoid routine interaction with unknown routers, claim pages, bridges, experimental contracts, and new token launches.

Active application wallet

A separate wallet can hold only the assets needed for current interactions.

Limited balances reduce the impact of a malicious approval, but old permissions should still be revoked.

Practical rule Hardware security protects keys. Allowance hygiene limits what authorized contracts can do with tokens.

Both layers matter. Strong custody does not compensate for a dangerous spender approval, and careful approvals do not compensate for an exposed recovery phrase.

TokenToolHub Research Note: many wallet drains are authorization failures, not key theft

Wallet security discussions often focus on seed phrases and private keys. Those remain critical, but they do not explain every drain.

ERC-20 allowances create a second authorization layer. The owner keeps the key while delegating limited or unlimited token-transfer authority to another address.

Scope

What assets are exposed?

Identify the token, network, owner, spender, amount, current balance, and possible future balance.

Trust

Who controls the spender?

Review code, administrators, proxy upgrades, dependencies, multisigs, compromise history, and related wallets.

Duration

How long can permission remain?

Standard approvals can remain active until spent or revoked. Signed authorization deadlines require separate interpretation.

Response

Can exposure be removed quickly?

Review network fees, transaction confirmation, spender activity, revocation method, and other active approval systems.

A wallet with uncompromised keys can still lose approved tokens. The spender does not impersonate the owner. It exercises permission that the token contract recognizes as valid.

This changes the correct incident question. Instead of asking only whether the recovery phrase leaked, users should also ask which spenders were authorized, which permits were signed, and whether any old approval covered the missing token.

The practical risk of an allowance is therefore determined by four factors: the approved amount, the wallet balance, the spender's trustworthiness, and the duration of the permission.

ERC-20 allowance risk matrix

Approval pattern Typical convenience Main exposure Recommended review
Exact approval to a verified application One intended interaction. Approved amount remains exposed until spent or revoked. Confirm spender, amount, token, and network.
Unlimited approval to a widely used router Repeated interactions without new approvals. Current and future token balances may remain exposed if the router is compromised. Review upgradeability, administrator, continued use, and wallet value.
Unlimited approval to an unknown contract Little legitimate benefit. Potential immediate loss of the entire token balance. Revoke promptly and inspect transaction history.
Old approval to an abandoned application No current benefit. Forgotten durable authorization. Revoke unless a clear ongoing need exists.
Approval to an upgradeable proxy Application can evolve without changing address. Future implementation may change spending behavior. Review proxy administrator, upgrades, and delays.
Permit signature with short deadline Reduced transaction friction. Wrong spender or value can create immediate allowance risk. Verify domain, chain, token, spender, value, nonce, and deadline.
Permit signature with distant deadline Longer submission window. Signed permission remains usable for longer before submission. Avoid signing unless the scope and application are fully trusted.
Approval from a long-term vault wallet Direct application access to major holdings. Large-value wallet exposure. Prefer wallet separation and exact permissions.
Approval from a limited-balance activity wallet Convenient application use. Exposure is partly bounded by wallet balance. Review regularly and avoid unnecessary future deposits.

What to do after a suspicious approval or token drain

Speed matters when a dangerous allowance is still active, but response actions should be deliberate.

Confirm the token and spender

Identify the exact network, token contract, owner address, spender address, allowance amount, and suspicious transaction.

Revoke remaining allowance

Set the relevant allowance to zero and wait for confirmation.

Review other tokens approved to the same spender

A phishing or compromised application may have requested several approvals.

Review other networks

The same wallet may have authorized related spenders on several chains.

Move unaffected assets when appropriate

When broader wallet compromise is possible, moving unaffected assets to a clean wallet may reduce exposure.

Consider network fees, pending transactions, active approvals, compromised devices, and whether the seed phrase itself may be exposed.

Do not deposit more of the approved token

An active unlimited allowance may expose newly received balances.

Review signed messages

Determine whether the incident involved a permit, typed-data authorization, shared approval manager, or another signature-based system.

Trace the transferFrom transaction

Inspect the caller, token, owner, recipient, amount, internal calls, and related transfers.

Preserve evidence

Save transaction hashes, screenshots, application domain, spender address, signature request, approval transaction, wallet alerts, and transfer details.

Avoid recovery scams

No legitimate responder needs the seed phrase or private key to inspect an approval.

ERC-20 allowance and wallet safety checklist

Before approving a spender

  • Verify the domain: Confirm that the website address is correct and not a sponsored clone or typo.
  • Verify the network: Make sure the selected chain matches the intended application.
  • Verify the token: Confirm the exact token contract, not only the symbol or logo.
  • Verify the spender: Compare the address with official application documentation and known contracts.
  • Read the amount: Distinguish exact approval from unlimited permission.
  • Question unlimited requests: Decide whether repeated use justifies durable authority.
  • Check the application contract: Review source verification, proxy status, administrator, and security history.
  • Check the transaction type: Confirm that the request is an approval rather than a transfer, permit, or unrelated call.
  • Use a separate activity wallet: Keep long-term holdings away from routine application approvals.
  • Limit wallet balance: Hold only what is needed for the planned interaction.
  • Reject unclear requests: Do not sign when the wallet cannot explain the spender or amount.

After using an application

  • Check remaining allowance: Limited permission may not have been fully consumed.
  • Revoke unused approval: Remove authority when continued access is unnecessary.
  • Confirm revocation: Recheck the live allowance after transaction finality.
  • Review related tokens: The application may have approvals for several assets.
  • Monitor spender changes: Watch upgrades, administrator transfers, pauses, and incidents.
  • Review future deposits: Do not send more of the approved token into the wallet without checking exposure.
  • Maintain an approval routine: Review active spenders monthly or after intensive application use.

When signing a permit

  • Confirm the message type: It should clearly identify a permit or allowance authorization.
  • Verify the owner: Confirm the wallet address granting permission.
  • Verify the spender: Check the exact contract address.
  • Verify the value: Look for unlimited or unexpectedly large amounts.
  • Verify the token domain: Confirm the verifying token contract.
  • Verify the chain: Ensure the signed domain uses the intended network.
  • Verify the deadline: Avoid unnecessarily long validity periods.
  • Understand the consequence: A message signature can create spending authority.

Practical ERC-20 allowance scenarios

Scenario one: exact approval for a single swap

A user wants to sell 500 tokens. The user approves the router for exactly 500 and completes the swap.

If the router spends the entire amount, little or no allowance remains.

Scenario two: unlimited approval to a trusted router

A frequent trader grants unlimited approval to avoid repeated transactions.

The workflow is convenient, but the router address retains access to future balances of that token while the permission remains active.

Scenario three: fake claim page

A website claims that the user must verify a wallet to receive rewards.

The transaction actually grants unlimited token permission to an attacker-controlled spender. The attacker later calls transferFrom.

Scenario four: legitimate protocol is compromised

A protocol used safely for years suffers an administrator or implementation compromise.

Users who left unlimited approvals may face exposure even if they have not visited the application recently.

Scenario five: wallet has zero balance during compromise

The attacker cannot transfer tokens because the wallet currently holds none.

The user later deposits the token without revoking the old allowance. The spender can then use the newly available balance.

Scenario six: permit signature creates hidden exposure

A user signs typed data believing it is a login request.

The message authorizes a permit for a large amount. The attacker submits it and immediately uses the resulting allowance.

Scenario seven: partial allowance remains

A user approves 1,000 tokens, but the application spends only 600.

The remaining 400 can still be transferred by the spender.

Scenario eight: spender contract upgrades

A router is safe when users approve it. Months later, an administrator upgrades the contract.

Existing allowances remain associated with the router address, while the new implementation changes what it can do.

Scenario nine: revocation remains pending

A user submits a low-fee revocation transaction during network congestion.

Before it confirms, the spender uses the old allowance. The user should not treat a pending revocation as completed protection.

Scenario ten: approval for one token is misunderstood

A user approves unlimited stablecoin spending and assumes the application can drain every wallet asset.

Standard allowance exposure applies to that stablecoin contract. Separate permissions or signatures would be needed for other assets.

Guidelines for safer approval design

Wallets, tokens, and applications can reduce approval exposure through clearer interfaces and narrower authorization.

Safer application and token practices

  • Request the minimum necessary amount: Avoid unlimited approval when a bounded amount supports the workflow.
  • Offer exact-approval controls: Let users choose between exact and broad permission.
  • Display the spender clearly: Show the contract name, address, token, network, and amount.
  • Explain repeated-use tradeoffs: Convenience should not hide continuing exposure.
  • Support revocation: Provide a clear path to reduce allowances to zero.
  • Use transparent contracts: Verify source and publish proxy or administrator details.
  • Protect upgrades: Use multisigs, timelocks, governance, and public implementation monitoring where appropriate.
  • Limit administrator powers: Avoid upgrade paths that can turn existing approvals into unrestricted withdrawal authority.
  • Emit standard Approval events: Allowance changes should remain observable.
  • Document permit domains: Users should understand token, spender, value, nonce, deadline, and chain.
  • Use nonce protection: Signed approvals should not be reusable.
  • Use meaningful deadlines: Avoid signatures that remain valid indefinitely.
  • Consider temporary approvals: Short-lived permission can reduce forgotten authorization.
  • Handle nonstandard tokens safely: Applications should account for tokens that do not return standard values or require zero-first approval.
  • Separate authentication from asset authorization: Login messages should not be confused with spending permission.
  • Provide transaction simulation: Show expected allowance and token movements before confirmation.

Allowance security overlaps with token approval risk, signed permits, replay protection, token behavior, and contract-event monitoring.

Check

Approval Allowances Checker

Use the Approval Allowances Checker to identify active token spenders and prioritize unnecessary permissions.

Risk

Crypto approval risks

Read the approval risks guide for phishing, compromised spenders, unlimited approvals, routers, and wallet-drain patterns.

Permit

EIP-2612 permits

Use the permit guide to understand typed-data approvals, deadlines, nonces, relayers, and signed authorization.

Token

Token Safety Checker

Run the Token Safety Checker to review custom token behavior, ownership, fees, restrictions, and upgrade risk.

Replay

Signature replay attacks

Read the signature replay guide to evaluate domains, chains, nonces, deadlines, validators, and reusable messages.

Events

Smart contract events

Use the smart contract events guide to interpret Approval, Transfer, upgrade, ownership, and permission history.

Common misconceptions about ERC-20 allowances

Connecting a wallet approves token spending

False. A basic connection does not create an ERC-20 allowance.

An approval transfers tokens immediately

Not normally. It creates permission that the spender can use later.

A spender needs the owner's seed phrase

False. A valid allowance lets the spender call transferFrom without the owner's private key.

An unlimited approval covers every wallet asset

False. A standard allowance applies to one token contract on one network.

A hardware wallet blocks approved spenders

False. The hardware wallet protects keys but does not cancel permission already recorded by the token contract.

Disconnecting a website revokes approvals

False. Disconnecting removes the application's wallet session. The on-chain allowance remains until changed.

Removing a wallet application removes allowances

False. Allowances exist on-chain and are independent of the installed wallet interface.

An old approval is harmless if the wallet balance is zero

False. Future deposits of the same token may become exposed.

Revocation recovers stolen tokens

False. It prevents future allowance use but does not reverse completed transfers.

Every permit signature expires when its deadline passes

The deadline limits permit submission. An allowance already created may continue according to the token's allowance rules.

Approval events always show the remaining allowance

False. Some implementations do not emit Approval events when transferFrom consumes allowance.

Every verified spender is permanently safe

False. Verified code can contain vulnerabilities, and upgradeable contracts can change.

Conclusion: manage allowances as continuing wallet permissions

ERC-20 allowances are fundamental to decentralized applications. They allow routers, bridges, vaults, staking contracts, lending markets, payment systems, and other applications to move tokens under rules approved by the owner.

The same mechanism creates wallet exposure. A malicious or compromised spender can use valid permission without stealing the owner's seed phrase or requesting a new signature for each transfer.

Limited approvals create a measurable maximum. Unlimited approvals reduce transaction friction but can expose current and future balances for as long as the permission remains active.

Users should verify the token, network, spender, amount, application contract, proxy structure, administrator, and purpose before approving.

Signed permits deserve the same scrutiny as approval transactions. A typed-data signature can create spending authority even when no gas payment or normal approval transaction appears at signing time.

Revocation is an essential maintenance practice. It should be performed on every relevant token and network, confirmed on-chain, and repeated whenever an application is no longer needed or its trust profile changes.

Your next action is to open the TokenToolHub Approval Allowances Checker, review the tokens and networks connected to your active wallets, revoke unnecessary permissions, and move future application activity away from long-term storage addresses.

Find the contracts that can still spend your tokens

Review the token, spender, approved amount, wallet balance, approval age, application status, proxy authority, network, and whether the permission remains necessary.

FAQs

What is an ERC-20 allowance?

An ERC-20 allowance is an on-chain amount that a token owner authorizes a spender to transfer through the token contract.

What is a token spender?

A spender is the wallet or contract authorized to call transferFrom against the owner's token balance within the active allowance.

What does the approve function do?

The approve function sets the amount a selected spender can transfer from the caller's token balance.

What does transferFrom do?

It lets an approved spender move tokens from the owner's address to a recipient, subject to allowance, balance, and token rules.

Does connecting a wallet create an allowance?

No. A basic connection does not grant ERC-20 spending permission.

Does an approval move tokens immediately?

Normally no. It creates permission that the spender can use later.

What is an unlimited ERC-20 approval?

It is an allowance set to an extremely large value, commonly the maximum uint256 amount, so the spender can use tokens repeatedly.

Why do applications request unlimited approval?

It reduces repeated approval transactions and makes future swaps, deposits, repayments, or other interactions more convenient.

Why are unlimited approvals risky?

A malicious or compromised spender may access the wallet's current and future balance of the approved token until permission is revoked.

Can a spender drain tokens without my seed phrase?

Yes. A valid allowance lets the spender call transferFrom without obtaining the token owner's seed phrase or private key.

Can an ERC-20 approval drain ETH?

Standard ERC-20 allowances do not apply to native ETH, but wrapped ETH and other ERC-20 tokens can be approved.

Does one approval cover every token?

No. A standard approval applies to one token contract, one owner, one spender, and one network.

Does disconnecting a decentralized application revoke approvals?

No. Disconnecting the wallet session does not change the on-chain allowance.

How do I revoke an ERC-20 allowance?

Submit a token approval transaction setting the selected spender's allowance to zero, then confirm the live value on-chain.

Does revocation recover stolen tokens?

No. Revocation prevents future use of the allowance but does not reverse completed transfers.

Can a revocation transaction be too late?

Yes. The old permission remains active until the revocation confirms, and a spender may use it first.

What is the approval transaction-ordering risk?

A spender may use the old allowance before a replacement confirms and then receive the new allowance afterward.

Why set an allowance to zero before changing it?

The zero-first workflow helps reduce the risk that a spender uses both the old and new nonzero allowances during transaction ordering.

What is an Approval event?

It is an ERC-20 event that normally records the token owner, spender, and newly approved value.

Does transferFrom always emit an updated Approval event?

No. Allowance consumption does not have to emit an Approval event under the ERC-20 standard.

What is an EIP-2612 permit?

It is a signed authorization that can set an ERC-20 allowance without requiring the token owner to send a separate approval transaction.

Can a permit signature be dangerous?

Yes. A permit can authorize a malicious spender or unlimited amount if the user signs incorrect typed data.

Does a permit deadline revoke an allowance automatically?

The deadline controls when the permit can be submitted. An allowance already created may continue until spent, changed, expired under another mechanism, or revoked.

Can hardware wallets prevent allowance drains?

Hardware wallets protect signing keys, but they do not cancel allowances already granted to spenders.

What approvals should I revoke first?

Prioritize unfamiliar spenders, unlimited permissions, abandoned applications, compromised contracts, upgradeable spenders with weak controls, and approvals covering valuable balances.

How often should I review token approvals?

Review them regularly, after using unfamiliar applications, after security incidents, before moving large balances, and whenever you stop using a protocol.

References and further learning

Use primary technical documentation when reviewing ERC-20 allowances, approval events, transferFrom behavior, permit signatures, and typed-data authorization.


This TokenToolHub guide is educational research only. It is not investment advice, trading advice, legal advice, tax advice, cybersecurity advice, accounting advice, or a smart contract audit. Always verify the token contract, network, spender, allowance value, approval type, transaction data, permit domain, deadline, nonce, application contract, upgrade authority, wallet balance, and revocation status before authorizing token access.

TH

Add TokenToolHub shortcut

Keep scanners, research tools, guides, and the community one tap away on this device.

On iPhone, open TokenToolHub in Safari, tap the Share icon, then choose Add to Home Screen.