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 continuously optimize their algorithms, 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.
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 employs several strategies to reduce network latency and ensure a smooth user experience:
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.
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.
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.
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.
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.