What a Token Allowance Lets a Treasury Contract Do
A token allowance lets a contract move treasury tokens up to an approved limit; learn how to inspect the spender, revoke access, and verify the change on-chain.
The Top Crypto Editors 3 min read
What is a token allowance, and how do you revoke one for a treasury? It is permission recorded by a token contract for a specified spender to transfer tokens from a specified wallet, and you revoke it by submitting a transaction that reduces that permission. For a treasury, the spender is often a router or other contract used by an application, while the wallet is the treasury address itself. The allowance is separate from the tokens: removing it does not move funds or undo transfers already completed.
What does a token allowance let a contract do?
Under the common ERC-20 mechanism, the token contract stores an allowance for each owner-and-spender pair. When the spender calls transferFrom, the token contract checks that allowance and, if sufficient, decreases it by the amount transferred. An approval may set a specific amount or an effectively unlimited amount; the latter avoids repeated approvals but leaves more authority available if the spender is compromised or misused.
A treasury interacting with a DEX may approve a router to pull tokens for a swap or liquidity operation. For the distinction between swapping and supplying liquidity, the baseswap guide gives the operational detail. The key allowance question remains the same: which contract can spend which token from the treasury, and how much?
How do you revoke an allowance safely?
Use a trusted approval-management interface or interact with the token contract through a verified treasury workflow, then submit an approval setting the spender’s allowance to zero. The transaction must come from the treasury address, so a multisig treasury typically requires its normal proposal and signer approvals. Check the token, chain, spender address and treasury before signing; a similarly named contract is not proof that it is the intended spender.
- Identify the token contract and the exact treasury address.
- Find the spender address and its current allowance for that token.
- Submit the zero-allowance approval and wait for confirmation.
- Recheck the allowance on the same chain to confirm it reads zero.
What does revoking access not do?
Revocation prevents future transfers that rely on that allowance after the zero-approval transaction takes effect. It does not return tokens already transferred, and it cannot guarantee a pending spender transaction will not execute first; transaction ordering matters until the revocation is confirmed. Also distinguish ERC-20 allowances from NFT operator approvals, which grant a different form of authority and must be revoked through their own mechanism.
For an actively used treasury, review allowances against current integrations and remove permissions that no longer serve a purpose. The next thing to watch is the confirmation and resulting allowance value for each revocation transaction.