LOGBOOK

HELP

Quiz Entry - updated: 2026.07.30

What is the Oracle pattern: the problem it solves, the solution, and its main trade-off?

An oracle is a trusted service that injects external-world state onto the chain so smart contracts can validate transactions against facts they otherwise can't see — the trade-off is that it re-introduces a trusted third party the chain was meant to avoid.

  • Problem. A smart contract is a pure function in a self-contained environment; it can't read weather, prices, geolocation, or any external state. Yet validating a transaction sometimes depends on exactly that.
  • Solution. Introduce an oracle: a trusted party that supplies contracts with information about the outside world. It can be a smart contract into which an off-chain injector periodically writes external state, or a server outside the chain that signs transactions with its own key. When a transaction's validity depends on external state, the oracle checks that state and hands the result to the validator, which takes it into account. Validation then rests on trusting the oracle rather than on the external state directly.
  • Consequence / trade-off. Benefit: connectivity — the sealed environment is linked to the world. Drawbacks: trust (a central oracle is a single point of failure that every relevant participant must trust) and validity (miners can't independently check the injected state, and that state may change after the transaction is fixed on-chain). Mitigation: a distributed oracle — several independent oracles plus an M-of-N multi-signature — spreads the trust.

Go deeper:

  • doc Blockchain oracle (Wikipedia) — the oracle problem, oracle types (software / hardware / consensus), and why an oracle is a re-introduced trust assumption.
  • doc Chainlink Data Feeds (docs.chain.link) — a production decentralised-oracle network: exactly the "distributed oracle" mitigation, aggregating many independent nodes into one on-chain answer.

From Quiz: IOTHACK / Design Patterns for Blockchain Applications | Updated: Jul 30, 2026