🆚LI.FI vs Aggregators/DEXs/Bridges

Understanding LI.FI performance and functionality

Why LI.FI is Different from a Traditional DEX Aggregator

LI.FI and DEX aggregators serve different purposes and operate on distinct principles:

  • DEX Aggregators: These tools generate prices by computing across mirrored on-chain data. They access data indexed in real time, allowing them to split trades across liquidity pools to reduce slippage quickly, often achieving response times under 500ms.

  • LI.FI: Unlike DEX aggregators, LI.FI discovers prices by aggregating data from external sources. It serves as a complete trading stack, connecting to multiple partners, including DEX aggregators and bridges. When a request is made, LI.FI queries various partners to obtain the best quotes, potentially leading to longer wait times. The waiting behavior can be customized to suit different latency requirements.


Why Aggregating Multiple DEX Aggregators is Valuable

  • Efficiency Variability: Different DEX aggregators optimize their algorithms continuously, so prices and performance may vary. LI.FI leverages multiple aggregators to ensure optimal pricing.

  • Chain Coverage: DEX aggregators may not be present on all chains, making it necessary to use several aggregators to achieve comprehensive market access.

  • Redundancy: If one aggregator experiences downtime, LI.FI automatically falls back to other integrated sources.


LI.FI’s Role as a Trading Stack

LI.FI offers more than just aggregation; it combines multiple liquidity sources to provide a full trading stack:

  • Built-in DEX Aggregator: LI.FI has a small DEX aggregator for handling trades on new chains where established aggregators are not yet available.

  • Cross-Chain Integration: By routing across various liquidity sources, LI.FI can seamlessly handle trades involving different chains.


Understanding the Differences in Performance

  • DEX Aggregator Performance: Aggregators like 1inch and 0x can vary significantly in performance based on trade size. For example, 0x may perform better for smaller trades on Arbitrum, while 1inch handles larger trades more effectively.

  • Comparing Response Times: Directly comparing the response times of DEX aggregator APIs (e.g., 1inch, Jupiter) with LI.FI is not meaningful since LI.FI aggregates these sources as part of its trading stack.


LI.FI's Measures to Minimize Latency

LI.FI employs several strategies to reduce network latency and ensure a smooth user experience:

  1. Global API Availability LI.FI's API is hosted in multiple regions (US-East, Europe, Southeast Asia) to minimize geographic latency. However, some liquidity sources may not have global availability, which can affect response times.

  2. Shared Caching System LI.FI uses a globally shared in-memory caching system to minimize network overhead. By working closely with partners, we cache as much data as possible to reduce the number of network requests.

  3. Smart Order Routing Our routing algorithm intelligently decides which sources to query based on past performance data. This dynamic approach helps reduce unnecessary requests, speeding up response times.

  4. Configurable API Timeout Users can customize how long the LI.FI API waits for responses from liquidity sources. Timeouts can be adjusted based on the number of responses received within specified timeframes.

  5. Enterprise SLAs with Partners We maintain strong relationships with liquidity sources, including private endpoints, API keys, whitelisted IPs, and higher rate limits than typical integrations, allowing us to handle a greater volume of requests.


How Fast is LI.FI?

LI.FI's API overhead is approximately 100ms. This latency reflects the extensive workload required to support multi-chain environments, including:

  • Canonical Asset Management

  • Transaction Generation and Tracking

  • Third-Party API Integration

  • Monitoring and Maintenance

  • Data Homogenization and Analytics

  • Multi-Chain DevOps

  • Fail-Safe and Redundancy Mechanisms

  • Smart Order Routing

Last updated