NefiSwap

ERC-20 token approvals: what a spending allowance means

Understand who grants an ERC-20 allowance, what it permits, and how it differs from a wallet connection or a completed swap.

NefiSwap Desk

Updated:

Editorial illustration of ERC-20 token spending approvals and wallet permissions

Key points

  • An ERC-20 allowance is permission from a token owner to a specified spender for an amount.
  • Approval is separate from a transfer or swap; token movement requires a separate operation.
  • Disconnecting a site does not revoke an on-chain allowance, and completed revocation requires an on-chain transaction.

An ERC-20 token approval is permission for a specified spender to use tokens belonging to a token owner, up to an allowance. It is not the same thing as connecting a wallet to an application, and it does not by itself complete a transfer or swap. Understanding those distinctions can help you interpret a permission request and consider what an existing allowance means.

Why an application may request permission

An application that needs a contract to use ERC-20 tokens may request an allowance before a separate operation involving those tokens. The approval establishes permission for a particular spender in relation to a token owner's holdings. It is a permission, not the token movement itself.

Read the request as a statement about access: which token is involved, who would be allowed to spend it, and what amount is permitted. Do not assume that an application name alone establishes who the spender is or that the permission is appropriate. This guide explains the terms, rather than recommending a particular spender or prompting you to authorize anything.

Owner, spender and allowance

The owner is the account whose tokens are covered. The spender is the account or contract given permission to use those tokens. The allowance is the amount that spender is authorized to use from that owner's balance for the relevant token contract.

These terms describe a relationship between an owner and a spender for a specific token contract. The allowance function reports the remaining authorization for that relationship. An allowance can be set to an amount; do not assume every approval uses the same amount or is automatically unlimited. The actual permission depends on the approval made and the token's behavior.

Approval is not a transfer or swap

In the ERC-20 model, approval, checking an allowance, and moving tokens on another account's behalf are separate operations. An approval sets permission. A later transfer operation, such as transferFrom, is the separate mechanism that moves tokens using that permission. Therefore, approving an allowance does not automatically execute a requested swap or mean that tokens have already moved.

The allowance is not a record that the authorized spender has used the full amount. It describes remaining permission. An approval can change the allowance value, and a new approval call replaces that value. The token's behavior and the details of the permission still matter, so avoid treating all tokens or requests as identical.

Wallet connection and allowance are different

Disconnecting a website from a wallet changes the connection; it does not itself cancel an on-chain ERC-20 allowance. A standing allowance may remain relevant even after you stop visiting an application. This is why disconnecting a site should not be treated as confirmation that a token permission has been removed.

Reviewing an allowance and revoking it are separate from disconnecting. A revocation changes the on-chain permission only when the relevant transaction completes. Such a transaction normally requires network gas. Clicking a control on a website alone does not establish that the permission has been revoked.

What reviewing or revoking changes

Allowance review can help you see the token, spender and amount of permission recorded. Revocation changes the allowance rather than reversing a transfer that already happened. It cannot promise that every risk is removed or that a prior token movement can be undone. An outstanding broad permission can matter if a spender or its contract is compromised, which is one reason users may want to understand permissions that remain in place.

For changing an allowance, the ERC-20 specification discusses setting it to zero before setting a different amount as a client-interface mitigation. This is not a universal recovery method, and token-specific behavior can differ. Consider the network gas cost and verify whether the intended on-chain change completed. For other NefiSwap topics, see the blog.

Quick answers

Does an ERC-20 approval complete a swap?

No. It grants a spender permission to use tokens up to an allowance. A separate operation is required to move tokens.

Does disconnecting a wallet from a site revoke its token allowance?

No. Disconnecting changes the wallet connection, not the on-chain allowance. Revocation is a separate on-chain change.

Can revoking an allowance reverse a transfer?

No. Revocation changes the permission; it does not undo a transfer that has already occurred.

Sources

This is NefiSwap's own summary of public reporting, prepared with automation. It is not financial advice.

Related articles