The content of this page was updated in July 2019, with an excerpt from the book Token Economy by Shermin Voshmgir.
Blockchains and smart contracts cannot access data from outside of their network. In order to know what to do, a smart contract often needs access to in- formation from the outside world that is relevant to the contractual agreement, in the form of electronic data, also referred to as oracles. These oracles are services that send and verify real world occurrences and submit this information to smart contracts, triggering state changes on the blockchain.
Oracles feed the smart contract with external information that can trigger prede ned actions of the smart contract. This external data stems either from so ware (Big-data application) or hardware (Internet-of-Things). Such a condition could be any data, like weather temperature, successful payment, or price fluctuations. However, it is important to note that a smart contract does not wait for the data from an outside source to ow into the system. The contract has to be invoked, which means that one has to spend net- work resources for calling data from the outside world. This induces network trans- action costs. In the case of Ethereum, this would be “gas.”
There are different types of oracles:
- Software Oracles
handle information data that originates from online sources, like temperature, prices of commo- dities and goods, ight or train delays, etc. The so ware oracle extracts the needed information and pushes it into the smart contract.
- Hardware Oracles
Some smart contracts need information directly from the physical world, for example, a car crossing a barrier where movement sensors must detect the vehicle and send the data to a smart contract, or RFID sensors in the supply chain industry.
- Inbound Oracles
provide data from the external world.
- Outbound Oracles
provide smart contracts with the ability to send data to the outside world. An example would be a smart lock in the physical world, which receives a payment on its blockchain address and needs to unlock automatically.
- Consensus-based Oracles
get their data from human consensus and prediction markets like Augur and Gnosis. Using only one source of information could be risky and unreliable. To avoid market manipulation, prediction markets implement a rating system for oracles. For further security, a combination of di erent oracles may be used, where, for example, three out of ve oracles could determine the outcome of an event.
The main challenge with oracles is that people need to trust these outside sources of information, whether they come from a website or a sensor. Since oracles are third-party services that are not part of the blockchain consensus mecha- nism, they are not subject to the underlying security mechanisms that this public infrastructure provides. One could replicate “man-in-the-middle attacks” standing between contracts and oracles. #
The robustness assurance of this “second layer” is of utmost importance. Different trusted computing techniques can be used as a way of solving these issues. However, this topic will need more attention, as secure oracles are a bottleneck for smart contract security. If oracle security is not adequately provided, it will be a show stopper for widespread smart contract im- plementation.
Full text and high resultion graphics available as paperback & ebook: Token Economy, by Shermin Voshmgir, 2019
About the Author: Shermin Voshmgir is the Author of the Book “Token Economy“. She is the director of the Research Institute for Cryptoconomics at the Vienna University of Economics, and the founder of BlockchainHub Berlin. In the past, she was a curator of TheDAO, and advisor to various startups like Jolocom, Wunder and the Estonian E-residency program. In addition to her studies at the Vienna University of Economics, she studied film and drama in Madrid. Her past work experience ranges from Internet startups, research & art. She is Austrian, with Iranian roots, and lives between Vienna and Berlin.
About the Book: Blockchains & smart contracts have made it easy for anyone to create a token with just a few lines of code. They can represent anything from an asset to an access right, like gold, diamonds, a fraction of a Picasso painting or an entry ticket to a concert. Tokens could also be used to reward social media contributions, incentivize the reduction of CO2 emissions, or even ones attention for watching an ad. While it has become easy to create a token, which is collectively managed by a public infrastructure like a blockchain, the understanding of how to apply these tokens is still vague. The book refers to tokens, instead of cryptocurrencies, and explains why the term “token” is the more accurate term, as many of the tokens have never been designed with the purpose to represent a currency. However, since tokens do have similarities to fiat currencies, the role of money as a medium of exchange is analyzed at length in this book. This book gives an overview of the mechanisms and state of blockchain, the socio-economic implications of tokens, and deep dives into selected tokens use cases: Basic Attention Token, Steemit, Token Curated Registries (TCRs), purpose-driven tokens, stable tokens, asset tokens, fractional ownership tokens, libra & calibra (Facebook), and many more.