ElasticSwap Hack
What happened
On the 13th of December, 2022, Elastic Swap was hacked on the Avalanche and Ethereum Chain using a calculation issue. The malicious actor stole worth around 850k USD.
The attack was possible in the reason of using two different logic of calculation in the exploited smart contracts. Functions addLiquidity and removeLiquidity have different logic of accounting. While the first one uses constant variables the second one is using dynamic pool balance calculation.
This led to the possibility of price manipulation after the pool unbalancing.
Avalanche:
Attacker address:
Exploit tx:
Ethereum:
Exploit tx:
Front-run tx:
Protocol details
Security review history
- Code4rena View report
Evidence
Proof of concept
1 availableSources
- report Post-Mortem quillaudits.medium.com
- report @ElasticSwap incident report twitter.com
- report @BlockSecTeam incident report twitter.com
- analysis Web Archive archive.vn
- analysis Blog reference blog.solidityscan.com
- analysis DeFiLlama defillama.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.