Revoke
To revoke a token approval is to remove or reduce a previously granted spending allowance for a smart contract or address.
✦ Key Insight
Old approvals can remain active long after a user leaves an app. Revoking unnecessary permissions reduces the amount that an approved spender could access if the spender is malicious, compromised, or no longer trusted.
✕ Common Misconceptions
Revoking one approval does not revoke every permission, signature, session key, or approval on other chains. Check the correct token contract, spender, network, and wallet before assuming access has been removed.
Detailed Explanation
Aliases and acronyms: Revoke approval; token approval revocation; remove allowance; revoke allowance
Plain-English explanation: Revoking usually means submitting a blockchain transaction that changes an ERC-20 allowance, commonly to zero. This stops the approved spender from using that allowance for future transferFrom calls. It does not undo transactions that already happened.
Analogy: It is like cancelling a merchant's direct-debit authorization for future payments while leaving past payments unchanged.
How it works: A wallet or approval-management interface identifies existing allowances and sends a transaction to the token contract setting the selected spender's allowance to zero or a lower amount. Because this changes blockchain state, the user normally pays a network fee.
FAQs
Q: Does revoking return stolen tokens?
A: No. It only changes future spending permission. It cannot reverse an already confirmed transfer.
Q: Does revoking cost gas?
A: Usually yes on networks where changing an on-chain allowance requires a transaction.
Q: Should I revoke every approval immediately?
A: Not necessarily. Frequent revoking can add fees and inconvenience. Focus on unused, suspicious, or unnecessarily broad approvals and understand the app's requirements.
Sources
In Practice
Dig Deeper
Smart Contract
A smart contract is self-executing code stored on a blockchain that automatically performs actions when certain conditions are met.
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.
Signature
A cryptographic signature proves that the holder of a private key authorized specific data without revealing the private key itself.
