Smart Contracts & Oracle Networks Explained

by | Jun 3, 2021

Disclaimer: Posts on the HyperTrader blog and associated HyperLinq websites are for educational and informational purposes only. These posts should not be taken as financial advice, nor are they meant to be viewed as trading advice. HyperLinq Inc. or the authors take no responsibility for any damages or losses.

Smart Contracts & Oracle Networks Explained

“The noblest pleasure is the joy of understanding.” – Leonardo da Vinci

When diving into the world of blockchain and cryptocurrencies, it’s easy to get drowned in the vast sea of tech jargon and complex names. If you’ve heard of Blockchain technology, you must have heard of smart contracts or oracle networks and how they’re changing the foundation of financial services. But have you ever wondered what exactly a smart contract is and how does it work? Let’s find out.

In our 2-part blog posts earlier, we understood the concept of blockchain technology, looked into its components, its significance, and its applications. Today, let’s take another step and get ourselves acquainted with the concepts of smart contracts and oracle networks.

What are Smart Contracts?

By definition, smart contracts are self-executing computer codes that are written on a distributed ledger. In simple language, smart contracts are similar to real-world contracts but stored digitally. The key point is – as they’re stored on a blockchain, smart contracts inherit two key properties  – immutable and distributed. Meaning smart contracts, once deployed on a blockchain network, cannot be changed and distributed across the network, allowing anyone to interact with them.

Still confused? Well, let’s break it down further. So a blockchain is basically a ledger shared among all the peers containing all the transactions, i.e., a distributed ledger. Now rather than just writing a transaction detail such as “Alice transfers $10 to Bob” on a distributed ledger, what if you add a condition for the transfer to occur? Now let’s say Alice will transfer $10 to Bob only when it’s a full moon.

In this case, Alice will write a contract that will transfer the given amount to Bob upon checking the condition, i.e., if it’s a full moon or not. That, my friend, is a smart contract.

How Do They Work?

So, how do smart contracts work? Well, currently, Ethereum is the biggest smart contract platform so let’s talk about it. 

Smart contracts are basically Ethereum accounts located on a specific address, just like your digital wallet has an address. The difference, however, is that a smart contract address is not controlled by a user but deployed on the network and runs as it is programmed. Users can interact with these smart contracts by submitting transactions to the given address. 

For our earlier example, Alice will need to write a smart contract with predefined conditions along with Bob’s account details (Bob’s wallet address) and depositing the required amount in it. Once the smart contract is deployed, it will automatically transfer the funds to Bob’s account without any human intervention when its predefined conditions (occurrence of a full moon) are met. 

Now, the question arises, if the predefined conditions for a smart contract rely on a real-world incidence, how do smart contracts pull that data? In our example, how would a smart contract know whether it’s a full moon or not? 

One would say that’s simple – we can just pull the data through an API from a weather service. Well, unfortunately, we can’t do that for smart contracts. That’s because smart contracts are stored on a blockchain, making them immutable and irreversible. Therefore, relying on a single service can be dangerous as it can manipulate a smart contract. What if the given weather service feeds incorrect data to the smart contract? 

That’s why we need decentralized oracle networks to avoid that single point of failure.

Oracle Networks (Decentralized)

Oracle networks, in essence, provide real-world data to a blockchain without a single point of failure. Basically, oracle networks act as a bridge for smart contracts to interact with real-world data.

So, in order to find out whether it’s a full moon or not, Alice’s smart contract can interact with an oracle network to pull the given data. Thus, avoiding the need for relying on a centralized entity such as a weather service.

So how do oracle networks ensure the correctness of data?

Well, oracle networks basically pull data from multiple sources to ensure the correctness of data. Simple as that. Oracle networks are a proof-of-stake blockchain network where every validator (or a data verifier) needs to stake a certain amount of cryptocurrency in order to participate in the network and earn rewards. 

Thus incentivizing the validators to feed correct data and earn rewards whereas, at the same time, the stake acts as a safety deposit that can be slashed if the validator feeds incorrect data. And that’s how oracle networks provide data to smart contracts by utilizing multiple data inputs in a decentralized manner. 

Head of Content Marketing @ HyperLinq. His love for Chai and mountains precedes everything. Often wonders about things like, "why $1 earned through leverage feels 100x better than $1 earned selling your time?"
Head of Content Marketing @ HyperLinq. His love for Chai and mountains precedes everything. Often wonders about things like, "why $1 earned through leverage feels 100x better than $1 earned selling your time?"

Top 5 DeFi Projects

Blockchain technology is pushing the boundaries of innovation across the spectrum from solving the trust, decentralized finance, programmable money to all the way towards art ownership. Today, we’ll talk about the DeFi and specifically, the top five DeFi projects....

What are Stablecoins?

Whenever we talk about money or a currency, we all agree it should serve three main purposes - a medium of exchange, a store of value, and a unit of account. Bitcoin, as the world’s first truly digital currency, checks all three purposes and sets itself apart from all...

How Crypto Exchanges Work? CEX vs. DEX

When it comes to participating or investing in crypto, the first step always starts with an exchange. A crypto exchange can be defined as a marketplace for trading cryptocurrencies in exchange for other cryptocurrencies or fiat money. A crypto exchange is a platform...

What is Crypto Staking?

Ever since mainstream media picked up the Bitcoin energy consumption issues, the Proof of Work (PoW) consensus mechanism has become the talk of the town. Even though energy consumption through Bitcoin mining is a nuanced issue, most fail to understand the depth of the...

What is the Bitcoin Lightning Network?

There's no doubt Bitcoin has revolutionized the idea of currency, taking it away from the hands of governments and giving the power back to people. Powered by distributed ledger technology, aka blockchain, Bitcoin kickstarted a series of innovations in the field of...

All You Need to Know About Web 3.0

A Greek Philosopher once said, “The Only Constant in Life Is Change.” Yet, throughout the course of history, human beings are always resistant to change. Whether it’s Galileo being prosecuted for proving the sun as the centre of the solar system, not the earth or...

How Blockchain Works?

This is part-2 of the series “What is Blockchain and How it Works?”. To get the context and understanding of what exactly is blockchain technology, please first read part-1. In our last article we discussed and understood the significance and applications of...

What’s the Difference: Bitcoin vs. Litecoin

The year is 2011; it's already been two years since the first-ever cryptocurrency known as Bitcoin came into existence. And now there's another player in the town, calling itself Litecoin. Started with a disagreement over some Bitcoin core rules, the blockchain split...

What is a DAO?

The Crypto ecosystem can be said to be one of the most innovative segments of this world. The ecosystem is trying to change the concept of money, art-ownership, decentralized finance, crowdfunding, and whatnot. Adding to the list of innovations is DAO aKa...

What Exactly is Blockchain Technology?

In the last decade, the buzzword blockchain has created many ripples across the world, not just in technology segments but across the spectrum. From being called the 21st century’s most revolutionary technology to a glorified spreadsheet, blockchain technology has...

Top 5 DeFi Projects

Blockchain technology is pushing the boundaries of innovation across the spectrum from solving the trust, decentralized finance, programmable money to all the way towards art ownership. Today, we’ll talk about the DeFi and specifically, the top five DeFi projects....

What are Stablecoins?

Whenever we talk about money or a currency, we all agree it should serve three main purposes - a medium of exchange, a store of value, and a unit of account. Bitcoin, as the world’s first truly digital currency, checks all three purposes and sets itself apart from all...

How Crypto Exchanges Work? CEX vs. DEX

When it comes to participating or investing in crypto, the first step always starts with an exchange. A crypto exchange can be defined as a marketplace for trading cryptocurrencies in exchange for other cryptocurrencies or fiat money. A crypto exchange is a platform...

What is Crypto Staking?

Ever since mainstream media picked up the Bitcoin energy consumption issues, the Proof of Work (PoW) consensus mechanism has become the talk of the town. Even though energy consumption through Bitcoin mining is a nuanced issue, most fail to understand the depth of the...

What is the Bitcoin Lightning Network?

There's no doubt Bitcoin has revolutionized the idea of currency, taking it away from the hands of governments and giving the power back to people. Powered by distributed ledger technology, aka blockchain, Bitcoin kickstarted a series of innovations in the field of...

All You Need to Know About Web 3.0

A Greek Philosopher once said, “The Only Constant in Life Is Change.” Yet, throughout the course of history, human beings are always resistant to change. Whether it’s Galileo being prosecuted for proving the sun as the centre of the solar system, not the earth or...

How Blockchain Works?

This is part-2 of the series “What is Blockchain and How it Works?”. To get the context and understanding of what exactly is blockchain technology, please first read part-1. In our last article we discussed and understood the significance and applications of...

What’s the Difference: Bitcoin vs. Litecoin

The year is 2011; it's already been two years since the first-ever cryptocurrency known as Bitcoin came into existence. And now there's another player in the town, calling itself Litecoin. Started with a disagreement over some Bitcoin core rules, the blockchain split...

What is a DAO?

The Crypto ecosystem can be said to be one of the most innovative segments of this world. The ecosystem is trying to change the concept of money, art-ownership, decentralized finance, crowdfunding, and whatnot. Adding to the list of innovations is DAO aKa...

What Exactly is Blockchain Technology?

In the last decade, the buzzword blockchain has created many ripples across the world, not just in technology segments but across the spectrum. From being called the 21st century’s most revolutionary technology to a glorified spreadsheet, blockchain technology has...
%d bloggers like this: