LI.FI Hack

TOTAL LOST $11.6M
High Delegatecall & Call Injection Attacks ethereum arbitrum

What happened

LI.FI's Diamond contract was exploited on July 16, 2024 shortly after a new GasZip facet was deployed. The facet omitted the usual target and function validation for external calls, allowing an attacker to drain wallets that had granted infinite token approvals to the LI.FI contract. LI.FI reported about $11.6 million stolen from 153 wallets on Ethereum and Arbitrum.

Technical Root Cause

The new GasZip facet did not enforce the whitelist validation that restricted external call targets and function selectors in LI.FI's other facets. A router holding standing token approvals must never execute unrestricted caller-supplied target and calldata. Every newly deployed facet must independently enforce the validation assumptions of its shared low-level-call libraries.

Case & protocol details

Classification Arbitrary External Call / Approval Drain
Protocol Type DEX
Official Website jumper.exchange/
Protocol Twitter/X @lifiprotocol

Attack Timeline

The attacker selected wallets with unlimited approvals to the LI.FI Diamond and called depositToGasZipERC20() with attacker-controlled swap data. The newly deployed GasZipFacet forwarded that data to LibSwap.swap(), whose low-level call could reach an attacker-selected target with attacker-selected calldata. The payload encoded ERC-20 transferFrom(victim, attacker, amount).

Because the Diamond was already an approved spender, the transfers succeeded without a new transaction from each victim. LI.FI disabled the facet across chains after detection.

Practice this exploit pattern safely

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