DEV Community

qanzhi111
qanzhi111

Posted on Edited on

Raydium lost $1.34M to a contract everyone had already forgotten

On June 10, 2026, someone drained $1.34M from Raydium.

The contracts they drained had been officially retired in 2021. The pools had no interface, no documentation, and no users. As far as most people knew, that code existed only as history.

It was still on-chain. Still callable. Still holding real money.

This is the full reconstruction of what happened and where the money went, based on ChainBounty's public forensic analysis published June 15.

Cartoon: a vault labelled RETIRED 2021 leaking coins that flow to nine wallets and end in a Tornado Cash funnel

Deprecation is not deactivation

Raydium migrated from its original AMM V3 program to CLMM years ago. When the migration finished, everyone stopped thinking about the old program. That is the normal human response to a successful migration.

But "we stopped using it" and "it stopped working" are two completely different statements. The V3 program remained deployed and executable. Five legacy liquidity pools still had assets sitting in them, untouched since the migration.

The bug was a missing check, not a brilliant exploit

Most DeFi exploits require something clever: a flash loan, an oracle manipulation, a reentrancy window of a few blocks. This one required reading the withdraw function.

The AMM V3 withdraw accepted an LP token as proof of pool ownership. It verified the token supply. It did not verify that the token's mint address actually belonged to the pool.

That is the whole vulnerability. One missing equality check.

So the attack looked like this:

  1. Create a brand new SPL token mint, completely unrelated to Raydium. Supply: one unit.
  2. Call the legacy withdraw function and pass in that fake mint.
  3. The contract checks: does the caller hold LP tokens of this mint? Yes, one out of one. That is 100% of supply.
  4. The contract concludes the caller owns 100% of the pool, and releases the entire reserve.
  5. Repeat against the other four legacy pools.

No flash loan. No governance attack. No private mempool race. Just a function that trusted an address it never validated, on a contract everyone had mentally deleted five years earlier.

Total extracted: $1.34M across five pools.

The money trail: structuring, then a peel chain

The primary attacker wallet drained the pools and converted 5,603 SOL into USDC through a DEX aggregator. Then it got creative.

$893,700 in USDC was split across nine intermediary wallets. The amounts were not random:

Amount Number of wallets
$93,690 7
$100,000 5
$319,996 1
$255,261 1
$191,797 1
$191,809 1
$191,652 1
$193,700 1
$127,815 1

This is textbook structuring. Split a large sum into many near-identical transfers, and any analyst working wallet by wallet has to reconstruct a graph instead of following a line. The whole point is to manufacture forensic noise.

It did not work, at least not against someone watching the cluster. Every one of those nine wallets reconverged at a single bridge hub within hours.

Which tells you what the peel chain actually was: not an attempt to hide the money but a laundering layer, a shape designed to look like normal activity.

Cross-chain, then Tornado

From the bridge hub, the funds moved from Solana to Ethereum.

  • 810 ETH went to Tornado Cash, roughly $1.26M, about 94% of the total.
  • 7 ETH went to FixedFloat, an exchange.

No exchange froze anything. The trail, once it enters Tornado, is effectively over.

But one detail survived

The attacker's operational wallet was funded through KuCoin.

KuCoin is a fully KYC'd exchange. That means there is a real identity behind the account that sent the first SOL. It also means there is a lawful path to it: a court order, or an MLAT request between jurisdictions, served on a compliant exchange.

Tornado Cash hides where the money went. It does not hide where the operation was funded from. That distinction is the whole reason the reconstruction is worth publishing. The laundering chain gets the headlines. The funding chain gets the arrest.

What this actually teaches

Every serious protocol migrates eventually. The migration is treated as a project with a finish line: users moved, TVL moved, the new contracts are live, ship it.

But migration is not complete when the new system works. It is complete when the old system cannot be used.

Concretely, that means one of three states for any retired contract that still holds or can move value:

  • Paused at the program level, where no instructions can execute.
  • Emptied, where the pools hold nothing worth attacking.
  • Removed, where it no longer exists.

Anything else is a live attack surface wearing a historical label. The five Raydium pools survived five years of nobody thinking about them, and they were drained in a single afternoon by someone who did.

Raydium's response was fast and complete: the treasury reimbursed affected LPs. That is the right thing to do after the fact. It does not change the structural lesson, which is that a deprecated contract with real assets inside is not legacy code. It is an unowned vault.

One more thing worth noticing

The exploit did not require the attacker to understand Raydium's architecture. It required them to read one function and notice what it did not check.

That is the shape of most of the money lost in this space. Not sophisticated cryptography broken by sophisticated attacks, but assumptions that everyone stopped re-reading because the code was old and the product had moved on.

If you maintain anything with a "legacy" prefix in its name, this is the week to check whether it can still move money.


Source: ChainBounty public forensic analysis, June 15, 2026. This write-up and 61 other case investigations are indexed at qanzhi111.github.io/intel.

Top comments (0)