The power of HTTPS outcalls on the Internet Computer lies in their ability to connect smart contracts directly to the Web 2.0 world, opening up a plethora of use cases. Retrieve market data from crypto exchanges, send emails, integrate with other blockchains, and more.
How it works
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.
The oracle problem
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 SMS's, 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.
HTTPS outcalls replace oracles
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.
Exchange rate canister
Powered by HTTPS outcalls, the exchange rate canister (XRC) on the Internet Computer fetches data from Web 2.0 servers and lives entirely on chain. It interacts with major cryptocurrency exchanges using their public APIs to retrieve real-time or historical pricing information. The XRC also periodically queries public APIs of foreign exchange data providers around the world to get forex rates. The XCR can be integrated in DEXs to compare exchange rates against market rates and determine the value of assets held under management in a canister smart contract, for example, with respect to a fiat currency.
Build with HTTPS outcalls
Connect smart contracts directly with Web 2.0 to interact with other blockchains or to fetch IoT-related data, stock exchange prices, weather forecasts, etc. – all without introducing additional trust assumptions.
Start integrating the HTTPS outcalls feature in your dapps and services to connect to off-chain data.
Read the Medium blog why HTTPS outcalls are important for blockchains.
Build a dapp with canister outgoing HTTPS outcalls
Get a high-level overview of how HTTPS outcalls work on the Internet Computer.