Skip to content

docs: weighted median of oracle sources on the Oracle page - #322

Merged
ogabrielides merged 2 commits into
mainfrom
docs/oracle-weighted-median
Oct 23, 2026
Merged

ogabrielides merged 2 commits into
mainfrom
docs/oracle-weighted-median

Conversation

@ogabrielides

Copy link
Copy Markdown
Collaborator

Updates doc/protocol/oracle.md for pod #175 (weighted median of multi-source oracle prices).

  • The oracle price is now the weighted median of fresh observations: each price counts weight times, and an exact-half split averages the two middle prices, so all-ones weights give the plain median. Examples come from the node's weighted_median tests.
  • New Source weights section: the N* prefix in the oracle spec (1 to 65,535, default 1), changing weights through updateMarketOracle, repeated source/asset pairs rejected, a stale source leaving the vote with its whole weight.
  • Fault tolerance is restated in terms of fresh weight.
  • A new market's cold-start price stays the plain median, ignoring weights (matches the code).
  • The "Source" field is now described as the position in the market's oracle list; the parameters table gains a weight row.

Not covered here:

  • The POD_CLOB__WEIGHTED_ORACLE_DEADLINE activation. The page describes post-activation behaviour.
  • The oracleSpec description in api-reference/applications-precompiles/orderbook.md, which still omits the weight prefix.

🤖 Generated with Claude Code

ogabrielides and others added 2 commits October 20, 2026 11:45
Each source in a perp market's oracle list can carry a weight (pod #175).
The Oracle page now describes the weighted median, the N* spec prefix,
and how weights change fault tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@GeorgeTsimos GeorgeTsimos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep a note (that is more general for docs) to do another pass mostly for improving writeup when we have the bandwidth.

@ogabrielides
ogabrielides merged commit 7c380b6 into main Oct 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants