x/oracle — Oracle module
The x/oracle module brings external data — token prices, reference
exchange rates — into chain state where economic logic can use it. Feeds are
submitted, validated, and stored so that modules pricing marketplace
services or evaluating policy have a consensus-visible data source.
Oracle design constrains manipulation: submissions are permissioned and validated rather than free-for-all, because a corrupted price feed corrupts everything priced by it.
What it does
Section titled “What it does”Permissioned sources publish token prices and reference rates on a schedule. Each submission passes validation before entering state, becoming consensus-visible data that any module can reference deterministically.
Consumers then resolve against stored rates: fiat-referenced settlement
conversions, bid pricing strategies anchoring to published references, and
supply mechanics referencing market conditions. The module also carries its
feed configuration (PriceFeedConfig) and an aggregated view
(AggregatedPrice) derived from submitted entries.
Notably, the keeper carries delegation, rewards, and slashing logic: oracle participants are bonded and can be slashed for misbehavior. Feed integrity is backed by stake, not just by permission.
Why it exists
Section titled “Why it exists”A marketplace that prices real-world compute in a volatile token needs a trustworthy bridge to external prices. Doing that bridging in a dedicated, auditable module keeps a sensitive dependency contained and governable.
Primary objects
Section titled “Primary objects”| Concept | Definition |
|---|---|
| Feed | A stream of externally-sourced values validated into chain state. |
| Oracle risk | The exposure created when on-chain logic depends on off-chain data quality. |
Core flow
Section titled “Core flow”- Submit — Feeds are submitted. Permissioned sources publish token prices and reference rates on a schedule.
- Validate — Values are checked. Submissions pass validation before entering state — the guardrail against corrupted data.
- Store — Rates become state. Consensus-visible data that any module can reference deterministically.
- Price — Logic consumes. Settlement conversions, bid anchors, and policy inputs resolve through stored rates.
Messages
Section titled “Messages”| Message | Purpose |
|---|---|
MsgAddPriceEntry | Submits a price entry to a feed. |
MsgUpdateParams | Governance-only update of module parameters. |
Queries
Section titled “Queries”| Query | Purpose |
|---|---|
Prices | Stored price entries for a feed. |
AggregatedPrice | The aggregated price derived from submitted entries. |
PriceFeedConfig | The configuration of a price feed. |
Params | Current module parameters. |
Module interactions
Section titled “Module interactions”| Module | How they interact |
|---|---|
| x/settlement | Fiat-referenced pricing resolves through oracle rates. |
| x/bme | Supply mechanics can reference oracle-reported market conditions. |
| x/market | Bid pricing strategies can anchor to oracle-published references. |
Related documentation
Section titled “Related documentation”- Fraud, Audit & Oracles — where oracles sit in the wider trust fabric.
- Escrow & Settlement — where fiat-referenced pricing is consumed.
- Pricing & Bidding — how providers and tenants think about price.
- Tokenomics — the supply mechanics that reference market conditions.
What is a feed?
Section titled “What is a feed?”A stream of externally-sourced values — token prices, reference exchange rates — validated into chain state on a schedule.
What is oracle risk?
Section titled “What is oracle risk?”The exposure created when on-chain logic depends on off-chain data quality. This module contains it by design: permissioned submissions, validation before storage, and a governable dependency surface.
Which modules read oracle data?
Section titled “Which modules read oracle data?”Settlement for fiat-referenced pricing, market participants anchoring bid strategies, and supply mechanics referencing market conditions. See the x/settlement module.