Aggregation Logic
To prevent price manipulation, Lemon Markets does not rely on a single source.Data Sources
Lemon Markets uses a multi-source aggregation strategy to provide the most accurate and real-time pricing for synthetic assets.| Source | Priority | Purpose |
|---|---|---|
| DexScreener | Primary | Real-time prices for low-cap and trending tokens. |
| GeckoTerminal | Secondary | Backup and verification for major pairs. |
| Pyth Network | Tertiary | Institutional-grade feeds for high-volume assets (where available). |
Aggregation & Confidence
The Oracle Adapter contract doesn’t just take the first result. It:- Polls multiple sources simultaneously.
- Verifies results against onchain confidence intervals.
- Detects Outliers: If one source deviates significantly from others, it is discarded to prevent price manipulation.
Spot vs. Index Price
- Index Price: The aggregate price from external oracles.
- Mark Price: The internal price used for liquidation, which may deviate slightly based on system health to encourage arbitrage.
