To DFINITY and Beyond! An Oracles Framework for the Internet Computer
Disclaimer: due to the rapid progress being made in this field, information in this post may go out of date. This blog post is not financial or legal advice of any sort.
We are excited to announce the creation of an open-source oracles framework for DFINITY’s Internet Computer (IC)!
This framework will be a jumping off point for the IC developer community, empowering them to easily connect applications on the Internet Computer to the real world. It’s been thoroughly documented and designed to be very simple to use, enabling developers to set up an oracle within 10 minutes.
But before we dive into this further, what’s an oracle?
Most blockchains are designed to be deterministic — if anyone were to replay transactions from the very first block to the most recent, the results should be the exact same every time.
This is because blockchains are decentralized. They require consensus amongst multiple nodes in order to validate a transaction, such as a payment from person A to person B.
As a result, blockchain networks are designed to be fairly isolated from the outside world. This is because external websites can fail, or data may change over time.
But at the same time, developers want to be able to build more meaningful apps that use data from the real world — ‘off-chain’ data. For example:
- A payment platform needs to know the exchange rates of other currencies.
- A supply chain application needs to know if a package has arrived in order to decide what to do next.
- A betting platform wants to know if Donald Trump or Joe Biden won the election in order to correctly pay out bets.
For blockchains to realize many of their potential use cases, oracles are essential! These send data to the blockchain, allowing smart contracts to execute the correct logic, such as sending money to a party.
Blockchains by design are designed to be isolated from the outside world, and don’t need to trust a single entity.
But now our smart contract is relying on trusting a 3rd-party data source. The input is no longer guaranteed to be deterministic — and this creates a huge risk. This is called the oracle problem.
To address this, startups such as Chainlink decentralize their oracle networks such that a blockchain can remain both deterministic and highly secure when accessing data.
The DFINITY Foundation is a non-profit that is building the Internet Computer (IC) — a blockchain computer aiming to build a secure, cost-effective, and decentralized cloud computer. Here’s more details paraphrased from their primer:
The Internet Computer Protocol (ICP) weaves together the compute capacity of special node machines operated en masse by independent data centers around the world. The protocol creates a seamless unified public compute platform in cyberspace. Advanced computer science and blockchain math make it tamper proof and unstoppable.
The IC hosts WebAssembly “canisters” — an evolution of smart contracts. Canisters are unstoppable and tamperproof secure units of code. The Internet Computer can be used to build many things better including Hyperscale internet services, Pan-industry platforms, DeFi systems, and much more.
Oracles + Internet Computer = Awesome
In the Internet Computer’s case, developers need reliable examples of successfully-completed oracles. Real-world data from oracles will be key for many of the Internet Computer’s use cases to be realized.
The oracles framework contains complete examples of retrieving weather data and price data for ETH and BTC.
It has been thoroughly documented and designed to be very simple to use, enabling developers to set up an oracle within 10 minutes. It even does all the setup for you: creating a canister, ensuring the code gets updates, and creating identities required.
We wanted this framework to be simple and accessible for new developers to use it. We’ve ensured that all of its defaults are sane, so it is ready to use out-of-the-box.
Prior to our oracles framework, there weren’t any clear examples or standards for IC developers to follow. New developers now have a reference for building applications, and hope this further boosts IC’s fledgling ecosystem!
Special thanks to the DFINITY Foundation for supporting this project, and Anthony Zhang and Haardik Haardik for making this project a reality.
Hypotenuse Labs builds incredible web, AI, and blockchain products. We are an elite team with experience building products for some of the world’s largest tech brands such as Facebook, Amazon, and Uber.
If you’re looking to build products at the cutting-edge, shoot us a message at email@example.com!