Skip to content

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

Open
ogabrielides wants to merge 2 commits into
mainfrom
docs/oracle-weighted-median
Open

ogabrielides wants to merge 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>
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.

1 participant