Most blockchains rely on oracle services to pull real-world data into smart contracts. @dfinity's Internet Computer takes a different approach, building that trust layer directly into its own consensus mechanism.

How HTTPS Outcalls Work

The feature allows smart contracts to directly make calls to HTTP(S) servers external to the blockchain and use the response in further processing, without the need for oracles. It currently supports GET, HEAD, and POST methods for HTTP requests.

The mechanics are straightforward but deliberate. Every node in the subnet hosting the smart contract separately requests the same URL. More than two-thirds of those nodes must agree on the reply before the contract can act on it, a threshold that mirrors ICP's broader Byzantine fault-tolerance design. The protocol is designed to hold as long as fewer than a third of the nodes in a subnet are offline or malicious.

On a standard 13-node subnet, that means 13 identical calls hit the target API at once. To ensure nodes can reach agreement on what they receive, a contract-side transform function strips out parts of a response that naturally vary between requests, such as timestamps, so that honest nodes can produce a matching result. Developers are also advised to add deduplication keys to prevent servers from processing the same logical request multiple times.

Why It Matters

The architecture carries several practical benefits over the traditional oracle model. The decentralization achieved using HTTPS outcalls is the best that can be achieved, as it only involves the subnet replicas and the external service to be called, with no third parties such as oracle services. Users typically get a cheaper service as oracle middlemen are cut out, and the latency of direct HTTP calls is lower than routing a request through an oracle contract.

Use cases include getting real-time exchange rates for cryptocurrencies to build DeFi applications and querying weather data for decentralized insurance products. HTTPS outcalls also allow for sending push notifications and emails via traditional communications channels, and integration with other blockchains by communicating with HTTP-based cloud nodes.

For developers, the tradeoff is that the external API must be able to handle the burst of simultaneous identical requests from every node in the subnet. Proper use of deduplication and response transforms is therefore essential to reliable operation.

Sources:
Internet Computer: HTTPS Outcalls, How It Works (Official Docs)
Internet Computer: How to Use HTTPS Outcalls (Official Docs)
FF News: ICP Blockchain Introduces HTTPS Outcalls to Advance Web3 Growth