LI.FI Hack

TOTAL LOST $8.0M
Medium Other

Summarize with AI

Affected Chain 2024 Incident surface
Recovered - No recovery reported
All-Time Rank #344 By amount stolen
Protocol Type Dexs Target category

Incident Overview

Jul 16, 2024, DeFi Protocol LI.FI Hit by $8M Exploit

On July 16th, 2024, Li.Fi, a cross-chain DeFi protocol, suffered a significant exploit due to an arbitrary call vulnerability, resulting in a loss of approximately $8 million. The vulnerability resided in the depositToGasZipERC20 function within the GasZipFacet.sol contract. This function allowed the _swapData parameter to be passed directly to LibSwap.swap, which included a low-level call that could execute arbitrary functions.

Since the attacker had control over _swap.callTo and _swap.callData, they were able to craft malicious calldata with transferFrom() calls. With sufficient token spending approval, the attacker executed unauthorized transferFrom() calls to siphon funds from the protocol. Li.Fi has advised users to revoke approvals for specific addresses and has disabled the affected smart contract facet to contain the exploit.

This incident is particularly notable as it echoes a similar $600,000 loss in 2022 due to the same bug in the protocol’s swapping feature.

Attacker

https://etherscan.io/address/0x7742ed59…a7f2c8

Vulnerable contact

https://etherscan.io/address/0xf28a3523…d7e534#code

Attack tx:

https://etherscan.io/tx/0xd82fe84e…763873

https://etherscan.io/tx/0x65a92b18…692755

Incident Report

Protocol / Project LI.FI
Date of Incident
Attack Technique Other
Classification Exchange (DEX)

Protocol Information

Protocol Type Dexs
Official Website jumper.exchange/
Protocol Twitter/X @lifiprotocol
Team Anonymous
Source Code Unverified

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Deep understanding of other and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in LI.FI's contract logic - root cause: exchange (dex)
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Likely — with a thorough Other audit checklist and test coverage

If you're auditing a protocol with similar architecture to LI.FI, these are the critical security checks that could have prevented this incident (July 2024).

  • Verify all logic paths related to Other are guarded by proper access controls and input validation
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Sources & References

Learn to Prevent the Next LI.FI

The LI.FI hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial