James Bachini

Crypto Oracles | Moving Data On-Chain

Crypto Oracles

This article is derived from a chapter in the free eBook explaining DeFi technologies:
DeFi Demystified | An Introduction To Decentralized Finance

Crypto oracles provide an essential bridge between off-chain and on-chain data. If a smart contract needs access to price feeds, random numbers or external data they will need to use an oracle because the smart contract can not make outgoing connections past the boundaries of on-chain data.

In traditional web development, an API (application programming interface) provides a web address for developers to connect to so they can gain access to data and execute functions programmatically. Centralized exchanges such as Binance will provide API access and API keys for their users so they can trade programmatically using trading bots and scripts for example.

Smart contracts can only read data provided to them via user transactions and can’t connect to anything externally posing a problem for developers that need external data. This problem is being solved by oracles who upload data such as price feeds to the blockchain.

Oracles take real world data and upload it to the blockchain so it can be used within smart contracts. The most famous oracle service is Chainlink which itself has a market cap of ten billion US dollars.

Chainlink's Crypto Oracles

The market cap or capitalisation of a cryptocurrency is calculated by multiplying the circulating supply by the token price. This is usually a debatable issue with leading websites not including vested tokens and treasury wallets in the circulating supply.

Smart contracts can use price feeds supplied by oracles to help prevent smart contract attacks that manipulate prices such as flash loan attacks.

Flash loans enable the instant deployment of massive amounts of capital which can be used to manipulate the value of assets within a liquidity pool. Pools that use oracles price feeds can reject transactions which are out of line with the current off chain price provided by the oracle.

This article is part of a series DeFi Demystified | An Introduction To Decentralised Finance


This article is derived from a chapter in the free eBook explaining DeFi technologies:
DeFi Demystified | An Introduction To Decentralized Finance

.


Get The Blockchain Sector Newsletter, binge the YouTube channel and connect with me on Twitter

The Blockchain Sector newsletter goes out a few times a month when there is breaking news or interesting developments to discuss. All the content I produce is free, if you’d like to help please share this content on social media.

Thank you.

James Bachini

Disclaimer: Not a financial advisor, not financial advice. The content I create is to document my journey and for educational and entertainment purposes only. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. Do your own research and do not play with funds you do not want to lose.


Posted

in

, ,

by