StableMagnet Rug Pull
What happened
StableMagnet was a deliberate rug pull on BNB Chain on June 23, 2021. The operators drained roughly $27 million in stablecoins from protocol pools and wallets that had granted StableMagnet token approvals. Greater Manchester Police later recovered about $22.25 million in crypto assets.
Linked-library bytecode was not independently verified, allowing a malicious library with administrator withdrawal and approval-drain logic to execute. The incident shows why source verification must include deployed library addresses and bytecode, not only the main contract source.
How it happened
- The deployed SwapUtils linked library did not match the audited source shown to users.
- The replacement library contained backdoor functions that withdrew pooled stablecoins.
- The same logic used existing ERC-20 approvals to pull tokens from user wallets.
- Law-enforcement seizure later recovered reported assets; that recovery is distinct from the amount initially drained.
Protocol details
Funds Recovery
Recovered
$24.0M
Net Loss
$2,997,000
Post-Incident Timeline
-
2022-12-01
On 1 December 2022, after a year after the incident, 24,000,000 $USD from the stolen assets were returned.
Evidence
- report @RugDocIO incident report twitter.com
- report Post-mortem rekt.news
- report @RugDocIO incident report twitter.com
- report @peckshield incident report twitter.com
- report @cryptogle incident report twitter.com
- report Greater Manchester Police recovery reporting gmp.police.uk
- report Rekt: StableMagnet rekt.news
- analysis Web Archive web.archive.org
- analysis DeFiLlama defillama.com
- analysis Halborn: Explained: The StableMagnet Rugpull halborn.com
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.