Skip to content

Unify oracle multi-provider failover with Decimal-safe consensus rules #495

Description

@josephchimebuka

Summary

Collapse remaining price provider divergence into one failover stack with explicit staleness, quorum/priority rules, and Decimal outputs for both /api/price and multi-asset prices.

Why this matters

Resolution correctness depends on oracle integrity; divergent stacks and float paths risk wrong round outcomes.

Where to work

  • src/services/oracle.ts
  • src/services/priceService.ts
  • src/services/providers/ / price-providers/
  • metrics

What to implement

  1. Single provider interface + registry.
  2. Priority/failover + stale detection.
  3. Decimal serialization at API boundary.
  4. Metrics for provider wins/failures.
  5. Tests for failover and all-providers-down.

Acceptance criteria

  • One provider stack serves XLM + multi-asset needs.
  • Stale prices never resolve rounds in fail-closed config.
  • Decimal-safe responses.
  • Tests cover failover matrix.

Done when

Price inputs to resolution are consistent and safe.

Metadata

Field Value
Difficulty advanced
Complexity high
Good first contribution? no

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSGrantFox OSS campaignMaybe RewardedPotential reward for contributorsStellar WaveIssues in the Stellar wave programThird CampaignCampaign: Third CampaignapiAPI routes and contractsarchitectureArchitecture and boundariesbackendBackend engineering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions