Curriculum·J302 Swap Execution: AMMs, MEV, and DEX Architectures·about 31 min

Aggregators and routing

By the end of this lesson you can

  • Explain what an aggregator does and why it requires a token approval to do it
  • Compute the exposure an unlimited approval creates against the price improvement it buys
  • Price the cost of finite approvals and decide whether to pay it
  • Evaluate routing quality by realized price rather than by quoted price

Junior · enrolled learners

This lesson opens with LI.FI and Jumper, 16 July 2024.

What happened
LI.FI is a routing and bridging aggregator, used directly and through the Jumper interface. Shortly after a new contract facet was added, a vulnerability in it allowed an attacker to perform a call injection, because the facet did not properly validate the call target and the call data it was given. That let the attacker execute arbitrary functions using the permissions the LI.FI contract already held. The permissions that mattered were unlimited token approvals granted by users to that contract. About $11.6M was taken from 153 wallets across Ethereum and Arbitrum, in USDC, USDT and DAI. The team disabled the vulnerable facet across all chains once detected. The exposure was limited to unlimited approvals and did not affect finite ones, which were already the default in the project's own API, software development kit and widget.
The decision point
The users who lost were the ones who had granted an unlimited approval, and that was not what the aggregator's own tooling did by default. So the loss did not follow from using the service. It followed from a setting, chosen once, that converted a per-trade permission into a standing power over the entire balance of that token, held by a contract whose code could change and did.
Recorded loss
$11,600,000

What you will be able to answer

  • Why does an aggregator need an approval?
  • What does an unlimited approval convert?
  • What did finite approvals cost the affected users?
  • How do you decide between them?

Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.

It is free. We do not sell the list and there is nothing to buy at the end of it.

Sources and review

Confidence high·Volatility medium·Reviewed 2026-08-06·Owner unassigned

Contested

Reported losses range from about $8M to $11.6M across sources depending on when the total was taken and which chains were counted. The higher figure and the 153 wallet count come from the incident report and subsequent analyses, and the argument does not depend on the precision.

F109-02 owns approvals as a delegation topic and J306-01 owns them as a contract power. This lesson covers why this specific architecture requires one and how to price the choice. Keep the split.