ERC-20 Token Allowances: How Smart Contract Approvals Work and How to Revoke Them
Learn how the approve() function works, why unlimited allowances exist, and how malicious drainer phishing sites exploit approvals.
Prevent wallet draining: understand ERC-20 allowance mechanics, permit signatures (EIP-2612), and security best practices.
1. The ERC-20 approve() Function
DApps like Uniswap cannot withdraw tokens from your wallet without explicit authorization. The ERC-20 standard implements an allowance mapping: allowance[owner][spender].
To avoid asking users to pay gas for approvals on every individual trade, many frontends request unlimited approval (2^256 - 1 tokens). If that smart contract has a vulnerability or is malicious, your tokens can be swept.
Interactive Tools Related to this Article
Secure your crypto offline with Trezor Safe 5
Full open-source firmware, secure element protection, and intuitive touchscreen control. Never store your seed phrase on a phone or laptop.
Affiliate partner: BlockToolsHub may earn a small referral commission at no additional cost to you.