Skip to content

Smart contracts call out to Web2

Today, the majority of the world’s API-accessible data, such as stock prices, football scores, IoT-related data, or crypto exchange prices, is hosted on Web 2.0 services, which is outside the secure on-chain walls of a blockchain. As smart contract software often relies on external web 2-hosted data to implement useful functionality, it is crucial that this data be accessible, first to unfold the full potential of smart contracts, and second, to pave the way for blockchain singularity, whereby the majority of computations run on the blockchain.

A common limitation of blockchain technology is that smart contracts can receive messages, but cannot send them to the world outside the blockchain. For example, typical smart contracts can receive messages, but cannot send emails and SMSs, nor can they query wikipedia or send HTTP requests to other services. Historically, this has been a blocker to most software developers diving into Web3. For this reason, obtaining off-chain data requires that a smart contract interact with centralized oracle services, which are in the hands of intermediaries, vulnerable to hacking, and subject to service fees.

Canister HTTPS outcalls on the Internet Computer blockchain allow direct interaction with Web 2.0 and other blockchains without oracles. Canister smart contracts can make HTTPS outcalls to specified URLs to directly obtain off-chain data, or to interact with off-chain systems, such as Web 2.0 services or enterprise IT infrastructure.

More information can be found in the developer docs.