Sunday, December 5, 2021

What Is An Oracle In Blockchain

- Advertisement -spot_img
- Advertisement -spot_img

Hardware And Infrastructure Layer

George Levy – What is a blockchain oracle?

The content of the blockchain is hosted on a server that resides in a data center on this beautiful planet. While browsing the web or using any applications, clients request content or data from application servers, commonly referred to as client-server architecture. However, today, clients can connect with peer clients as well and share data among each other. Such a massive collection of computers sharing data with each other is termed a P2P network. Blockchain is a P2P network of computers that computes transactions, validates them, and stores them in an ordered form in a shared ledger. This results in a distributed database that records all the data, transactions, and other relevant information. Each computer in a P2P network is called a node. Nodes are responsible for validating transactions, organizing them into blocks, broadcasting them to the blockchain network, and so on. Upon reaching consensus, nodes commit the block to the blockchain network and update their local ledger copy. This layer comprises of virtualization . Significantly, nodes are the core of this layer. When a device gets connected to a blockchain network, it is termed and considered as a node. On a blockchain network, these nodes are decentralized and distributed.

Delving Into Block Structure

The following outlines some of the consensus methods in detail:

  • Practical ByzantineFault Tolerance: Hyperledger Fabric uses this consensus mechanism. PBFT offers a Byzantine state machine replication that is designed to tolerate malicious nodes . All the nodes are sequentially ordered, where one node is declared as the leader node and other nodes are known as follower nodes . Any node will become a leader by transitioning from follower node to leader node, mostly via a round-robin algorithm. All nodes communicate and need to perform two tasksfirstly, they need to verify that the message came from a specific peer node, and secondly, they need to verify and ensure that the message was not modified during its communication. All nodes will reach a consensus, irrespective of the state of the network, using majority rule. The entire network is based on the assumption that no more than one-third of the network nodes are malicious. The more nodes, the more secure the network will be. It has the following phases:
  • A client sends a request to a leader node
  • Leader node propagates this message to all the follower nodes
  • All the nodes will perform a task, as requested by the client, and send a response back to the client
  • The client will verify the responses and ensure that the request is served successfully when it receives n + 1 replies with the same result, where n is the max number of malicious nodes
  • What Is An Ethereum Oracle

    Smart contracts are still kind of a new thing; theyve yet to take the mainstream, and so many aspects of how they will work have not yet been hammered out and standardized. I will briefly explain the impetus behind the idea of the oracleand be patient; well get into it in more depth in later parts.

    Engineering a blockchain contract is not like programming a client-server app. One important difference is that data with which the contract interacts, must already be on the blockchain. There is no calling out of the blockchain. Not only is it not supported by the language, its not supported by the blockchain paradigm. The contract can take bets in the form of Ethereum-based currency, store them in the contract, and release them to the correct wallet addresses according to a formula, when the winner of a match is declared. But how does the contract know the winner? It cant query a REST API or anything like that. It can only use data thats already in the blockchain! Many many use cases of smart contracts run into a similar problemthey are seriously limited unless they can interact with the world outside the blockchain.

    Also Check: How To Invest In Crypto From India

    A Blockchain Oracle Is Any Device Or Entity That Connects A Deterministic Blockchain With Off

    Smart contracts cannot make API calls themselves because they are deterministic, but without being able to interact with data the lives off-chain, they won’t be able to utilize the decentrality, security, and reliability a smart contract has. To get data onto the chain, we have to have an off-chain entity create a transaction on-chain with the data posted.

    This process of posting data from the real world onto a blockchain is what oracles do.

    There are a number of ways to do this. An example of an oracle would be a Chainlink node, where you can request any API call through the blockchain, and have it post the data on-chain.

    What Are Hybrid Smart Contracts

    Blockchain Oracles

    Smart contracts enhance blockchains with the ability to execute tamper-proof code, in addition to storing tamper-proof data, turning it into a “world computer.”

    Smart contracts promise to take execution of processes and agreements to the Ethereum global computer. There’s just one problem: Smart contracts can’t talk to the rest of the world. This is where oracles, and Chainlink, come in.

    An;oracle is a gateway between a blockchain and the real world. Oracles can get data off the blockchain and pass it on to smart contracts.

    Chainlink is a decentralized oracle network, which means there are many nodes on which the service runs. Operations that run on blockchains are costly — users have to spend tokens to run them. When each oracle node has to bring data onto Ethereum, this incurs a lot of ETH gas costs for the oracle node operators.

    This is why;Chainlink recently introduced what it calls Off-Chain Reporting. What this means is that data storage and computation is no longer performed on the Ethereum blockchain, but in a different decentralized network.

    Chainlink, the leading blockchain oracle, just released a new whitepaper outlining the next step in its evolution, dubbed Chainlink 2.0

    In the dominant categories of smart contracts today, such as decentralized financial products, lotteries, or decentralized insurance, over 90% of them are really hybrid smart contracts, Nazarov claimed. That means those smart contracts are made up of two equal components.

    Also Check: Where Can I Buy Dash Cryptocurrency

    Accounting System Single And Doubleentry

    Before we jump into blockchain and delve into Hyperledger Fabric and the Oracle Cloud solution, we need to start with two core principlesledger and accounting. In an accounting system, business transactions are recorded in journals and ledgers. Fine-grained details of every transaction are entered into various journals. Summarized information from the journals is then transferred to a ledger. It is the information from the ledger that becomes the source for trail balances and various financial statements. Every transaction is recorded in journals and then posted to a ledger that records this information in various accounts, such as asset accounts, liability accounts, equity accounts, revenue accounts, and expense accounts.

    For any organization’s accounting system, the ledger is the backbone. Anything that has financial value is posted to the organization’s ledger. However, these ledgers are centralized ledgers and the organization has full control over them. We will talk about centralized and decentralized ledgers later in this chapter.

    Layered Structure Of The Blockchain Architecture

    This section covers the layered architecture of blockchain. In this section, we will be diverging to Ethereum and Hyperledger Fabric as well. While discussing the Hyperledger Fabric infrastructure, we will drill into the OBP’s infrastructure as well.

    The following diagram displays the layered architecture of blockchain:

    You May Like: How To Calculate Market Cap Crypto

    Why Do We Need Blockchain Oracles

    Smart contracts have been designed to execute irreversible operations. This is why the information fed into the contract must come from a relatively trusted source. This is why, when data is coming from an external source, it can be a bit of a dilemma. However, on the flip side, it does increase the number of use cases exponentially.

    An oracle signs claims about the state of the world and uploads it to the blockchain. Blockchains seem to live in their isolated reality, completely cut off from the rest of the world. An oracle can connect the blockchain to the real world by providing it with relevant information. The information may be retrieved or aggregated from one or multiple trusted sources by one or multiple oracles. Lets take a simple example to see how oracles work.

    Blockchain use cases

    #1 Prediction market

    #2 Defi

    The combination of smart contracts and finance has ushered in the era of . These products need access to trustless data feeds, which could be provided by oracles.

    #3 Insurance

    It could be possible to buy insurance products over the blockchain via oracles. Since the biggest issue in insurance is fraud, the decentralization of the blockchain and the reliability of oracles are a perfect combo to resolve this issue.

    #4 Shipment

    Oracles can replace the existing, centralized GPS systems to provide reliable location mapping for dApps to track shipments.

    #5 Putting the stable in stablecoins

    Oracle Blockchain Services Quick Start Guide

    What is a Blockchain Oracle? What is the Oracle Problem? | Chainlink Engineering Tutorials
    • 7-day trial
      Advance your knowledge in tech with a Packt subscription

    • Instant online access to over 7,500+ books and videos
    • Constantly updated with 100+ new titles each month
    • Breadth and depth in over 1,000+ technologies
  • Leave a review – let other readers know what you think
  • About this book

    Hyperledger Fabric empowers enterprises to scale out in an unprecedented way, allowing organizations to build and manage blockchain business networks. This quick start guide systematically takes you through distributed ledger technology, blockchain, and Hyperledger Fabric while also helping you understand the significance of Blockchain-as-a-Service .

    The book starts by explaining the blockchain and Hyperledger Fabric architectures. You’ll then get to grips with the comprehensive five-step design strategy – explore, engage, experiment, experience, and inuence. Next, you’ll cover permissioned distributed autonomous organizations , along with the equation to quantify a blockchain solution for a given use case. As you progress, you’ll learn how to model your blockchain business network by defining its assets, participants, transactions, and permissions with the help of examples. In the concluding chapters, you’ll build on your knowledge as you explore Oracle Blockchain Platform in depth and learn how to translate network topology on OBP.

    Publication date:

    You May Like: How To Take Profit In Crypto

    What Is A Smart Contract

    The first smart contract idea was proposed by Nick Szabo in 1994, however, it wasnt until 2015 when Vitalik Buterin launched the Ethereum Network, that smart contracts became deployable and used by developers.

    Ultimately smart contracts are pieces of code that can move money from one account address to another, upon specified conditions being met.

    Smart contracts can be for personal or enterprise use. You could create a smart contract to bet between a friend team A wins, you get the money, team B wins, your friend gets the money.

    A supply-chain business can create a smart contract to automatically pay their suppliers upon receipt of a delivery using sensor and locational data to trigger the smart contract.

    The Bitcoin blockchain, back in 2009, introduced blockchain technology through a decentralized network of computers mining and verifying a virtual digital currency , that could only allow transactions to be sent from A to B.

    When Vitalik Buterin introduced the Ethereum Network, it opened up a Pandoras box of decentralized Lego blocks that developers can use to build decentralized applications and cryptocurrencies, and interoperate with other projects, on top of the Ethereum Network.

    There have since been numerous blockchains and platforms created that support smart contracts, including NEO, Hyperledger, and Waves.

    None of these applications could be possible without smart contracts, and the majority of smart contracts are powered by oracles.

    Hybrid Smart Contracts Means Mixing And Matching

    Nazarov noted that Chainlink promotes hybrid smart contracts because they’ve seen a continuing trend in how developers build smart contracts. Developers want more and more advanced smart contracts, but a Blockchain due to its native security model isn’t giving them all the features that they need, he went on to add.

    Two of the primary features are around privacy and off-chain computation that can do computations, which can’t be done on-chain for scalability or cost efficiency or other reasons, according to Nazarov. This, however, brings about an interesting dilemma.

    If oracles can now not only store data, but also do compute, then how do developers choose which parts of their smart contracts they want to run on-chain, and which ones off-chain?

    Nazarov thinks people will continue to need a smart contract on-chain, and they will also continue to need a suite of decentralized services run on various decentralized oracle networks to augment that smart contract. As to the “what goes where” question, the answer does not seem entirely clear-cut.

    The answer will vary greatly between different smart contract use cases. It depends on the properties of the chains people are using, as well as decisions about how much they want to pay in fees and how much transparency they want to provide, Nazarov thinks. It will come down to being able to control value, he went on to add:

    Secure off-chain computation powered by Chainlink Decentralized Oracle Networks. Image: Chainlink

    Recommended Reading: Where Can I Buy Matic Crypto

    What Are The Problems With Oracles

    The defining quality of a blockchain like Ethereum is that its able to run smart contracts. Once programmed, the smart contract is fully controlled by the blockchain; no entity needs to be trusted to execute the rules, and no middleman can prevent the transaction from taking place, assuming the conditions for the smart contract are met. The contract simply does what it’s programmed to do.

    However, an oracle is a data feed run by an entity; in the above example, its a weather oracle. Blockchains like Ethereum were created to move away from third parties, yet an oracle is one.;

    Trusting a data source can lead to issues. The owner of an oracles data feed, for example, could post inaccurate data in order to sway smart contracts in favor of the data feed owner. Alternatively, someone could hack the data feed to sway the data in their favor.;

    Smart contracts that are not dependent on oracles don’t have this problem.That said, researchers are exploring various ways to mitigate this issue and create oracles that are more decentralized or otherwise protected against bad actors. One such area of research is for oracle computers to use Trusted Execution Environments , special areas of hardware with extra security, making them difficult to tamper with.

    How Oracles Solve This

    Oracle Unveils Business

    A blockchain oracle is any device or entity that connects a deterministic blockchain with off-chain data. These oracles enter every data input through an external transaction. This way, we can be sure that the blockchain itself contains all of the information required to verify itself. This is why oracles are known as blockchain middleware: They are the bridge between the two worlds.

    So thats it, this is great! But whats this I keep hearing about an oracle problem?

    You May Like: Should I Invest In Tron Crypto

    Inbound Versus Outbound Oracles

    Oracles establish a two-way line of communication with blockchains: data can be sent in, or transferred out. While outbound oracles can bring blockchain data to the outside world, its more common for inbound oracles to bring off-chain or real-world data ; to the blockchain. The imported information can represent almost anything from asset price fluctuations, to weather conditions, to proof of successful payments.

    A frequent programmable scenario for inbound oracles could be: If an asset hits a certain price, then place a buy order. As another example, imagine person A bets person B that its going to rain for one week straight. The bet amounts would be locked in a smart contract, an oracle would provide accurate and immutable weather data reporting, and the funds would be delivered to person A or person B depending on if the data showed that it rained for one week straight.

    In contrast, outbound oracles inform the outside world of an event that took place on-chain. For example, a smart contract might be programmed to unlock an internet-enabled smart lock on a rental unit in the real world if a cryptocurrency payment is received at a specific crypto wallet address.

    Why Does The Defi Ecosystem Need Decentralized Oracles

    Oracles are intermediaries that ensure trust in the DeFi ecosystem.

    First of all, within the DeFi ecosystem, decentralized oracles are primarily used, as using centralized oracles goes against the ethos of DeFi products/applications. DeFi applications are financial tools that are built on a blockchain — in most cases, the Ethereum network.

    The total value locked, or TVL, in DeFi is the total balance of Ether , Bitcoin and ERC-20 tokens held in the smart contracts of DeFi applications. The fast rise in TVL from $675 million at the start of 2020 to past $7 billion in the third quarter of the year is an indication of the impact that blockchain oracles have in DeFi. The impact is also seen in the exponential year-to-date returns on investments in the tokens of major decentralized oracle providers Chainlink and Band Protocol when compared with Bitcoin.

    The increasingly popular hybrid DeFi protocols, which offer decentralized networks while eliminating volatility, operate by connecting crypto assets to conventional financial instruments, especially those that are pegged to the U.S. dollar.

    Don’t Miss: How To Do Technical Analysis Cryptocurrency

    Network Of Equity Or The Peer

    A P2P network leverages the network; however, the attachment and detachment of nodes is completely voluntary. The network is a network of equity, where each peer is the same as any other peer, and it is fair and impartial. One peer offers computing resources to other peers, without the need for a central authority to control, govern, or maintain the network. Even though it has equity, each node has a fair chance of adopting the role of the miner or can turn itself into a full node. Each node keeps a copy of the distributed ledger, and this protocol of the blockchain network ensures resilience and immutability of the blockchain network. A blockchain network can resurrect the entire system as long as there is a single node that holds the copy of the distributed ledger.

    - Advertisement -spot_img
    Latest news
    Related news