Oracles: An educational journey from Sophocles to smart contracts

Oracles: An educational journey from Sophocles to smart contracts

We take an informative look at the technology connecting the real world with the decentralized one.

Oracles have been a red-hot topic lately and Wootrade’s integration with Chainlink makes it even more topical. But what does an oracle even do?

The word oracle brings with it a sense of mysticism and has its roots in the oracles of antiquity, where humans with special connections to the gods became a conduit for information from beyond the mortal world. They first appeared in Greek plays and literature, dating back to around 700 BCE.

The oracle in the Greek play Oedipus Rex correctly predicts that the king will kill his father and marry his mother. This was not confirmed on the blockchain, so we are left to speculate whether Sophocles represented this scene accurately.

In the world of cryptocurrency, an oracle facilitates the transfer of information from the outside world to the blockchain and sometimes vice versa. This information is then used by smart contracts to perform actions that affect billions of dollars in on-chain assets. Examples of off-chain data are the prices of traditional stock markets such as Japan’s Nikkei 225, the UK’s FTSE 100, or the price of Gold. It can also relay more commonplace data, such as the scores of an NBA game, the result of an election, or anything else that might have people relying on the outcome.

Smart contracts rely on oracles for the input of information that lies outside of the blockchain. Without an oracle, smart contracts can only use on-chain info or data which severely limits their usefulness.

Example: Two strangers, Amy and John, want to bet on the winner of the next NBA game between Los Angeles and Oklahoma City. How can the smart contract know who actually won the game since it happened outside of the blockchain?

Oracles solve this problem by allowing information about the result to be sent to the smart contract.

In this case, Amy bets $500 on the Lakers and John $500 on the Thunder. The Lakers then win the game, and the data on who won is collected by the Oracle and delivered to the smart contract. After receiving the data, the smart contract unlocks the award, sending $1000 to Amy.

Oracles seek to avoid the “garbage in, garbage out principle” where bad data input means the integrity of the smart contract is at risk, putting hundreds of millions of dollars from today’s DeFi environment on the line.

Just recently, an attack on a stablecoin oracle resulted in the liquidation of $100 million USD worth of crypto assets. Liquidation on DeFi lending platforms occurs when the smart contract determines the loaned amount is equal or more than the staked amount (collateral), causing the smart contract to take and sell the user’s collateral to repay the original lender. This particular attack was made possible by using a singular price source on an exchange, which is easy to manipulate with a large market buy order. This resulted in the USD stablecoin DAI, which normally trades around $1 to increase in price as high as $1.30, causing liquidations on loans taken out in DAI.

The price of stablecoin DAI spiked, causing smart contract chaos. Source: Cointelegraph

Compound liquidator makes $4M as oracles post inflated Dai price

The crypto market suffered a powerful crash on Thursday morning UTC, which sent prices of major currencies such as…

cointelegraph.com

This is why decentralized oracles such as Chainlink are so important.

Chainlink ensures that data sent on-chain is not manipulated at the source by using a decentralized network of data providers and aggregating the data input.

Any misbehaving data provider or node gets penalized and eventually kicked out of the system which denies any future income to the bad actor.

Wootrade’s integration with Chainlink further expands the usefulness of Oracles by using Chainlink’s decentralized oracles to prove trader performance and their positions.

How does this work? Here’s an example:

Audrey claims she is earning a 30% yearly return on her trading activities and is starting a paid channel to share her trades with her community. How can she prove this 30% return is real?

Documents with trading activity can be falsified, and so can screenshots, videos of trades taken, or positions/funds currently held.

Also, some traders would rather not reveal their private information, personal identity, or even their face, which makes it even harder to check legitimacy.

By checking trader information provided by Chainlink and Wootrade, a potential investor can verify that a trader’s trading history does indeed match up to claims and check to see the trader isn’t running a pump-and-dump scheme or frontrunning their calls.

A pump-and-dump or frontrunning scheme occurs when a trader takes a position in a cryptocurrency or token before announcing it to followers. The followers then buy into that token, pumping the price, allowing the trader to exit the position and dump on the unfortunate followers. This can easily be done in crypto markets due to the lack of regulation and thin order books for low cap tokens.

Study: Pump and Dump Schemes Account for $7 Million of Monthly Trade Volume

A recent study has found that pump and dump schemes account for about $7 million worth of trading volume per month, MIT…

cointelegraph.com

On the other hand, responsible traders using oracles can earn income off their strategies by offering derivatives or synthetic assets based on their trades, holdings, and other data while giving investors the security of not giving away full control of their funds to a trader.

By pushing this initiative forward, we aim to eliminate trader fraud, frontrunning, and protect the general public from manipulative traders. All this can be done without the need to rely on rating agencies, social media testimonies, and other untrusted sources that are prone to manipulation and fraud.

Overall, Oracles are much more than just a data feed, they are a critical means of securing cryptocurrency, smart contracts, and DeFi. Ancient Greek kings saw the value in oracles, now it’s time that professional traders do as well.

Got it? Each week, following the completion of our educational article, Wootrade’s Telegram Channel will conduct a quiz, allowing members the chance to win $WOO tokens or other prizes. Follow our social media links for more:

We use cookies to improve your experience. To find out more, please read our Privacy Policy. By clicking "Accept", you consent to our cookie and Privacy Policy. Or you may click "Decline" to refuse to consent.