UNSWEEP › Guides
How to find and revoke ERC-20 token approvals
This guide is informational. Revoking an approval stops future spending; it does not bring back tokens already taken. We never ask for any key in chat, email or DM and we never write first. The only key a rescue uses is the one of the already-compromised wallet, typed by you on unsweep.com and used only inside your browser.
What an approval is
ERC-20 tokens let an owner authorize another address (the spender, usually a contract) to move up to a set amount of their tokens with transferFrom. The owner grants it with approve(spender, amount). The authorization, called an allowance, stays in force until it is used up or changed. Many apps ask for an "unlimited" amount (2256-1), so one approval can expose the whole balance of that token, now and in the future.
NFT collections (ERC-721 and ERC-1155) have a similar mechanism, setApprovalForAll(operator, true), which gives an operator control over every item of that collection.
Why it matters
- If a spender contract is malicious or later exploited, it can move approved tokens without asking you again.
- Phishing pages often ask for an approval instead of a transfer, because it looks harmless.
- Old approvals to apps you no longer use are unnecessary risk.
How to find open approvals (read-only)
- List
Approval(owner, spender, value)events whereowneris your address, or list your past transactions that callapprove(function selector0x095ea7b3). - For each token and spender pair, call
allowance(owner, spender)on the token contract. If the result is greater than 0, the approval is still open. - Check who the spender is in a block explorer: verified source, known app, deployment date.
Example of the read-only call (allowance selector is 0xdd62ed3e):
curl -s -X POST <RPC_URL> -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"to":"0xTOKEN","data":"0xdd62ed3e<owner padded to 32 bytes><spender padded to 32 bytes>"},"latest"]}'
The free read-only check on this site lists ERC-20 approvals granted by direct transactions in the last 90 days that are still open, on Base and Ethereum mainnet.
Limit: approvals can also be granted by off-chain signatures (permit-style messages) that someone else submits on-chain. Those do not appear in your own transaction history, so also review Approval events for your address if you suspect a malicious signature.
How to revoke
- From the owner wallet, call
approve(spender, 0)on the token contract. This sets the allowance to zero. - For NFT collections, call
setApprovalForAll(operator, false). - Many wallets and block explorers have a built-in approvals page that builds these transactions for you. Use the official site or app, typed by hand, never a link from a message.
- Each revocation is an on-chain transaction and costs gas.
- After revoking, call
allowanceagain to confirm it returns 0.
If the wallet is already compromised
- Revoking needs a signature from the compromised key, and the attacker holds the same key: they can approve again at any time.
- If a sweeper (a bot or an EIP-7702 delegation) is active, gas you send to pay for the revocation may be taken before you can use it.
- In that situation, revoking approvals is less important than stopping use of the wallet. See the compromised wallet checklist.
Good habits
- Approve only the amount a transaction needs when the app allows it.
- Review approvals every few months and revoke the ones you no longer use.
- Read what a signature request asks for before signing; treat "approve" and "permit" requests from unknown sites as red flags.
Last updated: 2026-11-26. Rescue is live on Base, Arbitrum and OP Mainnet. Ethereum: read-only check. See how to read the diagnostic and security & verification.
Before you start: trust facts
Sounds familiar? “My funds disappear as soon as they arrive” · “I can’t pay for gas because the ETH is taken instantly” · “My wallet was hacked and I can’t get my tokens out”.
- Open source: github.com/unsweep/unsweep. Rescue contract
0x38bcF425bC4d13624734e09376F2fafc799fA8c8, source verified on Sourcify (exact match): Base · Arbitrum · OP Mainnet · Basescan. - Which key, and where it goes: a rescue uses only the private key of the wallet that is already compromised, the one the attacker already has. Never your seed phrase and never the key of your new safe wallet. The key signs 100% inside your browser and is never sent to UNSWEEP or any server; only signatures are sent (see the exact signing code on GitHub). Check it yourself: open DevTools → Network before signing, and see the verified contract on Basescan. UNSWEEP never writes to you first.
- We never DM you: UNSWEEP never contacts anyone by DM, Telegram or Discord. Anyone who does is a scammer.
- Cost: free diagnostic, no upfront payment. Success fee only if the rescue executes, taken from the rescued tokens in the same transaction: 15% (<1,000 USD), 10% (1,000–10,000 USD), 5% (>10,000 USD); hard 15% maximum in the contract; shown in a simulation before you sign.
- Cannot rescue: funds already taken, NFTs, anything on Ethereum mainnet (read-only). Tokens outside the verified lists may be detected without guarantee. Nothing is guaranteed.