Why Multi-DEX Aggregation?
Single-DEX data is incomplete, biased, and risky. Here's why aggregation matters.
The Problem with Single-DEX Data
Price Manipulation
A single DEX pool can be manipulated with flash loans, sandwich attacks, and oracle manipulation.
Liquidity Fragmentation
Liquidity is spread across multiple DEXes. Checking only Uniswap might show $2,450 while BaseSwap has $2,451.
Stale Data
Some DEXes update slower than others. A single-DEX price might be 5-10 seconds behind.
How 4SEC Solves This
Uniswap ($2,450.30) ──┐
BaseSwap ($2,450.35) ──┼──> 4SEC API ──> VWAP: $2,450.31
SushiSwap ($2,450.28) ─┘ 3 sources, spread: 0.07%Volume-Weighted Average Price (VWAP)
VWAP = Sum(price_i x liquidity_i) / Sum(liquidity_i)More weight to DEXes with deeper liquidity = more accurate price.
Spread Detection
- < 0.1% — Healthy, liquid market
- 0.1% - 0.5% — Normal, some arbitrage opportunity
- > 0.5% — Potential manipulation or low liquidity
Arbitrage Opportunities
When spreads are significant, we calculate:
- Buy price (lowest DEX)
- Sell price (highest DEX)
- Estimated gas cost
- Net profit after fees
Comparison
| Feature | Single DEX | 4SEC Aggregated |
|---|---|---|
| Price accuracy | Biased | VWAP |
| Manipulation resistance | Vulnerable | Protected |
| Arbitrage detection | None | Real-time |
| Liquidity awareness | Single pool | Multi-pool |
| Data freshness | Varies | 30s cache |