LOGBOOK

HELP

Quiz Entry - updated: 2026.07.30

Why can't a smart contract simply call an external web API by itself?

Because every node re-executes each transaction and must reach an identical result (deterministic execution) — an external call could return different data on different nodes and break consensus.

Consensus works because the computation is deterministic: given the same recorded inputs, every honest node that replays a transaction lands on exactly the same new state. If a contract could fetch https://price-feed mid-execution, node A might see 100, node B might see 101 (timing, downtime, or outright manipulation), so the nodes would compute different states and never agree on the ledger. Platforms therefore forbid nondeterministic I/O inside contract code. The oracle pattern relocates the fetch: one off-chain process makes the call once, then submits the answer as ordinary transaction data. Now every node replays the same transaction over the same recorded input and stays in sync — at the price of having to trust that input.

From Quiz: IOTHACK / Blockchain Oracles: Bridging On- and Off-chain | Updated: Jul 30, 2026