DEV Community

loading...
Cover image for Oracles on Clarity

Oracles on Clarity

jun_gong profile image Jun Gong ・3 min read

Blockchain oracle is so in right now.

In the last few weeks, I’ve been working on an online hackathon 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, 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.

The Oracle FOMO

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. Oracles are the only way for smart contracts to interact with data outside of the blockchain environment.

Let’s Get Some Clarity and Embrace the Oracle

More and more blockchain projects have adopted and integrated oracles and Blockstack is the latest one — recently, Chainlink has become the oracle service provider for Blockstack and its Stacks 2.0 network. Stacks 2.0 implements Proof-of-Transfer (PoX) mining mechanism that anchors to Bitcoin’s security, with Clarity, a new smart contract language.

But why blockchain developers need a new programming language instead of embracing the existing ones?

Clarity is a new open-source language that helps to reduce the smart contracts’ vulnerability. Clarity will be the one that brings smart contracts and dapps to the Bitcoin network. 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.

What can oracles bring to the Stacks ecosystem?

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.

Some Useful Resources

Hope you find oracle and Clarity language interesting. If so, here are some useful resources to help you get started:

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?

Discussion

pic
Editor guide