CoinSWOP Hack
Incident Overview
The contract owner invoked setMigrator() function at:
https://etherscan.io/tx/0xf73a10ee…9007f1
CoinSWOPMaster smart contract was set as migrator. The smart contract owner called migrate() functions 11 times to withdraw the user's LP tokens with the help of infinite approval. LP tokens were migrated to an unverified smart contract that received real LP tokens and returned fake ones. Then real LP tokens went to the contract deployer as the final recipient. Migrate transaction example:
https://etherscan.io/tx/0x5b19f1e3…48c592
The final recipient is getting LP tokens:
https://etherscan.io/tx/0xe6543f5b…3c5aea
LP tokens were exchanged for ETH and deposited to the Tornado Cash mixer at these transactions:
https://etherscan.io/tx/0xd6584b95…f8578c
https://etherscan.io/tx/0x90bd78b4…05b47c
https://etherscan.io/tx/0x5d530f23…08667d
6.8 ETH were transferred to some external wallet:
https://etherscan.io/tx/0xf8759517…b48867
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 CoinSWOP, these are the critical security checks that could have prevented this incident (December 2020).
- Verify all logic paths related to 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 TrialSources & References
Learn to Prevent the Next CoinSWOP
The CoinSWOP 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.