StableMagnet Hack
Incident Overview
StableMagnet was rugpulled for over 27,000,000 $USD. The scammer used an unverified contract to transfer approved tokens.
The exit scam started from this transaction:
https://bscscan.com/tx/0xf0ba46c8…5d967c
As a result, 8M USDT, 7.2M USDC, and 7M BUSD were taken from the StableMagnet 3Pool via an unverified source code.
The unverified SwapUtil library did not only contain code to drain all pairs, it also contained code to transfer more tokens to everyone who had approved StableMagnet.
SwapUtils library containing the exploit:
https://bscscan.com/address/0xE25d0577…3eaA9a
The stolen funds were distributed between some external wallets. BUSD sent to Binance hot wallet:
https://bscscan.com/address/0x2bac0445…fb96d7#tokentxns
Tether received on ETH chain:
https://etherscan.io/address/0xDF5B180c…bDEF26#tokentxns
Tether changed to DAI:
https://etherscan.io/address/0xe5daac90…912a07#tokentxns
Incident Report
Protocol Information
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to StableMagnet, these are the critical security checks that could have prevented this incident (June 2021).
- Verify all logic paths related to Drained Contracts and User Wallets / Rugpull are guarded by proper access controls and input validation
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialFunds Recovery
Recovered
$24.0M
Net Loss
2996999
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.
Sources & References
- 01
- 02
-
03
Reference https://rekt.news/stablemagnet-rekt/
- 04
- 05
- 06
Learn to Prevent the Next StableMagnet
The StableMagnet hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.