Sub topic 14
Limiting Losses and Responding to a Bad Interaction
This chapter covers the last step of the plan: what to do when a check fails, when you have already interacted with a bad contract, or when you want to cap the damage before it happens. It assumes you can read a block explorer page, know what an ERC-20 approval is, and have run through the due-diligence checklist from the previous chapter. It is educational and not financial advice.
The Working Model: Two Kinds of Loss
A bad interaction can cost you in two different ways, and the response differs for each.
- Loss of the tokens you bought. The token is a honeypot, the liquidity is pulled, or the price collapses. You cannot undo this. The only control is how much you put in.
- Loss of wallet permissions. You signed an approval or a signature that lets another address move your other assets. This is still open after the interaction ends, and you can often close it.
Most of the harm in drainer incidents comes from the second kind. A user loses a small test purchase, then loses everything else in the wallet because an approval stayed active for months. Responding quickly to the second kind is the main skill in this chapter.
Limiting Losses Before Anything Goes Wrong
Prevention costs less than response. Four habits do most of the work.
Size positions for total loss
Treat any new token as something that can go to zero. Pick a maximum per token before you look at the chart, such as 0.5% to 1% of your crypto holdings. Write it down. The number matters less than having decided it while calm, because urgency tactics work on people who have not decided.
Separate wallets by role
Use at least three wallets with different jobs.
| Wallet | Holds | Used for |
|---|---|---|
| Vault | Long-term assets | Almost nothing. Never connects to unknown sites. |
| Daily | Working funds | Established applications you have already vetted. |
| Burner | Only what you can lose | New launches, claim pages, mints. |
The burner wallet limits what a drainer can see and take. An approval granted from the burner can only reach what the burner holds. Fund it per attempt, and move proceeds out afterward through a transfer you initiate, not through a site.
Test with a small transaction first
For a new token, buy a tiny amount and then sell part of it. A honeypot lets you buy but blocks selling. A small round trip costs a little in fees and tax, and it tests the exact path you care about. It is not proof of safety. The owner can change a tax or blacklist your address after your test, as the RiskyToken example earlier in the tutorial shows. Treat the test as one filter, not a verdict.
Use a hardware wallet and read what you sign
A hardware wallet keeps your key off the computer, but it signs whatever you approve. The protection comes from reading the request. Check these fields before you confirm:
- The spender or recipient address.
- The amount. An "unlimited" approval is the maximum 256-bit value, shown as a very large number.
- The network and the contract you are calling.
- For signatures, the type of data. A request for a permit or a typed-data order is not a harmless "login."
Finding and Revoking Approvals
An ERC-20 approval is stored on the token contract as a mapping from your address and a spender to an allowance. It stays valid until you change it. Closing the website does nothing.
To audit your approvals, use a revocation tool such as Revoke.cash, or the token approval checker on a block explorer such as Etherscan. Connect in read-only fashion where possible, or paste your address to view without signing. Look for:
- Spenders you do not recognize.
- Unlimited allowances to contracts of sites you visited once.
- Approvals on tokens you no longer hold. These are less urgent, but the spender can still take any future balance.
Revoking sends an on-chain transaction, so it needs gas in the same wallet. If a drainer is watching the wallet and you hold only the token and no native coin, you may have to send a small amount of gas first. Be aware that some drainers sweep native coin the moment it arrives, so do this quickly and from a wallet you still control.
You can also revoke with a script. Setting an allowance to zero removes the spender's permission.
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider);
const abi = ["function approve(address spender, uint256 amount) returns (bool)"];
const token = new ethers.Contract(process.env.TOKEN_ADDRESS, abi, wallet);
// Setting the allowance to zero revokes the spender's permission to move this token.
const tx = await token.approve(process.env.SPENDER_ADDRESS, 0n);
await tx.wait();
console.log("revoked in tx", tx.hash);What revoking cannot fix
Revocation closes the permission. It does not return tokens already moved. It also does not cover every case:
- Off-chain signatures. A signed permit or marketplace order is not an on-chain approval until someone submits it. Permits have a deadline, and some can be cancelled by using the nonce, but you often cannot revoke them from an approval list. If you signed one, move the assets to a new address before the attacker submits it.
- NFT and "approve for all" permissions. These use a separate call (
setApprovalForAll). Check for them as well as ERC-20 allowances. - Exposed keys. If your seed phrase or private key was typed into a site or shared, every address from that phrase is compromised. Revoking from the same key is a race you may lose.
Responding to a Bad Interaction
Work in this order. The sequence matters because each step protects the next.
- Stop interacting. Close the tab. Do not return to the site to "fix" the claim or try again.
- Decide what was exposed. Was it a transaction you signed, a message signature, or a seed phrase? Check the wallet's history on a block explorer to see what the site actually sent.
- Move high-value assets first. If a key or seed phrase is exposed, create a new wallet on a clean device with a new seed phrase and transfer the most valuable assets first. Pay the gas. Do not reuse the old phrase for anything.
- Revoke approvals. For a wallet whose key is still safe, revoke the suspicious spender and any unlimited allowances.
- Check other places the key works. The same seed phrase controls the same address on other EVM networks. Check approvals on each chain you used.
- Record the evidence. Save the site address, the contract address, the transaction hashes, and the time. Take screenshots.
- Report. Report the site to the browser's phishing report, the hosting provider, and the explorer's label request form. Reporting loss to local authorities or a national fraud agency may help, although recovery of funds is rare.
A worked example
You claim an "airdrop" from a site and later notice a token you hold is missing.
- On the explorer, open your address and the transaction list. You find an
approvecall to an unknown spender with the maximum value, then atransferFromthat moved your tokens. - The key was never typed anywhere, so a new wallet is not required. The risk is the open allowance.
- You open an approval checker, find the same spender on two other tokens, and revoke both. You also check two other networks and find nothing.
- You record the transaction hashes and report the domain.
The cost was one token. Because the allowances were closed within the hour, the remaining tokens were safe.
Common Mistakes
- Revoking only the token you noticed. Drainers request approvals on many tokens at once. Audit all of them.
- Paying "recovery" services. Messages that promise to retrieve stolen funds for a fee are a second scam aimed at people who were already hit. Block explorers and chains do not reverse transactions.
- Trusting a fix from a stranger. After a loss, people who contact you first on social media offering help are not neutral. Use only tools you find yourself.
- Selling in a panic without checking. If the token is a honeypot, sell attempts fail and burn gas. If it is a legitimate dip, selling locks in the loss. Check the contract and liquidity before deciding.
- Skipping the record. Without hashes and addresses, reports are less useful and you cannot tell later what was exposed.
Keeping a Log
After each incident, or near miss, write down what triggered it, which red flag you missed, and which check would have caught it. Add that check to your checklist. This turns a bad interaction into an improvement to the process rather than only a loss.
Exercise
You connected your daily wallet to a claim site and signed a transaction. The explorer shows an approve call with the maximum value to an unknown address on token X. You never entered a seed phrase. List the steps you take, in order, and say why you do not need to create a new wallet.
Show answer
Stop using the site. Confirm on the explorer what was signed. Check the approvals list for all tokens and chains, and revoke the unknown spender, starting with token X and any other unlimited allowances. Keep a little native coin for gas. Record the transaction hashes and the domain, and report the site. A new wallet is not required because the key was not exposed. The attacker holds an allowance, not your key, and revoking the allowance removes their access to future movement of those tokens.
Exercise
A buyer tests a new token by buying a small amount and selling half of it successfully, then invests a large amount. Later the sell fails. Give two ways this can happen and one habit that would have reduced the loss.
Show answer
The owner can raise the sell tax above 10,000 basis points so sells revert, or add the buyer's address to a blacklist, after the test. The contract may also be an upgradeable proxy whose code was swapped. A habit that limits the loss is capping the position size at an amount you can lose entirely, and checking owner powers and proxy status before buying, since a successful test sale only shows the state at that moment.