B.BlockAxis⌕ Search
Menu

Token approvals and wallet security

An ERC-20 approval lets a spender contract transfer a specified allowance on your behalf.

IntermediateContent revised · 13.09.20263 min reading · allow 5–10 more minutes for the workshopBlockAxis

Your learning plan

Separate approval, transfer and revocation

By the end, explain the diagram in your own words, solve the case and justify the correction.

Prerequisites : Hot, warm and cold wallets · Ethereum accounts and transactions

Level 2 · Intermediate →

Reading path · 12 / 35 · Intermediate

Key takeaway

An ERC-20 approval lets a spender contract transfer a specified allowance on your behalf.

The essentials

An ERC-20 approval lets a spender contract transfer a specified allowance on your behalf. Some allowances are very large and remain after the first interaction. A deceptive approval can be as harmful as a direct transfer, even if the initial transaction sends little value.

How it works

Application risks include bugs, reentrancy, manipulated prices, administrative abuse and failed dependencies. An audit reduces some uncertainty without eliminating it. Review the particular contract and version, rather than treating an audit logo as a blanket guarantee. Revoking an allowance prevents future use of that allowance, not recovery of assets already taken.

What to watch

Ask which contract receives what right, over which asset, on which network and for how long. Addresses are pseudonymous rather than inherently anonymous. Public interactions can reveal relationships, while RPC services and interfaces can observe metadata or fail independently of the chain itself.

Understand the details

An ERC-20 approval generally lets a specified spender move tokens up to an allowance. It does not necessarily move tokens immediately. The spender can be a contract whose behavior deserves separate review. An unlimited allowance reduces repeated approvals but leaves a larger continuing permission. A signed permit may authorize similar behavior without an initial approval transaction by the token owner.

Boundaries and common mistakes

Disconnecting a website usually removes an interface connection, not an on-chain allowance. Revocation itself may require a transaction and fees. Checking the token symbol is insufficient because unrelated contracts can use the same symbol. Identify the chain, token contract, spender, amount and any expiry or nonce.

The mechanism at a glance

  1. Approve spender
  2. Allowance stored
  3. Spender uses permission
  4. Revoke remaining allowance
Separate approval, transfer and revocation. Conceptual map: read these four landmarks together with the explanation above.
Applied workshop · work at your own pace

Apply the lesson to a case

A user grants a spender 1,000 units, spends 100 through it and later disconnects the site. Assume the token decreases allowance normally. Record the remaining permission separately from the wallet’s balance and connection status.

What remains authorized and what action would remove it?

Choose one answer.

Interactive explainer · conceptual model

What a wallet signature authorises

Inspect

Check network, recipient, asset and permissions before signing.

No real transaction is sent.
Prepare a correction note

Describe the passage and the proposed correction. This creates a local note for you to share; it sends nothing. Do not include personal or confidential information.