Understanding Hybrid Smart Contracts in One Article

avatar
Chainlink
3 years ago
This article is approximately 1425 words,and reading the entire article takes about 2 minutes
This article will clearly define the role of hybrid smart contracts in the blockchain trust model, explain the various decentralized services that Chainlink oracles provide for hybrid smart contracts, and how this development will lead to a new generatio

Understanding Hybrid Smart Contracts in One Article

Hybrid smart contracts include code running on the blockchain and data and computing resources off the blockchain, which are transmitted to the chain by a decentralized oracle network. Hybrid smart contracts can coordinate complex economic and social activities, have the characteristics of blockchain tamper-proof, and can safely access off-chain oracle services to achieve various innovative functions, such as scalability, confidentiality, and fair ordering And access to any off-chain data sources or systems.

first level title

blockchain

blockchainEssentially a computing infrastructure that facilitates trusted cooperation, this is its key function. With trust, participants will firmly believe that the partnership is reliable, authentic and effective. The most common way to build trust in a partnership is by signing a contract. Contracts define the legal and commercial obligations of the parties, as well as the rewards and penalties for their actions. However, todays mechanisms for enforcing contractual obligations are riddled with loopholes. Even in some cases, a certain participant will have an absolute advantage, such as manipulating and influencing the contract execution mechanism, knowing more information than the counterparty, or having more time and capital to prolong the arbitration process. Therefore, the current contract system has become: you must trust the brand endorsement of the counterparty in order to trust that the cooperative relationship between you is solid.

The emergence of blockchain technology has transformed cooperation from brand endorsement to math-based trust. The storage, execution and custody of the contract are all transferred to the code logic running in the decentralized network, and individuals cannot intervene and tamper with it at all. The blockchain is like a computer not connected to the Internet, and its credibility is very high because it is a closed environment and can only achieve a few easy-to-execute functions, such as transferring between multiple addresses in a closed ledger Token. This setting is intentional. Although the closedness and singleness of functions of the blockchain bring it tamper resistance and high certainty (this is also the most valuable part of the blockchain), it also excludes any need to access off-chain data. , Computational or Functional Collaboration.

Chainlink2.0 white paper

Chainlink2.0 white paperDecentralized Finance (DeFi)Decentralized Finance (DeFi)The rapid rise of China is a good example. The Chainlink decentralized oracle network willfinancial market datafirst level title

Components of a Hybrid Smart Contract

smart contractsmart contract- This is the code that runs exclusively on the blockchain; 2)Decentralized oracle network— This is a secure off-chain service for smart contracts. These two modules interact securely and seamlessly to form a hybrid smart contract application. In the end, chaincode is enhanced in many unique ways and enables a whole new set of use cases that go beyond the technical, legal, or financial limitations of previous chaincodes.

Hybrid smart contracts synchronize two disparate computing environments together, creating application functions that blockchain or oracle networks alone cannot achieve, and combining the unique advantages of these two environments. The code on the chain runs in an extremely secure and functionally limited blockchain environment, and the attack surface is small, so users can obtain extremely high certainty when executing and storing. The code will be strictly executed, and the result will be stored forever in the On the chain, it cannot be tampered with. DON, on the other hand, operates off-chain, so it is more flexible to implement more functions and access more data.

It is worth noting that DON also has very high tamper resistance and reliability, comparable to smart contracts, but the difference is that DON operates in a closed off-chain environment and adopts various security mechanisms. Each DON will provide a customized decentralized service for an application, which means that other smart contracts on the same blockchain have nothing to do with the performance of this DON, and the underlying blockchain consensus that guarantees the security of all smart contracts Mechanism will not have any risk. As an independent service, DON not only has advantages in security, but also has flexibility to verify and calculate more complex and open off-chain data.

For example, the standard for some smart contracts to choose to access DON is the level of decentralization and encryption economic security, while other smart contracts will choose DON with high node reputation and advanced encryption technology to carry out verifiable privacy calculations. In these heterogeneous networks, thousands or even millions of DONs can be paralleled, and each DON will not depend on each other, and can provide specialized decentralized services for specific applications. Users of the same DON can also share service costs (for example: currently many DeFi protocols are commonly usedChainlink ETH/USD price feed oraclefirst level title

How hybrid smart contracts combine on-chain and off-chain computing resources

secondary title

On-chain module: blockchain

  • Maintain ledgers, reliably host user assets, and interact with private keys.

  • Handle irreversible transfer transactions between users and perform final settlement.

  • secondary title

Off-chain: Decentralized oracle network

  • Securely fetch and verify data from off-chain APIs and transmit to smart contracts in blockchain and layer-2 networks.

  • Perform various computing tasks for smart contracts in blockchain and layer-2 networks.

  • Transmit the data output by the smart contract to other blockchains or off-chain systems.

Understanding Hybrid Smart Contracts in One Article

first level title

Chainlink Decentralized Service Escorts Hybrid Smart Contracts

off-chain data

off-chain data

DON can build a bridge between various off-chain data and the blockchain, and input the required data for hybrid smart contracts. The following data types are initially accessible:

  • price feedcertificate of reserve

  • certificate of reserve- Up-to-date data on the current reserve balance of tokenized assets, such as WBTC’s Bitcoin-collateralized assets, or TUSD’s USD-collateralized assets.

  • any API—— Paid data from password-protected API interfaces, data types include weather forecasts, sports results, enterprise background data, and IoT data.

  • Blockchain middlewareoff-chain computation

off-chain computation

DON can perform a series of off-chain calculations on behalf of smart contracts, help smart contracts obtain certain data, or create functions that cannot be realized on native blockchains, such as privacy protection, scalability, and fair ordering. The following are some DON computing functions that have been realized and will be realized in the future:

  • Keeper network——An automated bot that regularly maintains smart contracts, starts contracts at appropriate points in time, and performs key on-chain functions.

  • Off-chain reporting (OCR)——Aggregate the data responded by DON oracle nodes in a scalable way, and then send the aggregated data to the chain in a single transaction to reduce the cost on the chain.

  • scalable computing——Achieving high throughput and low cost for smart contract execution, using off-the-shelf layer-2 technology to regularly synchronize with the chain.

  • Verifiable Random Function (VRF)——Safely generate verifiable random numbers, and use encryption proof technology to prove the integrity of the process.

  • Data and Computational PrivacyFair Sequencing Service (FSS)

  • Fair Sequencing Service (FSS)——Decentralized transaction ordering according to predefined fair principles, avoiding front-running attacks and miner extractable value (MEV).

  • On-Chain Contract Privacy——Unbind contract logic and settlement results to protect the privacy of smart contract transactions, such as transferring data between two parties through DONs Mixicles function.

Understanding Hybrid Smart Contracts in One Article

first level title

The impact of hybrid smart contracts on various industries around the world

DON can implement an advanced hybrid smart contract framework, seamlessly connect different systems and independent entities on the blockchain, and realize safe and universal automated interaction. Chainlink overcomes the technical barriers of smart contracts for developers. Developers can take advantage of the high certainty of blockchain and realize various key functions such as external connection, privacy protection, scalability and fair ordering through DON. The hybrid smart contract not only creates a more credible and efficient cooperation space for various participants in the network, but also connects the blockchain network to the traditional off-chain infrastructure without any modification on the back end.

DON will provide the required privacy guarantee and scalability for many smart contract applications, and cover most enterprise application scenarios and many game and financial applications, achieving high throughput and real-time decision-making. Hybrid smart contracts will also enable a series of new and unprecedented application scenarios, such as algorithm-based economic fairness and transparency through verifiable random numbers and decentralized transaction ordering.

Some mainstream industries that have felt or will soon feel the impact of hybrid smart contracts:

  • Identity Informationfinance

  • financesupply chain

  • supply chainInsurance

  • Insurancegame

  • gamemarketing

  • marketinggovernance

  • governance——Distributed communities can safely and fairly manage shared systems and capital pools. Smart contracts can define a complete governance framework. DON can provide off-chain data and computing resources, trigger various operations such as profit distribution, cost sharing, and identity authentication, effectively resist Sybil attacks, verify the participation of each member, or even realize automated decision-making process.

developer documentation

If you want to start developing hybrid smart contract applications right away and need access to off-chain data or computing resources, check out ourdeveloper documentation, you can also ask technical questions on the Discord channel or chat with Chainlink experts over the phone.

Original article, author:Chainlink。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks