Skip to content

Staleness-aware median pricing with source fallback #81

Description

@Miracle656

Background

A single price source can go stale or wrong. A median across sources with explicit staleness handling produces a robust price (distinct from a per-source confidence score).

What to build

Aggregate multiple sources into a median, drop sources older than a freshness threshold, and fall back through a priority chain when too few fresh sources remain — annotating which sources contributed and which were excluded for staleness.

Key files

  • src/pricing/median.ts (new)
  • src/api/rest.ts

Acceptance criteria

  • Median computed only from fresh sources
  • Fallback chain engages when sources are stale/missing
  • Response notes included vs excluded sources; unit tests

Drips Wave · Complexity: Advanced · 200 points


Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions