An oracle connects a blockchain application with information or actions beyond its own execution environment. Price reports are one example; event outcomes, weather observations, and reserve data can also inform contract decisions. Oracles may also relay blockchain outputs to external systems.
Why a contract needs a connection
Nodes must execute a transaction consistently. Having every node independently request a changing website would not reliably produce the same answer. An oracle instead submits information through an agreed process that contracts can read and use deterministically.
Designs differ. One provider may sign a report, multiple reporters may aggregate observations, or an optimistic system may accept a proposed answer unless challenged within a specified period. Data can be published periodically or requested for a particular event.
Trust extends beyond the chain
Recording an answer onchain proves neither that the original observation was accurate nor that it is still current. Reliability depends on sources, reporter incentives, verification rules, update timing, and dispute procedures.
Applications therefore need appropriate freshness checks and responses to unavailable or implausible data. A decentralized oracle can reduce dependence on one reporter, but shared data sources, correlated failures, and faulty integration can still affect contract outcomes.