Problem
When a price provider fails, the Oracle aggregator treats all providers equally. There's no way to prioritize certain providers over others for failover.
Context
Some providers (e.g., Binance) may be more reliable or have lower latency. Prioritization ensures the best data source is used when available.
Proposed Solution
Add priority-based failover:
interface ProviderConfig {
priority: number; // 1 = highest
name: string;
enabled: boolean;
// ...
}
Providers tried in priority order; lower-priority providers used only when higher-priority ones fail.
Acceptance Criteria
Technical Notes
- Files:
oracle/src/services/price-aggregator.ts, oracle/src/config.ts
Constraints
- Must not increase latency when primary provider is healthy
Problem
When a price provider fails, the Oracle aggregator treats all providers equally. There's no way to prioritize certain providers over others for failover.
Context
Some providers (e.g., Binance) may be more reliable or have lower latency. Prioritization ensures the best data source is used when available.
Proposed Solution
Add priority-based failover:
Providers tried in priority order; lower-priority providers used only when higher-priority ones fail.
Acceptance Criteria
Technical Notes
oracle/src/services/price-aggregator.ts,oracle/src/config.tsConstraints