-
Notifications
You must be signed in to change notification settings - Fork 36
Feature: Add Oracle provider failover with priority ordering #79
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestmediumDifficulty: MediumDifficulty: MediumoracleOracle price feed serviceOracle price feed service
Description
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
- Providers ordered by priority
- Higher-priority provider preferred when available
- Automatic failover to lower priority on failure
- Recovery: switch back to higher priority when it recovers
- Tests for failover and recovery
Technical Notes
- Files:
oracle/src/services/price-aggregator.ts,oracle/src/config.ts
Constraints
- Must not increase latency when primary provider is healthy
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestmediumDifficulty: MediumDifficulty: MediumoracleOracle price feed serviceOracle price feed service