How to Revoke Smart Contract Allowances in MetaMask: A Step-by-Step Guide
The safest way to stop a smart contract from spending your tokens is to revoke its allowance - the permission you previously gave it. In MetaMask, you do this by sending a transaction that sets the allowance to zero. This page walks you through that process for Ethereum and compatible networks.
Why you need to revoke allowances
When you approve a token for a DeFi app or NFT marketplace, you give that contract permission to spend a specific amount of that token from your wallet. That allowance remains active until you revoke it. If the contract turns out to be malicious or gets compromised, it can drain those tokens - even if you no longer use the app.
Revoking unused allowances is a basic hygiene step, similar to closing old bank accounts you don't use anymore.
What you need before starting
- MetaMask installed and connected to the network where the allowance exists (Ethereum mainnet, Arbitrum, Polygon, etc.)
- Enough native currency (ETH, MATIC, etc.) to pay gas for the revocation transaction
- The token contract address of the token whose allowance you want to revoke
- The spender contract address (the app you approved)
Step-by-Step: revoke using a block explorer
This method works on any network and does not require a separate tool.
Step 1: Find the Allowance You Want to Revoke
- Open Etherscan (or the equivalent block explorer for your network - e.g., Polygonscan for Polygon).
- Enter your wallet address in the search bar.
- Click the Token Approvals tab (some explorers call it ERC20 Token Txns or Approvals).
- You will see a list of tokens and the contracts they are approved for. Note the Token Contract Address and the Spender Address for the allowance you want to revoke.
Step 2: Get the Revocation Function Data
You need to call the approve function of the token contract, setting the spender's allowance to zero. The easiest way is to use the block explorer's Write Contract feature.
- On the token's contract page in the block explorer, click Contract then Write Contract.
- Connect MetaMask by clicking Connect to Web3 (if prompted).
- Find the approve function. It usually asks for two inputs:
spender(address): Paste the spender contract address you noted.amount(uint256): Enter0(zero).
Step 3: Submit the Transaction
- Click Write to trigger the transaction.
- MetaMask will open a window showing the transaction details. Read the warning carefully. It will say something like "You are interacting with a contract at [token address]." This is normal - you are calling the token contract, not the spender.
- Confirm the transaction.
- Wait for it to be mined. Once confirmed, the allowance is revoked.
Step-by-Step: revoke using a dedicated tool
Several free tools exist that simplify the process. They use the same underlying method but present a cleaner interface.
Step 1: Visit a Reputable Revocation Tool
Common options include Revoke.cash or Etherscan's Token Approval Checker. Always verify the URL - phishing sites look similar.
Step 2: connect your wallet
Click Connect Wallet and select MetaMask. The tool will scan the connected wallet's allowances.
Step 3: Select Allowances to Revoke
You will see a table of approved contracts and tokens. Check the ones you want to revoke, or use the Revoke All option if you want to clear everything. Be cautious: revoking an allowance for a contract you still actively use will break your ability to trade, stake, or otherwise interact with it until you approve again.
Step 4: Confirm the Transactions
Each revocation is a separate transaction. MetaMask will prompt you to confirm each one. You pay gas for each transaction, so revoking many allowances at once can be expensive on congested networks.
What happens after revocation
- The spender contract can no longer move that token from your wallet.
- If you want to use the app again, you must submit a new approval transaction.
- Revoking does not affect tokens you already hold - only the permission to spend them.
Common mistakes to avoid
- Revoking the wrong contract. Double-check that the spender address matches the app you intended to revoke.
- Not having enough gas. A revocation fails if your wallet lacks native currency. Top up before starting.
- Revoking allowances for active DeFi positions. If you have funds in a liquidity pool or a lending protocol, revoking the allowance for that protocol will prevent you from withdrawing or managing those funds until you re-approve.
- Using a fake revocation site. Only use well-known, verified tools. Bookmark the real URL.
When to Revoke
- Immediately after you finish using a new DeFi app.
- Periodically (e.g., every few months) as a routine check.
- If you suspect your wallet has been compromised, revoke all allowances as part of your response.
What this does not protect against
Revoking allowances stops future token transfers initiated by the spender. It does not protect against:
- Phishing signatures that directly drain ETH or native gas tokens (those do not require token allowances).
- Seed phrase theft (if someone has your seed phrase, allowances are irrelevant).
- Draining by a malicious dApp you are currently interacting with (revoking after the fact won't undo a transaction you already signed).
For broader wallet security, combine allowance management with the advice covered elsewhere on this site, such as avoiding blind signing and using a hardware wallet.
Not financial advice. 4547onsol.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.