Back

Oracles composability and contract risk

P11-L07 · P11 · P11-M02

Map dependencies and failure propagation

ILLUSTRATIVE · needs_review

Prerequisites: P11-L06

Learning objectives

  • Map dependencies and failure propagation
  • Map oracle and composability dependencies.
  • Identify stale-data and local-price limitations.

EN source master · P11-L07 · 30 minutes estimated · needs_review

Offline formative study. No wallet connection, real funds, private keys, signatures, live trade or personal portfolio inputs. Visuals are specifications; this is neither runtime content nor certification.

Why this matters

A contract can follow its code exactly while consuming stale, mismatched or economically fragile inputs.

Explanation

Read the feed's meaning

Data feeds aggregate inputs and publish updates; consumers, proxy and aggregator form separate dependencies [ORACLE]. Record asset pair, network, decimals, update time, round and source methodology. A feed number is not an infallible valuation, and a proxy can introduce upgrade dependencies.

Apply the declared consumer check

Our fictional consumer accepts age≤60 seconds, requiring correct pair and decimals. At observationT1000, last updateT900 gives age100 and fails freshness. A fictional heartbeat120 does not override the consumer's60-second policy. Real feed updates can follow deviation and heartbeat conditions and face network delay; they are not continuous tick streams.

Separate pool spot from reference history

A spot reserve ratio can move sharply with a local swap. The v2 whitepaper discusses accumulated time-weighted price observations and the freshness-versus-manipulation tradeoff [V2]. A TWAP is a sampled method, not proof against every manipulation or stale market. Multiple feeds can share providers, so apparent redundancy need not mean independence.

Trace failure propagation

The original dependency chain is wrapped asset→redemption contract→oracle→lending threshold→liquidation exit pool. At each edge, ask which conversion or assumption is used. A redemption outage can undermine oracle meaning even if updates continue. An audit's scope, code version and date matter, and an audit does not guarantee safety. The offline exercise maps conditions; it supplies no executable attack or contract interaction.

Key terms

  • Freshness: age of last supplied observation relative to a consumer policy.
  • Heartbeat: update trigger interval, not continuous streaming.
  • Composability: one component's output becomes another's input.
  • TWAP: time-weighted price estimate with a declared window.

Historical example

ILLUSTRATIVE consumerT1000,feed updatedT900,heartbeat120,consumer maxAge60,correct pairSIM-X/SIM-Y,decimals2. Raw answer12345 means123.45 Y/X. Dependency route: wrappedX→redeemerR→feedF→lenderL→exitPoolE. No real contracts or timestamps.

Visual specifications

Wallet-graph-family dependency map, edges explicitly technical dependencies not identity/funding attribution; feed metadata side panel, age100>60, raw answer conversion and failed-redemption branch.

What the evidence proves

The fixture's freshness failure, decimal conversion and stipulated dependency route.

What the evidence does not prove

Actual feed configuration, provider independence, redeemability, audit effectiveness or protocol safety.

Evidence classifications

  • OBSERVED: FIX-P11-L07 gives updateT900 and checkT1000.
  • INFERRED: age100 fails the supplied 60-second consumer rule.
  • UNKNOWN: actual provider independence and redemption capacity.
  • INSUFFICIENT EVIDENCE: oracle updates or an audit guarantee solvency.

Common mistakes

  • Treating heartbeat as consumer acceptance rule.
  • Ignoring pair or decimals.
  • Assuming audit covers every dependency.

Practical exercise

Compute feed age and normalized answer. Decide acceptance under the supplied consumer policy. Map a redemption outage through the route and name two checks beyond freshness.

Deliver calculations or annotations, claim/source table and limitations. Suggested allocation: study 12 minutes, exercise 8, correction/quiz 10; estimate subject to calibration.

Show worked correction

Age1000−900=100 seconds;100>60 so reject under the toy consumer policy even though100<heartbeat120. Normalized answer12345/10^2=123.45 Y/X. Redemption failure can break the relation between wrappedX and redeemable underlying, then undermine valuation and lender thresholds; exact effects are UNKNOWN without rules. Pair/network identity, decimal convention, round validity and economic reference are separate checks. A recent timestamp alone is insufficient.

Formative rubric (5 points): reproducible inputs, correct method, correct result, claim-specific evidence scope, explicit limitations. Invented observation, advisory output or unsupported safety claim requires correction regardless of score.

Checklist

  • Verify pair/network/units.
  • Compute age against consumer policy.
  • Map shared upstream dependencies.
  • Preserve audit and oracle limitations.

Summary

Oracle assessment combines identity, units, freshness and economic dependencies. Composable mechanisms and audits remain bounded evidence.

Summary

  • Map oracle and composability dependencies.
  • Identify stale-data and local-price limitations.

Next lesson

P11-L08 after correction review.

Tools

NONE in the authoritative catalog. The supplied offline fixture/package is sufficient; no paid feature or unverified Production capability is required. Lab/certification metadata denotes downstream associations, not access gates or live awards.

Sources & claim boundaries

  • [ORACLE] Chainlink — Data feeds overview — Aggregation, proxy dependencies and timestamp/deviation/heartbeat limitations. Checked 2026-10-01; locator turn12view3.
  • [V2] Uniswap v2 core whitepaper (March 2020) — Reserve ratio, constant-product mechanics and input-fee invariant; version-specific, not a live deployment snapshot. Checked 2026-10-01; locator turn14view0.

Visual specifications

P11-L07-V01

SPECIFICATION_ONLY · ILLUSTRATIVE

Map dependencies and failure propagation

ILLUSTRATIVE — fictional inputs; no signal or safety guarantee.

Wallet-graph-family dependency map, edges explicitly technical dependencies not identity/funding attribution; feed metadata side panel, age100>60, raw answer conversion and failed-redemption branch.

Wallet-graph-family dependency map, edges explicitly technical dependencies not identity/funding attribution; feed metadata side panel, age100>60, raw answer conversion and failed-redemption branch.

At 390px stack chart/table, assumptions, correction and source panel; provide complete text equivalent. Rendering pending.

RTL explanatory prose; numeric values, IDs and chronological axes stay LTR; preserve dependency directions.

FIX-P11-L07

Sources & claim boundaries

ORACLE · PRIMARY_DOCUMENTATION

Chainlink — Data feeds overview

Supported claim
Aggregation, proxy dependencies and timestamp/deviation/heartbeat limitations.
Verification boundary
Documentation supports mechanism only; fixture values are original stipulated inputs. Historical publications remain attributed.
Checked at
2026-10-01
Open primary source
https://docs.chain.link/data-feeds/overview

V2 · PRIMARY_DOCUMENTATION

Uniswap v2 core whitepaper (March 2020)

Supported claim
Reserve ratio, constant-product mechanics and input-fee invariant; version-specific, not a live deployment snapshot.
Verification boundary
Documentation supports mechanism only; fixture values are original stipulated inputs. Historical publications remain attributed.
Checked at
2026-10-01
Open primary source
https://app.uniswap.org/whitepaper.pdf

Dataset provenance

id: FIX-P11-L07

dataStatus: ILLUSTRATIVE

observedAt: null

timeBasis: T/SIM markers are fictional order, not timestamps.

source: Author-created fixture embedded in this lesson.

scope: No market observation, usable address, secret, signature or personal financial data.

Test your reasoning

P11-L07-Q1 · What is feed age?
P11-L07-Q2 · Does heartbeat120 make the feed acceptable here?
P11-L07-Q3 · What is normalized answer?
P11-L07-Q4 · Can a current feed prove redeemability?
P11-L07-Q5 · What does an audit guarantee?