Cointime

Download App
iOS & Android

Oracles: A Blockchain Tool Of Connect

Validated Project

Bitcoin popularized the decentralization paradigm with the concept of programmable money. The bitcoin (cryptocurrency) transfers are transparent and occur in a peer-to-peer fashion without requiring any intermediaries. Further, Vitalik explored the technology behind- blockchain and unleashed its true potential by showing how programmability can be incorporated into it using smart contracts. A technology once considered a digital currency is now researched worldwide, and many potential use cases related to various domains not confined to the financial sector, have been developed.

Smart contracts were the ones which helped widen the application domain. But smart contracts have severe challenges and boundaries, unlike other programming languages.

How does blockchain work?

A blockchain network is a decentralized network of participants. Each participant will have an immutable ledger for recording the transactions. Every transaction within the ecosystem will be received and verified by all the participants in that system. The blockchain will have a well-defined consensus mechanism- a rule for deciding which transactions should be recorded in the ledger. Based on the consensus, verified transactions are added to the ledger. The essence of decentralization lies in the consensus mechanism, which ensures an unbiased decision verifying the transaction and ledger updates.

There comes our first challenge. A blockchain can verify the transactions only if it has the background data for verification. For example, if a cryptocurrency transaction needs to be verified, it should have the earlier balance of the sender and recipient of that transaction. This is possible in the case of token transfers since all the transfers occur only via blockchain, and smart contracts can access these. But what about the transactions in a supply chain? How will blockchain verify a transaction that needs to record a fact like“ Vehicle A has reached the location ABC with X kg of mangoes”?

Blockchain creates a restricted system environment which is separated from the real world. Smart contracts are programs running on a blockchain which can only passively receive the data into the chain but cannot actively obtain the data out of the chain. A large number of blockchain use cases are based on retrieving and storing real-time data: like location, temperature, price, quantity, quality etc. For this, we need specific services which can feed real-time data onto the smart contracts. They are termed Oracles.

Oracle

Wikipedia defines an oracle as a person or thing that provides wise and insightful counsel or prophetic predictions. The word is believed to be related to Greek culture, referring to divine revelations given by priests or equivalent persons as a response to an inquiry.

A blockchain oracle is defined as an external data agent that observes real-world events and reports them back to the blockchain to be used by smart contracts[3]. Oracle comprises an entire system that collects off-chain data, verifies it and transmits it to smart contracts on the blockchain. An oracle may consist of three elements, as shown in below figure.

The data source can be a sensor (measuring temperature, humidity etc.), a Web Application Programming Interface (which provides access to data recorded in other off-chain applications like stock markets, crypto-exchanges), manual data entry, etc. They are considered trusted data sources. The oracle nodes (service) collect data from the data source, certify accuracy, and convey reliable data to the smart contract. It can be a node, a group of nodes or any trusted environment. A smart contract in the blockchain will have a code that governs the processing based on input data.

These three parts may not exist separately from each other. Oracles are classified based on these entities’ organizations and their tasks.

Types of Oracles

Oracles are classified based on various properties[3].

  1. Data Source: Depending on the external data source, oracles can be classified into hardware, software, and human. Hardware oracles use specific devices like sensors and scanners to gather data. Software oracles use programmed interfaces to collect data like schedules, price data and exchange rates. Human oracles refer to the manual entry of data.
  2. Trust Model: The number of nodes in the oracle network defines the trust model of an oracle. A centralized oracle may be depending on a single source, whereas a decentralized oracle gathers data from multiple sources and reaches a decision based on a consensus mechanism. Provable and Town crier are centralized oracles. Chainlink is a decentralized oracle which acquired Town Crier.
  3. Design Pattern: Oracles can be designed in a request-reply setup, where the smart contract initiates a request serviced by an off-chain element. In a publish-subscribe design pattern, an oracle keeps track of fluctuating data like market prices, temperature etc. Updated data will be broadcasted to its subscribers. The immediate-read pattern is helpful in quick response scenarios like academic certificates or dial codes.
  4. Interactions with external data sources: Interactions can be classified as inbound or outbound. Inbound oracles feed data from external sources to the blockchain (eg reading input data from a sensor and storing it in the blockchain). In contrast, outbound oracles allow smart contracts to deliver data to the external world (eg sending a notification once a blockchain payment is received).

The Oracle Problem

As mentioned before, the consensus mechanism is responsible for the trustless data on the blockchain, which confirms their reliability. At the same time, Oracles skip the consensus mechanism and provide external data to the blockchain without any standard verification. This license gives oracles the privilege to insert arbitrary data on the blockchain.

Since oracles operate separately from the blockchain, they do not guarantee the decentralization, immutability and transparency of the blockchain environment. If any trusted third party is providing the oracle service, it raises some serious questions like

  • Can that third party be trusted?
  • What if the data provided is incorrect?
  • What if the data was recorded correctly but edited by attackers?
  • Won’t that be a single point of failure?

The Oracle problem puts forward these concerns that question the inclusion of oracles which make blockchain adoption risky for specific real-world scenarios. Thus the centralization of oracles raises the Oracle Problem which brings the puzzle between efficiency and decentralization when oracles fetch real-world events data from external data sources [3].

So if a smart contract-based application uses oracles to access external data, proper audit measures should be incorporated to ensure security. If the external data source is not trustworthy, it will affect the credibility of the entire smart contract, which works based on that data and even questions the role of blockchain.

References

[1] Lin, SY., Zhang, L., Li, J. et al. A survey of application research based on blockchain smart contracts. Wireless Netw 28, 635–690 (2022). https://doi.org/10.1007/s11276-021-02874-x

[2] Caldarelli, G. Overview of Blockchain Oracle Research. Future Internet 2022, 14, 175. https://doi.org/10.3390/fi14060175.

[3]H. Al-Breiki, M. H. U. Rehman, K. Salah and D. Svetinovic, “Trustworthy Blockchain Oracles: Review, Comparison, and Open Research Challenges,” in IEEE Access, vol. 8, pp. 85675–85685, 2020, doi:10.1109/ACCESS.2020.2992698.

[4]https://ethereum.org/en/developers/docs/oracles/

Image Courtesy: Flaticon

(By Sumi Maria Abraham, Research and Development Engineer, Kerala Blockchain Academy)

Comments

All Comments

Recommended for you

  • Cointime May 12 News Express

    1.The number of Bittensor subnets for the AI ​​project will increase to 64, and 1024 subnets will be achieved this year2.Trader predicts Bitcoin price will reach $350,0003.vladilena.eth redeemed 1930 weETH from Zircult, suspected of selling4.Solana’s on-chain DEX transaction volume yesterday exceeded the sum of five chains including Ethereum, BSC, and Arbitrum5.RSS3 VSL locked-in amount surged in the past two days and is close to 200 million US dollars 6.The transaction volume of Club Key on friend.tech platform exceeded 1 million7.Lido has paid out more than 516,000 ETH in staking rewards, equivalent to approximately $1.51 billion8.1,000 BTC transferred from TronDAO to an unknown new wallet9.Report: Justin Sun deposited 120,000 eETH into Swell L2, worth $376 million10.1707.36 BTC have flowed out of Binance in the past 7 days

  • Xinjiang launches special campaign to combat illegal fundraising, with key areas including virtual currency, blockchain, etc.

    According to Chang'an Xinjiang Public Account, Xinjiang Autonomous Region and Corps have launched a joint special action to crack down on illegal fund-raising, with key areas including third-party wealth management, fake private equity, fake gold exchange and other traditional fields, as well as emerging fields such as virtual currency, blockchain, cultural tourism, film and television investment, and debt resolution services. It is reported that key cases include cases involving more than 100 million yuan and cases that have been criminally filed for more than five years.

  • A British court has postponed the final sentencing of Wen Jian, a British-Chinese national involved in the country's largest Bitcoin money laundering case, until May 24.

    On May 11th, it was reported that Jian Wen, a 42-year-old British Chinese citizen, was found guilty of "participating in arranging money laundering" in the UK's largest Bitcoin money laundering case. He could be sentenced to up to 14 years in prison. Jian Wen's defense lawyer, Mark Harries, stated that due to the judge's busy schedule, the UK court has postponed Jian Wen's final sentencing, which was originally scheduled for May 10th, to May 24th.

  • Web3 startup Star Nest completes $6 million in Pre-A round of financing

    Hong Kong Web3 music startup Star Nest announced that it has completed a $6 million Pre-A round of financing, led by Chuangqi International Limited, a wholly-owned subsidiary of Hong Kong Stock Exchange-listed company Guofu Innovation. Star Nest will collaborate with Armonia Meta Chain to develop the Star Nest SpaceStar metaverse game, which includes music, role-playing, and social features.In addition, Star Nest plans to launch its NEST project in the third quarter of 2024. Nest will receive 2.1 billion NEST tokens tailored for the project, and Star Nest will use the NEST token to build a more complete music industry token economic system. The NEST token will be widely used for purchasing performance tickets, chain game cooperation, metaverse consumption, governance voting, and other activities.

  • Over $594 million worth of PYTH is staked

    According to Dune data,  there are currently 1,201,167,362 PYTH tokens in the staked state, with a total staked value exceeding $594 million. The number of PYTH stakers has reached 151,211.

  • US Department of Justice: Tornado Cash indictment has nothing to do with "free speech"

    On May 11th, the US Department of Justice explained why the motion to dismiss the criminal case against Tornado Cash founder Roman Storm was invalid. The Department of Justice reiterated that their indictment was not related to whether the Tornado Cash computer code had freedom of speech or was protected by the First Amendment of the Constitution. The defendant was not charged for publishing computer code, but for using it to facilitate profitable illegal activities.

  • USDC circulation decreased by $100 million in the past week, with a total circulation of $33 billion

    According to official data,as of May 9th, Circle has issued approximately $2 billion USDC and redeemed approximately $2 billion USDC in the past 7 days, with a decrease in circulation of approximately $100 million. The total circulation of USDC is $33 billion, with a reserve of $33.1 billion, including approximately $3.3 billion in cash and Circle Reserve Fund holding approximately $29.8 billion.

  • SEC rejects Coinbase's request for appeals court ruling on cryptocurrency rules

    The US SEC has rejected Coinbase's request to appeal to the court to review whether traditional securities rules are applicable to cryptocurrencies. In its application, Coinbase stated that it hoped the appeals court would consider whether the Howey test, which has long been used for securities evaluation, should be applied to digital assets. However, the SEC pointed out that Coinbase has not successfully demonstrated the need for such an evaluation. The SEC stated that Coinbase is attempting to create a "new legal test," but this attempt was rejected by the court. The court found that Coinbase's arguments lacked consistency and did not successfully demonstrate the existence of decisive issues. Currently, the judge responsible for hearing the SEC's case against Coinbase will make a ruling on Coinbase's intermediate appeal motion.

  • Blockchain Asset Management announces launch of a dedicated blockchain fund for accredited investors

    Blockchain Asset Management, a cryptocurrency fund with a scale of $100 million, announced the launch of an exclusive blockchain fund for qualified investors. The specific amount of funds raised by the fund has not been disclosed yet, but it is said to have reached "eight figures", which means it is in the tens of millions of dollars. In addition, the investment threshold for the new fund is $100,000, and all investors are required to meet the approved standards (annual income exceeding $200,000, net assets exceeding $1 million).

  • Shanghai Municipal Party Committee Secretary: Welcome Standard Chartered to establish more new institutions, new businesses and new platforms such as blockchain in Shanghai

    Chen Jinong, the Secretary of the Shanghai Municipal Party Committee, met with Weihao Si, the Chairman of the Board of Directors of Standard Chartered Bank, and Mark William D'Arcy, the Executive Director, and some members of the Board of Directors yesterday morning. Chen Jinong stated that he welcomes Standard Chartered Bank to leverage its own advantages, strengthen strategic connections, place more new institutions, businesses, and platforms such as wealth management and blockchain in Shanghai, focus on deepening pragmatic cooperation in technology finance, green finance, digital finance, and create more application scenarios, and provide comprehensive and professional service support for enterprises to go abroad.