Oracles and blockchain

Blockchain is a growing list of records (blocks) that are securely linked together: each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. Consequently, the data in any given block can only be tampered with by altering all subsequent blocks.

Blockchain as a technology lays a foundation for Web 3.0, mainly due to its distributed nature of decision-making and verifying, i.e., making any intermediaries or authorities obsolete. To establish trust in blockchain technology, it is necessary to ensure the tripod: security, authenticity, and integrity. Once the data are on the internet, we can, with reasonable certainty, be sure that the tripod is strong and secure in the case of the blockchain. 

To interact with blockchain securely, public-key (asymmetric) cryptography is used. For example, a user publishes his public key to expose himself on the blockchain for interaction with other users, e.g., expecting to receive a cryptocurrency payment. The paying user makes a transaction using the public key as the address. The receiving user can access those assets using his private key only, which is unknown to the public.
Thus, blockchain technology tackles those issues mainly successfully. Still, there is a critical weakness of the starting point in the case of IoT applications—to establish trust in data measured by IoT devices, or said in blockchain terminology, to verify offline data collected through so-called hardware oracles.
In the blockchain ecosystem, oracles are trustable entities that feed the blockchain network with information from the external world. In the context of metrology, the oracles are IoT devices connected to the blockchain on one side and compliant with the metrology regulations on the other [1].
In general, oracles take on several key functions [2], but in the case of metrology/IoT applications, the most relevant are:
  • Monitoring the blockchain network to check for incoming user or smart contract requests for measured data.
  • Performing some type of computation, such as calculating a median or more complex parameters from multiple oracle submissions (e.g., extended Kalman filter) and calculating a critical value for threshold defined in the calibration procedure.
  • Verifying (signing) and sending measured (or calculated) data to the blockchain for processing by the smart contract.
Types of oracles depend on the input/output and their role [3]:
  • Software oracles — oracles that provide online information to the blockchain, e.g., additional data about the calibration document and laboratory.
  • Hardware oracles — oracles that provide information from physical devices, in our case from IoT devices, to the blockchain. 
  • Inbound oracles — oracles that provide smart contracts with data from the external world, e.g., from accreditation institutions.
  • Outbound oracles — oracles that send information to the outside world, e.g., to users interested in measurement traceability.
  • Consensus-based oracles—data passed to the blockchain are treated as a result of a consensus of multiple oracles, e.g., if it is required to decide about data based on multiple hardware oracles (sensors).

Concept of complete trust hierarchy in IoT system as shown in [4]

[1] Melo, W.S. Blockchains and Legal Metrology: Applications and Possibilities. In OIML Bulletin; 2021; Volume LXII, Number 3 (

[2] Chainlink. What Is the Blockchain Oracle Problem? Available online: (

[3] Mammadzada, K.; Iqbal, M.; Milani, F.; García-Bañuelos, L.; Matulevičius, R. “Blockchain Oracles: A Framework for Blockchain-Based Applications” in Business Process Management: Blockchain and Robotic Process Automation Forum; Springer: Berlin/Heidelberg, Germany, 2020; Volume 393. (

[4] Miličević, K.; Omrčen, L.; Kohler, M.; Lukić, I. Trust Model Concept for IoT Blockchain Applications as Part of the Digital Transformation of Metrology. Sensors 2022, 22, 4708. details see: Miličević, K.; Omrčen, L.; Kohler, M.; Lukić, I. Trust Model Concept for IoT Blockchain Applications as Part of the Digital Transformation of Metrology. Sensors 2022, 22, 4708.