The oracle in the blockchain world is the contact between the self-referential world of blockchain and external computing reality. This reality produces numbers and data that are fundamental to the functioning of blockchain-based services.
The oracles historically they were a bridge between the human being and the divine, they answered questions that the human being could not answer, often about the future or the interpretation of events outside the norm.
Today we live in the age of reasoning and mathematics, and oracles have drawbacks in a purely symbolic way. The blockchain borrows this term, oracle, to name those who should solve a fundamental problem for the evolution of this technology.
Imagine that we need to know the arrival time of a plane or train, whose data could generate insurance premiums for millions of dollars.
Even a second could make a difference.
Many of the most interesting applications on blockchain today just need that. Smart contracts they are coded to produce the desired effects at the start of a given event.
As long as that event depends on the manual entry of arbitrary data by a user with access to blockchain, everything is easy. If, on the other hand, these data depend on a external event that everyone must agree on, so the picture gets complicated.
Imagine that with simplicity we could modifying information that allows the unlocking of millions, our power and the risks involved would increase considerably.
These are the goals of a blockchain oracle:
- Provide data that cannot be manipulated until it is entered;
- Connect a multitude of sources that can alleviate the risk of error in the collection;
- Produce a transparent system that allows oracle users to trust;
- Support a high security system against attacks.
These Goals are not easy to achieve, especially since any company that decides to take them on becomes the potential weakness point of the system. Whoever controls the oracle controls the blockchain.
Where an oracle is used today:
- Smart securities contracts such as bonds, derivatives, interest rates and many others will require access to APIs with market prices and market references to reference.
- Smart insurance contracts will require IoT data related to the insurable event, for example: the building's magnetic door was closed at the time of the breach, the company's firewall was active, or the insured flight landed an hour late.
- Smart contracts in the commercial sector will require GPS data on shipments, data from ERP systems in the supply chain, and customs data on shipped goods to confirm compliance with contractual obligations.
Some problems encountered with oracles
There have been some negative episodes caused by the misuse of oracles, cases that have created huge losses.
Synthetix had an accident in which the oracle had a price 1000 times greater than it should have been. A trading robot detected this price error, took advantage of it, and made trades that resulted in 1000x profits.
That bot made millions in less than an hour.
Other oracle incident occurred recently with bZx, a protocol that allows users to participate in margin trading through a product called Fulcrum. Fulcrum needs an oracle to determine the price of the underlying asset, they used Kyber. Kyber is a trading platform and, in theory, should have accurate prices, but its platform is small and does not have much liquidity, compared to centralized exchanges.
A smart user exploited a technique that manifested the fragility of the oracle in his favor. The user took out an ETH loan, deposited part of it in Fulcrum, and used the rest to buy all orders for a stable currency in Kyber. This inflated the price of that stable coin in Kyber to $ 2 instead of $ 1.
Fulcrum uses Kyber as an oracle and deduced that the value of the stable coin was double what it should have been.
The user withdrew Fulcrum's initial ETH deposit, which was worth double, repaid the loan, and earned around $ 600,000.
The bZx team It no longer uses Kyber as an oracle and is moving towards Chainlink.
Actors at stake to solve oracle problems
There are many teams trying solve the problem to give maximum power to the blockchain. Especially the team of Ethereum that actually demands more data than others thanks to DeFi.
Augur is one of the main actors in this space working on an oracle for the management of the prediction market.
Augur allows users to vote on what the actual outcome of a scenario is and challenge that outcome if they think it is wrong, across the entire blockchain.
They are applying a democratic model to find the truth.
Another solution is Chainlink, a project that is creating a decentralized network of oracles. This network allows smart contracts to access data sources outside the chain.
These data sources can be separated from the blockchain or function as a web API.
Chainlink se It has become a well known project in the blockchain world and perhaps the safest at the moment.