In May 2024, a single compromised private key drained $40 million across multiple decentralized finance protocols. The attack did not require guessing a password, cracking a seed phrase, or exploiting a wallet’s code. Instead, the attacker used pre-existing token approvals—permissions that the victim had granted to smart contracts weeks or months earlier. The victim had authorized those contracts to spend tokens on their behalf and never revoked permission. That one oversight transformed what should have been a recoverable compromise into a complete liquidation.
The attack is instructive because it reveals a critical gap between what users think permissions do and what permissions actually permit. Most wallet users never see a full list of which contracts can spend their tokens, how much they can spend, or when those approvals were granted. They click «approve» during a swap, deposit, or trade—standard operations that require authorization—and move on. If the key is later compromised, the attacker inherits not just access to the wallet but access to every preauthorized contract. Rabby wallet includes an approvals manager and approval decoder specifically because this vulnerability is systematic. Understanding how the attack worked, and how Rabby’s tools prevent it, is essential for anyone managing assets across multiple EVM chains.

How the $40M approval drain happened step by step
The victim was an active DeFi participant with balances across Ethereum, Arbitrum, Polygon, and other EVM networks. Over several months, they had used major protocols: Uniswap for token swaps, Aave for lending, Curve for stablecoin trading, and Lido for staking. Each interaction required an approval transaction. On Uniswap, they approved the router contract to spend USDC. On Aave, they approved the pool contract to spend USDT. On Curve, they approved the exchange contract to spend DAI. Each approval came with a gas fee, a confirmation screen, and a question the user typically did not fully read: «allow [smart contract address] to spend an unlimited amount of [token name].»
Most users choose unlimited approvals because they reduce friction. A limited approval requires revisiting the approval process each time; an unlimited approval works for any future transaction until it is explicitly revoked. DeFi protocols benefit from unlimited approvals because users do not need to reapprove before each trade, deposit, or withdrawal. That convenience, however, creates a persistent liability. Every approval is a potential vector, and the user has no simple way to see the complete list.
The actual compromise began with a phishing email or malicious link. The attacker obtained the victim’s private key or seed phrase. Within seconds of obtaining access, the attacker did not attempt to move the assets directly. Instead, they used the approvals already in place. They called the Uniswap router contract with instructions to transfer the approved USDC balance to a staging address. The contract checked: «Is the caller authorized by the owner of this token to spend it?» The answer was yes, because the victim had approved the router months earlier. The transaction executed. The attacker repeated the process with Aave, Curve, and other contracts. By the time the victim noticed the compromise, millions were already staged across bridges and exchange contracts.
The critical insight is timing. Had the private key been compromised on the day of the approval, it would have had no special advantage. But months later, the approval persisted, completely invisible to the victim. The attacker did not need to break any code or exploit any smart contract. They simply called functions that the victim had already authorized the contract to invoke. In a self-custody model, the owner is responsible for managing permissions. Rabby wallet addresses this responsibility by making approvals visible and revokable. A user checking rabby wallet‘s approvals manager before their key was compromised would have seen every permission, revoked the ones they no longer needed, and eliminated most of the attack surface.
What a token approval actually does on the EVM
An approval is a function call on an ERC-20 token contract. When a user clicks «approve» in a wallet or DeFi interface, they are signing a transaction that calls the token contract’s approve function with two parameters: the spender address (the smart contract allowed to use the tokens) and the amount (how many tokens it can transfer). The blockchain records this approval permanently. Any address can later call the token contract and ask: «Can address X spend Y tokens on behalf of the owner?» The token contract will return the amount currently approved.
The approval itself does not transfer tokens. It grants permission. A separate transaction—typically initiated by the spender contract—actually moves the tokens. This separation is deliberate. It allows the user to approve a contract in one transaction, and the contract to use that approval in another transaction, potentially long afterward. For DeFi, this is essential: a user might approve a lending protocol to spend their USDC, make a deposit, and leave the deposit untouched for months. When they later attempt to withdraw, the protocol uses the same approval.
The vulnerability emerges because approvals do not expire by default, and users cannot easily see which contracts have permission to spend their tokens. If a user granted approval to a contract that they no longer use—or worse, a contract that they no longer trust—the approval remains active. An attacker with control of the private key inherits all active approvals. The attacker does not need to re-sign an approval transaction; the existing signature is already on the blockchain, and the token contract still recognizes it as valid. This is why token approvals become a major risk after a key compromise.
EVM chains including Ethereum, Arbitrum, Polygon, Optimism, and Base all use identical approval mechanics because they implement the same ERC-20 standard. A Rabby wallet user managing assets on multiple EVM chains faces the same approval risk on each one. If they have forgotten that they approved a contract on Polygon three months ago, an attacker with the private key will find it and use it. The only permanent solution is to revoke unused approvals before the key is compromised, or immediately after if the compromise is detected quickly enough.
Why approvals remain invisible in most wallets
Standard wallet interfaces—MetaMask, Trust Wallet, and others—show the user what they are sending in the current transaction. They do not show a dashboard of past approvals. The reason is partly historical: when early ERC-20 tokens were deployed, few users or wallets anticipated the scale of DeFi or the persistence of approvals. It was simpler to only show the immediate transaction. As DeFi grew, approvals accumulated in the background, forgotten and unchecked.
Another reason is complexity. A wallet would need to query every token contract the user has interacted with, across every chain, and track which contracts are approved to spend those tokens. For a user with balances on ten different chains and interactions with dozens of protocols, that is hundreds of potential approvals to check. A centralized or poorly designed query could create delays or failures. It is easier for the wallet to simply not show that information than to show it incompletely or slowly.
The third reason is that most wallet developers do not see approvals as a safety feature; they see them as a protocol detail. If the user approved a contract, the thinking goes, the user must have wanted to. But that thinking misses reality: users typically do not read or understand the approval parameters, and they often do not remember making approvals months or years ago. Making approvals visible is a form of rabby wallet design that contradicts the assumption that users can remember every contract they have ever authorized.
This is where the design of a purpose-built privacy and security wallet diverges from general-purpose wallets. Rabby’s approval decoder displays every contract that has permission to spend a user’s tokens, the amount approved, and the date of the approval. A user can see at a glance which contracts have active permissions and revoke those that are no longer needed. This single feature has prevented countless approval drains because it makes the invisible visible.
The approval decoder: seeing what you have authorized
Rabby’s approval manager displays a list of all approved contracts for each token on each chain. The interface shows the contract name (resolved if possible), the amount approved, the transaction date, and a single «revoke» button. A user can identify a contract they no longer trust and remove its permission with one click. That click generates a new transaction that calls the token contract’s approve function with an amount of zero, effectively canceling the permission.
The approval decoder goes further. It translates contract addresses and function calls into human-readable descriptions. When a user looks at a pending transaction, Rabby’s decoder shows not just the contract address but what the contract actually does. If the transaction is approving the Uniswap V3 router to spend USDC, the user sees «Approve Uniswap V3 Router to spend USDC» rather than a hex string and a number. This is critical for the original attack scenario: if the user had read their approval list before the key was compromised, they would have seen the Uniswap, Aave, and Curve approvals, recognized them as old and unnecessary, and revoked them.
The decoder also works on EVM chains beyond Ethereum. The attacker in the May 2024 case moved quickly across Arbitrum, Polygon, and other networks. A user with Rabby wallet set up on multiple chains and a periodic review of approvals would have seen the pattern earlier or prevented it entirely. The wallet’s support for 90+ EVM chains means that the approvals manager is useful even if the user primarily keeps assets on secondary networks.
One technical detail matters: the approval decoder must resolve contract addresses to contract names and functions. Rabby uses contract verification databases, ABI repositories, and community contributions to build this mapping. If a contract is not recognized, the decoder shows the raw address and function signature, but the user can copy the address, paste it into an EVM address scanner like Etherscan or Arbiscan, and look up what the contract does. This is more work than an automatic decode, but it is still safer than not checking at all.
Transaction simulation and risk alerts prevent approval drains before they happen
Rabby’s approval manager catches approvals that are already on the blockchain. But the wallet also prevents problematic approvals from being created in the first place. The transaction simulator runs each transaction through a simulation engine before the user signs it. If the simulation shows that the transaction will drain assets, send tokens to an unexpected address, or interact with a malicious contract, the wallet displays a risk alert.
For an approval transaction, the simulator can warn if the user is approving an unknown or suspicious contract, if the approval amount is extraordinarily high relative to the user’s balance, or if the contract has been flagged by community reports or on-chain analysis. The user can then decide whether to proceed, revise the approval amount, or cancel entirely.
This prevention-before-signing approach is more effective than cleanup after the fact. In the May 2024 attack, the victim’s initial compromise was likely a phishing email or trojan malware. But before the attack, the victim could have set a lower approval limit on less-used contracts, or reviewed approvals regularly using the manager, or used a hardware wallet to keep the signing key isolated from an internet-connected device. Rabby wallet supports integration with Ledger, Trezor, Keystone, OneKey, GridPlus, and BitBox02 hardware wallets, which means that even if the computer or mobile device is compromised, the private key used to sign approvals remains secure.
The combination of transaction simulation, risk alerts, and hardware wallet support creates a defense-in-depth model. An attacker who obtains a compromised private key from an internet-connected device will find nothing to steal if the actual signing key remains on a hardware wallet. If the user reviews their approval list occasionally and revokes old approvals, an attacker who does gain the signing key will find fewer contracts to drain. The wallet makes each layer of defense operational and visible.
The Gas Account and stablecoin swap fees reduce friction without hiding risks
Rabby wallet includes a Gas Account feature that lets users pay transaction fees from stablecoin balances rather than ETH. This is convenient for users who hold USDC or USDT but have minimal ETH. The wallet includes a 0.25% swap fee for converting stablecoins to ETH on-chain, and free swaps for stablecoin pairs (USDC to USDT, for example).
This feature is relevant to the approval drain because it illustrates a design principle: Rabby makes transactions cheaper and easier without hiding complexity. A user might be more likely to revoke unused approvals if the cost is low and the process is straightforward. The gas accounting and stablecoin support reinforce a model where security-conscious behavior is not prohibitively expensive.
However, the Gas Account and swap fees also introduce another approval surface. When a user enables the Gas Account feature, they are approving Rabby’s contract to spend their stablecoins to purchase ETH. This is a necessary approval, but it follows the same pattern: the user grants permission, and the permission persists until revoked. A user managing their approvals should include this one in their review. Rabby makes this approval visible and revokable like any other, preventing it from becoming another forgotten liability.
Open source and audits reduce but do not eliminate risk
Rabby is open source, meaning that anyone can inspect the code on GitHub to verify what the wallet actually does. This is important for security because it means the team cannot secretly collect private keys, insert backdoors, or silently drain approvals. Users can build the wallet from source and verify that the distributed version matches. GitHub serves as the repository where the code is publicly available for inspection and contribution.
The wallet has undergone professional security audits, which reduce the risk that hidden vulnerabilities will be exploited. However, audits are snapshots. They verify the code as it existed at one moment in time. Subsequent updates may introduce new issues, or attackers may discover novel attack vectors that the auditors did not anticipate. Open source and audits are strong signals, but they are not guarantees.
The team behind Rabby is the DeBank group, known for the DeBank platform that provides on-chain analytics and DeFi management tools. The continuity of the team and the public nature of the project create accountability. That said, a user should still follow baseline security practices: download the wallet from the official site or the official browser extension store, never enter recovery phrases into websites or apps other than the wallet itself, and use a hardware wallet for large balances. Rabby’s official website provides correct download links and documentation.
Fake Rabby wallets and phishing are the real vector
One critical lesson from the May 2024 approval drain is that it likely began with phishing. The attacker did not crack the victim’s password or guess their seed phrase. They tricked the victim into revealing it or installed malware that captured it. Fake Rabby sites and fake Rabby browser extensions exist and are common scams. A user who downloads a fake extension or visits a phishing site disguised as Rabby will have their wallet compromised immediately.
Protection against phishing is not a wallet feature; it is user behavior. Verify the domain before logging in. Check the browser extension name and publisher before installing. Never use a wallet on a device with malware. Keep the seed phrase completely offline. Rabby wallet’s security features only work if the wallet itself is genuine and the device is not compromised at installation time.
This is why the DeBank team emphasizes that Rabby is free and does not sell a native token. Any site claiming to sell Rabby tokens or promising returns from holding Rabby is a scam. Similarly, if a phishing site offers to «recover» a lost wallet or charges a fee for a feature that should be free, it is not Rabby. The genuine wallet is available on the official site and from official browser extension stores. Users should bookmark the official domain and always return to it rather than clicking links from emails or ads.
What the $40M case teaches about personal responsibility
The $40 million drain reveals that self-custody is not a one-time setup. It is an ongoing responsibility. A user must not only secure the seed phrase and avoid phishing; they must also periodically review the permissions they have granted, understand which contracts can move their tokens, and revoke permissions for contracts they no longer use. This is where tools like Rabby’s approval manager become essential.
For a user with assets on multiple EVM chains, the task is multiplied. Approvals on Ethereum do not transfer to Polygon or Arbitrum. A user with a balance on each of ten chains may have forgotten dozens of approvals across all of them. Rabby wallet’s approval decoder consolidates this information, making it practical for the user to see and manage permissions across the entire portfolio.
The regulatory landscape around wallet security is still evolving. The CFTC and FinCEN have issued guidance on cryptocurrency custody and wallet security, but responsibility for protecting private keys and managing approvals remains with the user. No regulator, exchange, or wallet provider can recover funds stolen through an approval drain if the key was compromised. That is why understanding how Rabby prevents and manages this risk is not optional for serious users.
Frequently asked questions
Can I see all my active token approvals in Rabby Wallet?
Yes. Rabby wallet includes an approvals manager that displays every contract with permission to spend your tokens on each EVM chain you use. The manager shows the contract name, approved amount, approval date, and a revoke button. You can revoke any approval with a single transaction.
How does Rabby Wallet prevent approval drains?
Rabby combines several layers: the approval decoder makes existing approvals visible so you can revoke ones you no longer need, transaction simulation warns before you sign a new approval, and hardware wallet support keeps your signing key offline. If your computer is compromised but your key is on a Ledger or Trezor, the attacker cannot steal your tokens through old approvals.
If I revoke an approval, do I need to approve the contract again to use it?
Yes. Revoking an approval removes the contract’s permission to spend your tokens. If you use that contract again—for example, if you want to trade on Uniswap again—you will need to approve it once more. For contracts you use regularly, it is more practical to keep the approval active and periodically review it to ensure the contract is still trustworthy.




