1inch Hack

Reported loss $5.0M
Ethereum
Calldata underflow and resolver hijack

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

  1. The attacker (deployer 0xa7264a43a57ca17012148c46adbc15a5f951766e) deployed exploit contract 0x019bfc71d43c3492926d4a9a6c781f36706970c9 and called settle() on the Fusion V1 Settlement contract with crafted orders.
  2. Each order swapped a few wei of USDT for a large amount, for example 1,000,000 USDC, with TrustedVolumes' resolver as the counterparty.
  3. The calldata set interactionLength to -512. In _settleOrder, ptr + interactionOffset + interactionLength underflowed, so the genuine suffix was written into padding and an attacker-built suffix naming the exploit contract as resolver was read instead.
  4. 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.
  5. After on-chain negotiation, the attacker returned the funds by 6 March, keeping about $450,000 as a bounty.

Protocol details

Classification Protocol Logic / Access Control / Exchange (DEX)
Protocol Type DEX Aggregator
Implementation language Solidity
Protocol links Website @1inch

Market Context at Time of Hack

Token Price at Hack $0.2326
Market Cap at Hack $320.0M
Reported loss / token market cap 1.56%
Token Categories
Decentralized Exchange (DEX) Token DeFi Wallet Ethereum Ecosystem AMM YZi Labs Portfolio Avalanche Ecosystem Solana Ecosystem

Security review history

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.