What are Oracles in Crypto? (Animated)
The internet is kind of like a big encyclopedia, except we would need a library, the size of texas, to hold all that information. If youre here, youre, probably wondering how thats relevant to a blockchain oracle and well get to that, but first welcome to whiteboard crypto the number one youtube channel for crypto education. And here we explain topics of the cryptocurrency world using analogies stories and examples so that you can easily understand them. In this video, we are going to explain what an oracle is, how it works and why they are necessary for the development of better and more useful blockchains lets go over a refresher of what a blockchain is so blockchains are simply technology that store data, usually transactions And they store this data in a group called a block. Now each block usually has some data before it, and hopefully some data after it, but all they do is pretty much just store transactions. If you need a refresher on what a blockchain is, we actually have an entire video about that next, up, advanced blockchains can actually have something called smart contracts. Again we have an entire video explaining what a smart contract is and we go over some examples of them. So check that video out first, if you havent already as a recap, smart contracts are agreements on the blockchain that only get executed if the agreements are met. For example, we could say something like if whiteboard crypto doesnt have 1 million subscribers by 2022 pay theodore.
100. Oh, by the way my name is theodore, we can also write a smart contract that allows us to swap coins and tokens. For example, if john gives us 10 z tokens give him four y tokens, even more advanced smart contracts will allow us to write insurance contracts where you pay a monthly premium and then, if something happens, like your house burns down, the insurance contract can actually pay you For it, you can start to see how complex these smart contract agreements can get, but you may be asking one big question: how in the world does the blockchain know my house burn down well thats when we get to oracles an oracle? Is a trusted third party that gives you reliable data outside the current information that you have access to see back in medieval times, an oracle was a person who could use their crystal ball to see into the future, essentially giving reliable information to someone who wanted it. Whether you believe in that stuff or not when it comes to blockchains, they want the same thing see a blockchain cannot see outside of its own code. It cant go searching around the internet and it cant even ask for more information, its simply coded to store data and transactions. Like i mentioned in the beginning, however, we can write smart contracts in a way that they rely on third party information like the price of a stock, the temperature outside or even who won the presidential election.
The oracle can act as a middleman between the blockchain and the real world. Also one thing i want to clarify here: oracles arent, real things, theyre, usually just code programmed by someone and trusted by a lot of people. So there is no real physical oracle out there. Its kind of like the internet, we can all use it and we kind of know what it is, but its not really one thing for the rest of this video. I want to go through an example of each one of the things that i mentioned: number one stock prices. You could create a token that follows the price of a united states stock. This way, investors outside of the united states, could actually invest in stocks without needing to have a social security number or report their taxes, or many of the other hassles that come when you want to invest in stocks, you could use an oracle to create a synthetic Token that tracks its price to the real world price of a stock. There are obviously a few other issues that you have to solve with this and its very complicated, but the mirror protocol has done exactly that. You can actually buy a token called m goog and hold it just as you would. The real google stock and the price of the m goog token is tracked to the real world google stock price through chain link, but well talk about that later. Next up is farming insurance because, secondly, i mentioned that you could get temperatures now.
This is going to be a fun one to explain. Imagine youre a farmer and you want to buy some crop insurance. This way, if something happens like a 10 day, drought or if it rains for an entire year, you are protected now the way that insurance works is you pay a monthly premium that goes into a large pool of money? The money is stored with other people paying their premiums and using statistics. We can reasonably predict that the amount that we require people to pay will cover their issues. So if one year your crops dont grow because its too hot you can actually have a hundred thousand dollar payout from the insurance smart contract. An oracle would be needed here, because how does the blockchain know if theres a drought? Well, you can just feed it. Data of the temperature of your location, and if it looks at the temperature and its more than 100 degrees fahrenheit for more than 10 days, we can say that you should be paid. Of course, this is just an example and how insurance works is far more complicated than this. I just wanted to show another example of how we can use oracles and smart contracts to basically recreate the traditional way of using insurance that allows us to use a decentralized, trustless and probably more affordable method using blockchain technology. Next up we have presidential elections. Have you ever seen that website, where you can practically gamble on who wins certain elections? I definitely have and its a really interesting idea, although it could definitely be implemented with blockchain technology and using cryptocurrencies instead of paying with a credit card, then voting and then waiting for the poll to happen and trusting the platform that will actually reward you.
If you won, we could simply write all of this with code and host it right on ethereum. This way we could pay with ethereum or usdc, wait to see who won and then let our trusted decentralized oracle do the work of paying out the winners. Speaking of decentralized oracles, one of the benefits is that we dont have to trust one data source right. Well, this wouldnt be a video about oracles. If we didnt talk about chain link, basically blockchains are decentralized, meaning no one person or no one company can actually control them. Oracles should be two meaning that you dont get data from just one source, because if you did, you would have one point of failure and then your data is technically centralized. So how do we make an oracle decentralized chain link seems to be the answer, and i dont want to go too deep into it with this video, but they have an entire blockchain that is focused around supplying reliable, real world data from temperatures to prices, to even The number of views on this video we actually have a video for chain link scheduled. So if youre not already a subscriber go right ahead, click that subscribe button and itll – let you know when we upload new videos plus it also rewards our hard work without getting too technical. I also want to share with you that there are different types of oracles and these different types usually specialize in one of three categories.
For example, hardware oracles read information from real world sensors like a thermometer or a weighing scale, or even if an nfc tag can be found. Nearby. Software oracles find information on the web like stock market data or how many users are on a website and third. Human oracles are articles that consolidate human data, like reviews or important ideas from people with specialized skills or knowledge. But if we started to explain this itd start to get very complicated, oh and as we end this video weve been promoting a new project that weve been working on long story. Short weve created a d5 for beginners guide. That is absolutely free to you. If you want to check it out, you can grab a copy of that guide at whiteboardcrypto.com right now, because we love getting feedback on it and we hope to continue improving it to make it the best one out there anyways. Thank you guys for watching. We hope that you enjoy this video.