Oracles on Clarity
Tags: blockchain, blockstack, clarity, oracle
Published: 2020-10-28 12:46:18

_Blockchain oracle is so in right now._

In the last few weeks, I’ve been working on an [online hackathon](https://medium.com/ethplanet/building-the-next-digital-world-hackathon-winner-announced-3f490ec6c999) project. Organizing hackathon is always fun — I enjoy things like creating an ultimate platform for hackers, builders, artists, and anyone else from all backgrounds who want to build things together, and of course, I’m inspired by people all the time.

There’s one project caught my attention — [VerityNet](https://devfolio.co/submissions/cellarnet), fairness apps and architectures for DeFi. Unlike everyone else is building money legos by “adding” a bunch of protocols, VerityNet created a fairness application architectures with the help of multiple components, such as Aave, zkSnarks, zkRollups, and etc. It’s like a different kind of lego building. Among all the “legos”, the team also used fairness oracles, powered by Chainlink VRF. They need oracles to provide financial data inputs from the outside world into smart contracts and only oracles can help with that, “because we believe the concept of fairness and we need fairness financial data feeds”, said the VerityNet team.

<h1>The Oracle FOMO</h1>
Blockchain oracle is so in right now — thanks to the oracle service providers like Chainlink, Band Protocol and etc.

A blockchain oracle is just like a translator of information. Bitcoin, Ethereum, and other public blockchains don’t have the capability to access accurate and reliable data from the real-world because that information is not on the existing blockchain. Oracles provide the data to trigger smart contract to execute when the original terms of the contract are met, for example like VerityNet, oracles can get the financial data that is not on the Ethereum blockchain; or in the supply chain tracking case, oracles can help company send the package information to the smart contracts, and then let contracts do their on-chain work. <b>Oracles are the only way for smart contracts to interact with data outside of the blockchain environment.</b>

<h1>Let’s Get Some Clarity and Embrace the Oracle</h1>
More and more blockchain projects have adopted and integrated oracles and [Blockstack](http://blockstack.com/) is the latest one — recently, Chainlink has become the oracle service provider for Blockstack and its [Stacks 2.0](https://www.blockstack.org/testnet) network. Stacks 2.0 implements Proof-of-Transfer (PoX) mining mechanism that anchors to Bitcoin’s security, with Clarity, a new smart contract language.

<h3>But why blockchain developers need a new programming language instead of embracing the existing ones?</h3>
Clarity is a new open-source language that helps to reduce the smart contracts’ vulnerability. Clarity will be _<b>the one</b>_ that <b>brings smart contracts and dapps to the Bitcoin network</b>. With the help of Clarity, developers will be to write smart contracts, predict exactly how their smart contracts will be executed, and host secure smart contracts on a decentralized network maintained by developers themselves.

<h3>What can oracles bring to the Stacks ecosystem?</h3>
Simply put, if developer runs a dapp or DeFi on Stacks and backed by Bitcoin, oracles can help to get access to market data. Also, in order to make data more trustless, instead of relying on a centralized oracle, the smart contracts request data from a decentralized blockchain oracle network — this is where Chainlink comes in, allowing multiple Chainlinks to evaluate the same data before it becomes a trigger. The off-chain data that Chainlink oracles help Clarity smart contracts get access to, it can be separate blockchain or web APIs. So if the dapp is built on other blockchains (like Ethereum), Stacks developers can access that dapp’s data via Chainlink and use it as an oracle.

Without a doubt, the integration of Chainlink’s decentralized oracle on Stacks 2.0 will unlock multiple use cases in the Stacks ecosystem. And I’m sure that the community will make the oracle service more reliable and secure.

<h1>Some Useful Resources</h1>
Hope you find oracle and Clarity language interesting. If so, here are some useful resources to help you get started:

- [Clarity on Github](https://github.com/clarity-lang)
- [Smart contract tutorial](https://docs.blockstack.org/smart-contracts/hello-world-tutorial)
- [Proof-of-Transfer](https://docs.blockstack.org/stacks-blockchain/overview#proof-of-transfer-pox)

A final question: Do you think Clarity with the help of oracles will win the hearts of developers and eventually, build the user-own internet?