LOGBOOK

HELP

1 / 24
Other keys: showSpace: good1-4: rate0: skip5: flag

Question

What is a blockchain oracle, and what fundamental limitation does it exist to overcome?

Answer

An oracle is a bridge component that moves data between a blockchain and the outside world — it exists because a blockchain is a closed-world system that can only see data already recorded on-chain.

A blockchain is, at bottom, an append-only, replicated store of transactions linked into a chain by hashing. From inside, code running on it (a smart contract) can read only state that is already on the chain — it has no way to open a network socket, call a web API, or read a physical sensor. That isolation is not an accident: it is what lets every node independently re-run a transaction and agree on the outcome. An oracle sits at that boundary and does the outside-world interaction off-chain, then hands the result to the chain (or carries chain data outward). It is the standard answer to "how does on-chain code learn a price, the weather, a random number, or that a shipment arrived?"

Go deeper:

or press any other key

Question

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

Answer

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.

or press any other key