Documentation Index
Fetch the complete documentation index at: https://docs.paxeer.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
x/paxoracle stores validator-submitted market prices and exposes aggregated prices to EVM contracts through the OracleAggregator precompile at 0x0000000000000000000000000000000000000903.
The module supports PaxSpot, HyperPax Perps, and other protocols that need validator-consensus price data with sub-second chain finality.
EVM precompile
| Field | Meaning |
|---|---|
marketId | bytes32 market identifier, commonly keccak256("BTC/USD") |
price | signed 18-decimal fixed-point price |
confidence | validator confidence value, typically 0 < confidence <= 1e18 |
quorum | number of validator attestations included in the aggregate |
timestamp | block timestamp or block-derived timestamp for the aggregate |
Read a validator price
Submit a validator price
submit-price.ts
Aggregation model
x/paxoracle verifies submissions against the active validator set, filters stale submissions, and returns a confidence-weighted median for each market.
| Step | Description |
|---|---|
| Validator check | The submitter must be an active validator |
| Market lookup | The marketId maps to an enabled market |
| Staleness filter | Old attestations are excluded from the aggregate |
| Quorum check | The aggregate must include enough valid submissions |
| Median | Valid submissions are aggregated into a confidence-weighted median |
Common failure modes
| Failure | Cause |
|---|---|
| Submit reverts | Caller is not an active validator |
| No price returned | Market has no valid recent submissions |
| Quorum too low | Too few validators submitted within the freshness window |
| Invalid confidence | Confidence is zero or outside the accepted range |
| Stale aggregate | Submissions are older than the configured staleness threshold |