LI.FI is a cross-chain infrastructure protocol and aggregation API that combines bridging and DEX swapping into a single unified route — enabling any dApp to offer cross-chain token transfers with automatic selection of the optimal bridge and DEX path from a library of 15+ bridges and hundreds of liquidity sources across 30+ blockchains.
Overview
LI.FI (short for “Like I’m Five” — referencing clarity in complex systems) was founded in 2021 and quickly became the backbone of cross-chain UX for hundreds of DeFi protocols, wallets, and aggregators. Unlike single-bridge solutions, LI.FI acts as bridge aggregator middleware: it queries multiple bridges and DEXes simultaneously, selects the optimal route based on cost, speed, and slippage, and wraps the entire cross-chain swap into a single user transaction. Major integrations include MetaMask’s Portfolio, 1inch, Sushiswap, and hundreds of DeFi protocols.
What LI.FI Does
The following sections cover this in detail.
Cross-Chain Swap Routing
The fundamental operation: a user wants to go from Token A on Chain 1 to Token B on Chain 2. LI.FI:
- Queries all integrated bridges for rates (Stargate, Connext, Hop, Across, CCTP, etc.)
- Queries all integrated DEXes on both source and destination chains
- Builds optimal path — which may involve a DEX swap on source chain → bridge → DEX swap on destination chain
- Returns rates, estimated times, gas costs, and a transaction calldata object
- Executes the full route in one user-signed transaction
Multi-Hop Routes
Complex routes handled automatically:
- Token on obscure L2 → bridge to Ethereum → swap on Uniswap → bridge to Arbitrum → final token
- These 4-5 step routes appear as a single operation to the end user
Architecture
The protocol is built around the following components.
SDK and API
LI.FI provides two integration layers:
REST API:
- Stateless: pass token, chain, amount → receive route options
- Returns: calldata ready to submit on-chain
- Used by backend-heavy integrators
TypeScript SDK:
- Higher-level wrapper with React hooks available
- Handles wallet interaction, transaction monitoring, refund logic
- Used by frontends integrating cross-chain in days
Smart Contracts
LI.FI deploys a canonical diamond proxy contract on each supported chain:
- Facets (modular contract components) handles each bridge integration
- All routes execute through the LI.FI contract on source chain
- EIP-2535 Diamond standard for modular upgradeability
Supported Bridges
LI.FI aggregates 15+ bridges including:
- Stargate, Hop Protocol, Across Protocol, Connext
- Circle CCTP, Celer, Synapse, deBridge, Squid (Axelar-based)
- Wormhole-based bridges, Symbiosis
Revenue and Business Model
- LI.FI charges a small percentage fee on routed volume
- Used as service API by B2B integrators (wallets, protocols)
- Also powers consumer-facing Jumper Exchange (li.jumper.exchange) — LI.FI’s own frontend cross-chain swap UI
Security and Audits
LI.FI suffered a significant smart contract exploit in July 2024:
- July 2024 exploit — $11.6M drained via a call injection vulnerability in the LI.FI diamond contract
- A deprecated deposit function was reactivated via a proxy upgrade, allowing attackers to steal approved tokens from users who had granted infinite approvals to LI.FI contracts
- LI.FI launched a user restitution program following the exploit
Sources
- LI.FI Developer Documentation — LI.FI Team, 2022–2024. Full API and SDK documentation covering bridge integration list, route building API, smart contract architecture (Diamond proxy), supported chain list, fee structure, and React integration examples.
- “LI.FI: The Cross-Chain Aggregation Layer” — Bankless / The Defiant, 2022. Editorial overview of LI.FI’s role in DeFi infrastructure, explaining why bridge fragmentation created demand for aggregation, how LI.FI compares to using bridges directly, and which major wallets/dApps have integrated it.
- “Cross-Chain Infrastructure: LI.FI vs Socket vs Rango” — Messari Research / Delphi Digital, 2023. Comparative analysis of cross-chain aggregation protocols, covering supported bridges, chain counts, API quality, adoption metrics, and security models.
- “LI.FI July 2024 Hack: Call Injection via Diamond Proxy” — Rekt News / Chainalysis, 2024. Technical post-mortem of the $11.6M LI.FI exploit, detailing how a deprecated deposit function call injection created an arbitrary execution vulnerability, which tokens/approvals were drained, and LI.FI’s restitution response.
- “Jumper Exchange: LI.FI’s Consumer Cross-Chain Swap Product” — LI.FI Blog, 2023. Announcement and description of Jumper Exchange (li.jumper.exchange) as LI.FI’s B2C frontend sitting atop its own aggregation API, and the business rationale for building a consumer product alongside the B2B API.