Skip to content
Smart contracts Write-up Advanced

The 1inch Fusion v1 Exploit: How a Calldata Corruption Vulnerabil

A calldata corruption vulnerability in the deprecated 1inch Fusion v1 contract allowed an attacker to forge resolver addresses and execute unauthorised swaps, draining millions in user tokens. The attacker exploited an unsigned comparison after a calldataload operation to bypass bounds checks and substitute their own resolver identity.

Olympix Follow

Published on olympixai.medium.com

On March 6, 2025, 1inch Network, one of DeFi’s leading DEX aggregators, disclosed a $5 million exploit targeting resolvers using the deprecated Fusion v1 contract. The attacker exploited a low-level calldata corruption vulnerability to impersonate legitimate resolvers, swapping minimal wei for millions in user tokens…

Olympix, on olympixai.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

The attacker could impersonate legitimate resolvers and drain $2.4M USDC and 1,276 WETH; the text does not mention any defence that limited the exploit.

What the attacker needed

Target uses deprecated Fusion v1 contract; attacker can send crafted calldata

The fix

The fix should replace unsigned comparisons (lt/gt) with signed comparisons (slt/sgt) after calldataload operations involving bounds checks, and add explicit overflow detection.

How it was found

  1. Craft an unusually long transaction that exceeds expected buffer boundaries, triggering an overflow of the interactionLength variable
  2. The overflowed interactionLength value feeds into an unsafe calculation that determines where the order suffix is located
  3. With the corrupted offset, the contract reads the resolver address from an attacker-controlled portion of calldata
  4. Masquerading as the legitimate resolver, the attacker executes swaps with resolver privileges, trading negligible amounts for millions in tokens
  5. Execute multiple swaps within single transactions, draining $2.4M USDC and 1,276 WETH

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is about a flaw in a smart contract, the code that runs on a blockchain. The contract read some data from a transaction and checked its length using a comparison that treats numbers as always positive. By sending a very large number, the attacker made the check pass when it should have failed, letting them pretend to be a trusted resolver and steal funds.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by Olympix

View all

24 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.