Oracle Price Feed
Limora uses decentralized oracle price feeds to determine accurate market prices for opening, closing, and liquidating positions. This page explains how the oracle system works.Overview
Unlike order-book based exchanges where prices are determined by matching bids and asks, Limora uses oracle-based pricing. This approach offers several advantages:No Slippage
Trades execute at the oracle price, regardless of position size.
Manipulation Resistant
Prices are aggregated from multiple sources, making manipulation difficult.
Consistent Execution
All trades in a block get the same price, ensuring fairness.
Transparent
Oracle prices are on-chain and independently verifiable.
Price Sources
Limora aggregates prices from multiple reputable sources:- Chainlink: Industry-leading decentralized oracle network
- Pyth Network: High-frequency price feeds from major exchanges
- Band Protocol: Cross-chain oracle solution
Price Feed Architecture
Supported Price Feeds
| Asset | Symbol | Update Frequency | Deviation Threshold |
|---|---|---|---|
| Bitcoin | BTC/USD | 1 second | 0.1% |
| Ethereum | ETH/USD | 1 second | 0.1% |
| Solana | SOL/USD | 1 second | 0.25% |
| Arbitrum | ARB/USD | 10 seconds | 0.5% |
| Optimism | OP/USD | 10 seconds | 0.5% |
Price feeds are continuously updated. The table above shows typical parameters
which may be adjusted based on market conditions.
Price Calculation
Entry Price
When opening a position, the entry price is determined by:- Fetching the latest oracle price at transaction execution
- Applying any applicable spread (typically 0%)
- Recording the price in the position data
Mark Price
The mark price used for P&L calculation and liquidations:Settlement Price
When closing a position, the settlement price is:- The oracle price at the time of the close transaction
- Used to calculate final P&L
- Determines fund distribution between trader and matcher
Staleness Protection
To protect against stale or outdated prices, the protocol implements staleness checks:| Parameter | Value | Description |
|---|---|---|
| MAX_PRICE_AGE | 60 seconds | Maximum age of price data |
| HEARTBEAT | 10 seconds | Expected update frequency |
- New positions cannot be opened for that pair
- Existing positions continue using the last valid price
- Alerts are triggered for protocol operators
Deviation Protection
The protocol monitors for unusual price deviations:Price Updates and Gas
Oracle price updates are performed by dedicated keeper networks that:- Monitor off-chain price sources
- Submit on-chain updates when thresholds are met
- Pay gas costs for update transactions
Liquidation Pricing
Liquidations use a specific pricing mechanism to ensure fairness:- Trigger Check: Position checked against current oracle price
- Grace Period: Brief window before execution (configurable)
- Execution Price: Oracle price at liquidation transaction
Oracle Governance
Oracle configuration is managed through protocol governance:- Adding new price feeds requires governance approval
- Changing deviation thresholds requires governance approval
- Emergency pauses can be triggered by the security council
Monitoring and Transparency
On-Chain Data
All oracle prices are recorded on-chain and can be verified:Price Dashboard
Monitor current and historical prices at:- On-chain: Contract read functions
- API:
/api/pricesendpoint - UI: Price charts on the trading interface
Limitations
Known Limitations
- Update Latency: Oracle prices may lag spot prices by 1-10 seconds
- Weekend Gaps: Some assets may have reduced update frequency during low-volume periods
- Network Congestion: Base network congestion may delay price updates
Best Practices
- Use stop-loss orders to limit downside risk
- Avoid extremely high leverage during volatile periods
- Monitor positions actively during major market events