Decentralized Finance
The DeFi Wallet Separation Rule
Every time you use a DeFi protocol, you typically grant it a standing permission, called a token approval, to move a specific token from your wallet whenever the contract’s code tells it to. That permission doesn’t expire when you close the browser tab or stop using the protocol. It sits active in your wallet indefinitely, until you manually revoke it, which means a protocol you tried once, years ago, and forgot about can still become a live threat to your funds the moment that protocol is hacked. The practical response to this, sometimes called wallet separation, is to keep a small, disposable wallet for experimenting with DeFi protocols and a separate wallet, one that never grants approvals or connects to smart contracts, for anything you actually want to keep safe.
Two real incidents show exactly why this separation matters: one where old, forgotten approvals let a single protocol bug drain wallets that hadn’t done anything that day, and another where a hacked website tricked visitors into signing a new approval without realizing what they’d agreed to.
Key Facts
| Incident | Detail | Source |
|---|---|---|
| Transit Swap exploit | Roughly $21-29 million drained from user wallets on October 1-2, 2022, after attackers exploited a bug that let them use existing token approvals to pull funds directly, without any new action from affected users | Halborn, “Explained: The Transit Swap Hack” |
| Who was actually at risk | Revoke.cash, a tool for tracking and canceling token approvals, stated plainly: “Any wallets with active approvals to these smart contracts are at risk” | Revoke.cash, “2022 Transit Swap Hack: Check If You’re Affected” |
| Partial recovery | Approximately 70% of the stolen funds, around $18-19 million, was returned by the attacker after security firms traced the hacker’s identifying information | The Block, “Hacker returns 70% of $21 million taken from Transit Swap DEX” |
| Curve Finance frontend hijack | On August 9, 2022, attackers compromised Curve Finance’s website through a DNS hijack and injected malicious code that requested unauthorized approvals from visitors, stealing over $500,000 | Revoke.cash, “Approval Hacks & Exploits” |
TL;DR
- A token approval is a standing authorization, not a one-time transaction. It remains active in your wallet until you manually revoke it, regardless of how long ago you granted it or whether you still use that protocol.
- Transit Swap’s October 2022 exploit drained wallets purely because those wallets had approved its contract at some point in the past. No new action from the victim was required at the moment of the theft.
- Even a legitimate, trusted website can become a threat: Curve Finance’s own site was hijacked in August 2022 and used to trick visitors into signing new malicious approvals, showing that trusting a protocol’s reputation isn’t enough protection at the moment you’re asked to sign.
- The practical defense is separating wallets by purpose: a small, disposable wallet for actively experimenting with DeFi protocols, and a separate wallet that never interacts with smart contracts, holding anything you can’t afford to lose.
- This separation doesn’t require avoiding DeFi. It requires making sure that whatever goes wrong with any single protocol can only ever affect the specific, limited amount of funds you deliberately exposed to it.
Why a Token Approval Doesn’t Work Like a Purchase
When you swap tokens, provide liquidity, or stake assets on a DeFi protocol, the underlying smart contract usually can’t move your tokens on its own. First, you have to grant it permission through a separate approval transaction, authorizing the contract to transfer up to a certain amount, often set to unlimited by default for convenience, of a specific token from your wallet whenever it needs to. That authorization isn’t a single, self-contained event. It’s a standing instruction recorded on-chain that remains valid indefinitely, completely independent of whether you ever use the protocol again.
This is fundamentally different from how most people intuitively think about a DeFi interaction. Swapping a token feels like a single transaction, the same way buying something with a credit card feels complete once the charge goes through. An approval works more like handing someone a permanent, unlimited-amount blank check tied to a specific account, one that stays valid until you specifically go back and cancel it.
Transit Swap: When an Old Approval Became a Live Threat
Transit Swap was a cross-chain decentralized exchange aggregator. On October 1-2, 2022, attackers discovered a flaw in its swap contract that failed to properly validate certain transaction parameters, letting them specify an arbitrary source address for a token transfer. Because so many users had, at some point, granted Transit Swap’s contract approval to move their tokens, the attacker was able to use that flaw to pull funds directly out of any wallet with an active approval, whether or not that wallet’s owner had touched the platform recently. Roughly $21 to $29 million was drained across Ethereum and BNB Chain before Transit Swap suspended the affected contracts.
Revoke.cash, a widely used tool that lets users see and cancel their outstanding approvals, described the risk in the plainest possible terms after the exploit: any wallet with an active approval to the compromised contracts was at risk, regardless of when that approval had been granted or how the wallet’s owner had used the protocol in the past. Security firms including SlowMist, PeckShield, and Bitrace ultimately helped trace enough information about the attacker that roughly 70% of the stolen funds were returned, but that recovery was far from guaranteed and depended entirely on the attacker’s choice to cooperate rather than any built-in protection.
Curve Finance: When the Website Itself Became the Attack
Transit Swap shows what happens when a protocol’s own code fails. Curve Finance’s August 2022 incident shows a different threat entirely: even a protocol’s official, trusted website can be compromised without the underlying smart contracts being flawed at all. Attackers used a DNS hijack, redirecting Curve’s domain to a malicious version of the site, and injected code that requested new, unauthorized approvals from anyone who connected their wallet and interacted with the page that day. Users who believed they were simply using a familiar, reputable platform instead signed approvals that let attackers drain over $500,000.
This case matters because it removes the usual assumption that “sticking to well-known, audited protocols” is sufficient protection. The Curve Finance smart contracts themselves were never compromised. The point of failure was the website interface layer sitting between the user and those contracts, precisely the moment where a wallet is asked to sign something.
The Wallet Separation Rule, Explained
Both cases point to the same practical conclusion: the risk from any single DeFi interaction isn’t contained to that interaction. It extends to the full balance of whatever wallet granted the approval, for as long as that approval stays active, regardless of the specific cause of a later compromise. The wallet separation rule addresses this directly by drawing a hard line between two categories of wallet.
A hot or experimental wallet is used specifically for trying new protocols, active trading, or anything that requires granting approvals to smart contracts. It should hold only the amount of funds you are genuinely prepared to lose entirely, since any protocol it has ever interacted with represents an ongoing, indefinite exposure. A vault or holding wallet, by contrast, never connects to a DeFi protocol, never signs an approval, and ideally never interacts with anything beyond simple, direct transfers. Because it has no outstanding approvals to any contract, it isn’t exposed to a hack like Transit Swap’s or a frontend compromise like Curve’s, regardless of what happens elsewhere in the DeFi ecosystem.
Comparison: Single-Wallet Use vs. Wallet Separation
| Single Wallet for Everything | Separated Wallets | |
|---|---|---|
| Exposure from a protocol hack like Transit Swap’s | Full wallet balance, including long-term savings | Limited to whatever is held in the dedicated experimental wallet |
| Exposure from a frontend hijack like Curve’s | Full wallet balance, if you interact with the compromised site using that wallet | None for the vault wallet, since it never interacts with DeFi sites |
| Convenience | Slightly simpler day-to-day management | Requires maintaining and tracking two or more wallets |
| Risk from forgotten, unrevoked approvals | Compounds over time as more protocols are tried, all against the same balance | Contained entirely within the experimental wallet’s limited funds |
Practical Guidance
- Create a dedicated wallet used only for DeFi experimentation, funded with an amount you’re fully prepared to lose, and never move long-term savings into it, even temporarily.
- Keep a separate wallet for holdings you care about, and treat any request from that wallet to sign a smart contract interaction as a signal to stop and reconsider.
- Periodically review and revoke outstanding token approvals using a reputable tool built for that purpose, treating this as routine maintenance rather than a one-time setup step.
- Before connecting any wallet to a website, verify the URL carefully, since both Transit Swap and Curve’s incidents show that neither an official-looking site nor a well-known protocol name guarantees safety at the exact moment you’re asked to sign something.
- Remember that an approval’s risk doesn’t disappear when you stop using a protocol. It disappears only when you actively revoke it.
What Happens Next
Expect wallet interfaces to keep adding clearer approval-management features, including built-in prompts to review and revoke old permissions, as awareness of incidents like Transit Swap’s spreads. Expect frontend-level attacks like Curve’s to remain an ongoing risk as well, since DNS hijacking and website compromises target infrastructure outside a protocol’s own smart contract security, an area no amount of contract auditing can fully address. Until wallet software makes approval hygiene closer to automatic, the practical burden of separating experimental funds from meaningful savings will remain on individual users.
FAQs
Does a token approval expire automatically after I use a DeFi protocol once? No. An approval remains active indefinitely until you manually revoke it, regardless of how long ago you granted it or whether you’ve used the protocol since.
How did Transit Swap’s hack affect wallets that weren’t actively trading that day? The attacker exploited a flaw that let them use existing, previously granted approvals to pull funds directly, meaning any wallet with an active approval to Transit Swap’s contract was exposed regardless of recent activity.
Can a trusted, well-known protocol’s website still be dangerous? Yes. Curve Finance’s official site was hijacked via a DNS attack in August 2022, and visitors who connected their wallets were tricked into signing malicious approvals, despite Curve’s underlying smart contracts never being compromised.
What’s the simplest way to reduce this risk without avoiding DeFi entirely? Use a separate, dedicated wallet funded only with what you’re prepared to risk for DeFi activity, and keep long-term holdings in a wallet that never grants approvals or connects to smart contracts.
Sources
- Halborn, “Explained: The Transit Swap Hack (October 2022)”
- Revoke.cash, “2022 Transit Swap Hack: Check If You’re Affected”
- The Block, “Hacker returns 70% of $21 million taken from Transit Swap DEX”
- Revoke.cash, “Approval Hacks & Exploits”
This article is for educational purposes and does not constitute financial or legal advice. Interacting with DeFi protocols carries risk of partial or total loss of funds through smart contract vulnerabilities, compromised interfaces, or outstanding token approvals. If you are making decisions about participating in DeFi protocols, consider consulting a licensed financial advisor.