ElasticSwap Hack
Incident Overview
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:
https://snowtrace.io/address/0x3bdf01ed…5743cd
https://snowtrace.io/address/0x25fde76a…103c56
https://snowtrace.io/address/0xdd8429b8…d60cbd
Exploit tx:
https://snowtrace.io/tx/0x782b2410…cd9b18
Ethereum:
Exploit tx:
https://etherscan.io/tx/0xc2d86035…f5cbda
Front-run tx:
https://t.co/YGMaRQj6Lk
Incident Report
Protocol Information
Market Context at Time of Hack
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 ElasticSwap, these are the critical security checks that could have prevented this incident (December 2022).
- Verify all logic paths related to Price Oracle Attack / Other are guarded by proper access controls and input validation - see the Oracle Manipulation & Price Manipulation attack class for patterns
- Audit oracle price feeds for manipulation risks - ensure time-weighted average prices (TWAPs) or multi-source aggregators are used, not spot prices
- 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 TrialSecurity Audit History
- Audit Report 1 Report
Related Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Proof-of-Concept Exploits
On-Chain Evidence & References
Sources & References
- 01
-
02
Web Archive https://archive.vn/wip/cSkcV
- 03
- 04
Learn to Prevent the Next ElasticSwap
The ElasticSwap 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.