Skip to content
Reading depth

Each view includes the earlier layers; the complete engineer or auditor page is shown by default.

An oracle turns selected off-chain or cross-system observations into an on-chain value that smart contracts can read under explicit update and trust rules.

Warning cross category cue

An oracle is the admission path that turns selected external observations into values a smart contract can use.

Contract execution can inspect on-chain state but cannot independently know a current exchange price, reserve statement, benchmark rate, weather event, or legal outcome. An oracle defines who observes, how reports are combined, when a value updates, and what consumers should do when it is missing or suspect.

A market-data feed or valuation agent is a useful analogy. It stops being exact because an on-chain value may liquidate collateral, mint assets, settle a derivative, or pay cover in the same transaction. Feed contracts, source markets, reporters, chain conditions, adapters, units, and fallback controllers therefore become part of the financial position.

Data sources originate observations. Reporters or publishers transmit them, aggregation selects an accepted value, and feed contracts expose it. Protocols, keepers, guardians, and users rely on the result. Collateral, debt, derivatives, reserves, and payouts remain the assets and claims; the oracle value is an assertion used to control them.

  1. Define acceptable sources, asset identity, units, and timing.
  2. Collect signed or otherwise attributable observations.
  3. Aggregate, filter, or validate them under a stated rule.
  4. Publish an on-chain value, timestamp, and status.
  5. Require each consumer to validate freshness, decimals, chain availability, and action-specific bounds before changing financial state.

Information flow runs from source markets through reporters and feed contracts. Capital flow changes only when a consumer uses the published value in a financial state transition. Claim flow changes when that consumer reprices, mints, settles, liquidates, or accounts for an entitlement. Control flow follows publisher, access-control, fallback, pause, and upgrade authority. Return flow can pay oracle operators from subscribers, protocols, staking rules, treasuries, or token issuance; the data does not create return by itself. Risk flow reaches every consumer and then the users who hold the affected claims.

A wrong value can seize good collateral, leave bad debt, overmint a stablecoin, misstate NAV, or mispay a derivative. Borrowers, lenders, traders, LPs, cover capital, reserves, or token holders absorb the resulting loss according to the protocol’s backstop design.

An oracle is not a magical truth source. It is a documented chain of observers, rules, contracts, and fallbacks that a protocol chooses to trust.

Inventory feed addresses, source venues, update triggers, heartbeat, deviation threshold, decimals, quote unit, liquidity assumptions, sequencer handling, fallbacks, caps, pause behavior, governance, monitoring, and incident response.

Chainlink Data Feeds are one implementation family, not the definition of an oracle. Review the selected feed and network, proxy and aggregator addresses, round data, timestamp, access model, billing, source methodology, and consumer checks. Other systems may use signed reports, on-chain TWAPs, optimistic disputes, committees, or zero-knowledge proofs.

Validate identity, unit, decimals, freshness, validity range, chain status, and fallback before every consequential state change. Test stale, missing, negative, zero, extreme, divergent, manipulated, and sequencer-outage states. See oracle risk for propagation analysis.

  • “Decentralized oracle means correct data.” Independence and aggregation reduce some failures but do not prove source quality or consumer safety.
  • “The feed contract handles all checks.” Consumers still choose addresses, units, freshness, fallbacks, and action thresholds.
  • “One price fits every use.” Liquidation, settlement, NAV, and execution can require different horizons and robustness.

Read smart contracts and market information first. Continue to collateral or synthetic assets to see oracle-dependent positions.

  • Chainlink, Data Feeds documentation — one production oracle architecture and integration surface (accessed 2026-08-09).
  • The supplied DeFi seed, sections 4.3, 9.1, 10, and 12 — oracle roles, information flow, and analysis questions.

Machine-readable model

Key equations

Canonical expressions come from the structured concept record. KaTeX renders the notation, while the plain-text expression and variable table keep its meaning and units inspectable without JavaScript. Read the narrative above for the model's domain, assumptions, and rounding rules.

This concept does not require one canonical equation. Its mechanism and state transitions remain the authoritative explanation; do not invent a formula merely to make the topic look quantitative.

Assurance contract

Security properties

These structured statements define desired behavior. Their stable IDs can bind tests, invariants, specifications, audit findings, or proof results without turning descriptive review advice into an assurance claim.

Desired · not evaluated: No test, audit, or proof result is implied until scoped evidence is linked to this property.

  1. Every consumer validates feed identity, unit, decimals, freshness, validity range, and chain availability before changing financial state

  2. Manipulating one reporter or thin source cannot move the accepted value beyond the documented aggregation and deviation bounds

  3. Stale, missing, disputed, or anomalous data moves the consumer into an explicit safe or degraded state

  4. Oracle assumptions and fallback authority are reflected in caps, collateral rules, settlement logic, and user disclosures

Knowledge check

Quiz

Answer in your own words, then open the model answer.

Why must a consumer check freshness?

Model answer

A correctly encoded old value can still cause an economically incorrect state transition after the market has moved.