Oracle
Serviço que fornece dados do mundo externo a contratos inteligentes, permitindo que decisões on-chain usem informações de fora da blockchain.
Key points
- An oracle is a service that brings real-world data into the blockchain, allowing smart contracts to use information from outside the network.
- Smart contracts cannot, on their own, access external data such as prices or event outcomes, and the oracle fills that gap.
- The reliability of the oracle is critical: if the data it provides is wrong or manipulated, the contract that depends on it acts incorrectly.
What is an oracle?
An oracle is an information bridge between the blockchain and the outside world. Smart contracts can only see data that is already on the network; they cannot, by themselves, check an exchange rate or the outcome of an event. The oracle supplies that information so the contract can use it to decide what to do, such as liquidating a position or releasing a payment.
How it works
An oracle collects data from external sources and publishes it on the blockchain, where contracts can read it. To avoid relying on a single source, many oracles are decentralized: they gather information from several independent providers and combine those values, reducing the chance that a single incorrect or manipulated data point contaminates the result.
The quality of the oracle determines the quality of the on-chain decisions that depend on it. A delayed or distorted price can trigger improper liquidations or allow someone to exploit the difference. That is why serious oracles pay attention to source diversity, update frequency, and mechanisms that make manipulation harder.
Asset prices are the most common use case, but oracles also bring data such as interest rates, events, and information from other networks.
Why it matters
Much of decentralized finance depends on oracles to function: lending protocols, derivatives, and stablecoins need reliable prices to operate. For a company integrating on-chain services, understanding where a contract's data comes from is part of assessing the risk of the solution. Without reliable oracles, contracts that depend on external information would have no safe way to decide.
Risks and limitations
The oracle is a sensitive point: manipulating the data it provides is a known way to attack protocols, especially when the source is single or has low liquidity. Delays in updating also cause wrong decisions. That is why the security of an on-chain system is, to a large extent, the security of the oracles it depends on. Choosing diverse, manipulation-resistant sources is therefore a critical design decision.