freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #77 of 90

oracles · chainlink · pyth · uma

BlockyVSDouble-Spend Dan
Blocky saysOracles feed off-chain data (like prices) onto the chain — contracts can’t fetch the internet.

Smart contracts are deterministic and sandboxed: they can't call an API. Oracles (Chainlink, Pyth, UMA) bridge that gap, delivering external data — asset prices, weather, sports scores — on-chain for contracts to use. Decentralized oracle networks aggregate many sources to resist manipulation, because a single bad price feed can drain a DeFi protocol via the "oracle attack."

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleExplain why a manipulated price oracle can drain a lending protocol.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>contract needs ETH price → can’t call an API
oracle network → aggregated price on-chain
fake the price → borrow against inflated collateral</pre></body></html>
▶ Open the interactive comic issue
‹ Bridge Hacks · Why Bridges Are HoneypotsData Availability · Celestia · Eigenda · Avail ›