1inch Hack
What happened
On 5 March 2025 an attacker drained about $5 million (roughly 2.4 million USDC and 1,276 WETH) from the resolver contract of market maker TrustedVolumes by exploiting a calldata corruption bug in 1inch's obsolete Fusion V1 Settlement contract. 1inch said no end users were affected. The loss hit resolver contracts that still trusted calls coming from the V1 settlement contract.
The bug was in the hand-written Yul of _settleOrder. That function appends a suffix, which includes the resolver address, to each order's interaction data at an offset computed as ptr + interactionOffset + interactionLength. Because interactionLength was a full 32-byte word supplied by the caller, the attacker set it to -512 (0xff...fe00). The pointer wrapped around, the real suffix landed in padding, and a fake suffix naming the attacker's contract as resolver was used instead. The Settlement contract then called back as though that contract were the resolver, and TrustedVolumes' resolver, which only checked that the caller was the Settlement contract, paid out full order amounts in exchange for a few wei.
TrustedVolumes negotiated with the attacker on-chain. By about 04:12 UTC on 6 March the attacker had returned the funds, keeping roughly $450,000 as a bounty. 1inch redeployed the relevant contract and urged resolvers to move to Fusion V2. Decurity, one of nine firms that audited Fusion V1, said the vulnerable code was introduced in a November 2022 rewrite to Yul, after its October 2022 audit, and was replaced again in March 2023 before a scheduled re-audit, so no audit reviewed the version that was exploited.
Exploit transaction example: 0xb5c94efa0c8fd8f5c8cc2826e374a99620b01061d395b59b8f45dddc9fce1c60
How it happened
- The attacker (deployer
0xa7264a43a57ca17012148c46adbc15a5f951766e) deployed exploit contract0x019bfc71d43c3492926d4a9a6c781f36706970c9and calledsettle()on the Fusion V1 Settlement contract with crafted orders. - Each order swapped a few wei of USDT for a large amount, for example 1,000,000 USDC, with TrustedVolumes' resolver as the counterparty.
- The calldata set
interactionLengthto -512. In_settleOrder,ptr + interactionOffset + interactionLengthunderflowed, so the genuine suffix was written into padding and an attacker-built suffix naming the exploit contract as resolver was read instead. - The Settlement contract ran the resolver callback against the attacker's data. TrustedVolumes' resolver trusted any call from the Settlement contract and supplied the taker amounts, sending about 2.4 million USDC and 1,276 WETH to
0xbbb587e59251d219a7a05ce989ec1969c01522c0. - After on-chain negotiation, the attacker returned the funds by 6 March, keeping about $450,000 as a bounty.
Protocol details
Security review history
- CertiK View report
- OpenZeppelin View report
- SlowMist View report
- Hacken View report
- ConsenSys Diligence View report
Evidence
- report Report blog.1inch.io
- report @tikkalaresearch incident report x.com
- report @1inch incident report x.com
- report Yul Calldata Corruption - 1inch Postmortem decurity.io
- report 1inch - Rekt rekt.news
- transaction Etherscan transaction 0xb5c94efa...1c60 etherscan.io
- analysis DeFiLlama defillama.com
- analysis Vulnerability in obsolete 1inch contract affecting resolver contracts 1inch.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.