Basic architecture analysis of blockchain Oracle

Meta universe twitter 2022-04-03 02:20:40 阅读数:681

basic architecture analysis blockchain oracle

Oracle classification

The architecture of centralized Oracle and decentralized Oracle is divided into network layer 、 The operational layer 、 Contract layer and application layer , There are great differences between the two in the operation layer and the contract layer .

An ideal Oracle network should meet five conditions : Data invocation is based on mutual trust and cannot be tampered with 、 The efficiency of data call 、 Security 、 The design of Oracle network conforms to the principle of incentive compatibility 、 Data capitalization .

According to the organization mode of business , Oracle can be divided into centralized Oracle and decentralized oracle . Although the architecture of both can be divided into network layer from bottom to top 、 The operational layer 、 Contract layer and application layer , However, there are great differences between the two in the operation layer and the contract layer .

Centralized Oracle has first mover advantages in cost performance and user experience , The decentralized Oracle has great late development advantages because of its advantages in characteristics and ecological model .

Data acquisition method of Oracle

Oracle can get native data from the chain , Data can also be obtained through web crawlers or traditional third-party institutions , Get data from the chain , For on Chain Applications .

(Dapp) The landing was not as expected , As a result, users' demand for data on the chain is limited , Not enough to support the long-term development of this model . Get data from the chain , It can be a traditional third-party credit institution that outputs data to the chain as a node of the public chain or alliance chain , It can also be that the prophet grabs specific data through a web crawler .

Generally speaking , For data calls, service requests that require low latency ( Such as ETH Price real-time call ), It is not suitable to obtain data by crawling , Because the accuracy of crawler code and data is restricted by web page structure and network environment ;

The current mainstream Oracle project ( Such as Chainlink etc. ) All adopt credit granting third-party trusted institutions ( Such as Google) As node , So as to improve the relevant DeFi The price feeding mechanism of products .

The difference between data Oracle and crawler

Some people think that the Oracle adds a de trust mechanism to the crawler . Crawlers are just a way to grab web data , Although the Oracle uses the way of crawler to obtain data , However, it is more to obtain data by using the traditional third-party institution as the node .

There are also significant differences between Oracle and crawler in data output format

One side , The data captured by crawlers is likely to be unstructured , Poor readability , The data obtained by the Oracle must meet the requirements of smart contract call in format , Users and prophets can customize the output format of data according to the requirements of smart contract .

what's more , The Oracle is calling high-frequency data ( Such as BTC Price and other data that need to be updated in real time ) Far superior to reptiles in , It can avoid the shutdown of data acquisition due to program operation failure , The crawler is easy to get interrupted in the process of program running .

The conditions that an ideal Oracle network should meet

Data invocation is based on mutual trust ( No tampering ). When the Oracle invokes external data to introduce the smart contract , It should be ensured that the data fed back to the user is consistent with the data of the data source itself , Prevent the prophet from tampering with .

After the confirmation of the service requestor and the verification of other prophets , If the result of calling data is correct , Write the call data into the smart contract , And upload the transaction records to the blockchain ; If the calling data is inconsistent , Then the transaction will be defined as illegal transaction .

Data call is efficient . The Oracle contract stipulates through the smart contract , If the prophet does not respond to the user's request within the specified time after the request is sent , Or the response request timed out , The transaction will be automatically cancelled , And impose penalties on service providers ;

High data call security . The design of Oracle must effectively curb all kinds of data corruption , Like witch attack, mirror attack 、 Copy the answer ( Pay for nothing ) etc. .

And by forcing the node to TEE(TrustedExecution Environment) Perform decryption in the environment and report to the blockchain the common answers that can be seen by all users and nodes .

Comply with the principle of incentive compatibility . The establishment of Oracle incentive mechanism and supervision mechanism must realize incentive compatibility , But whether it's PoW(Proof-of-Work) still PoS(Proof-of-Stake) It's easy for most people to attack , The former is reflected in mining , Attack through mining pools and other organizational forms ; The latter is through excess mortgage (Staking) And bribery .

therefore , The design of governance mechanism must fully mobilize the supervision enthusiasm of other competitive prophecies , It is not possible to link token rewards with indicators such as packaging probability that determine the prophet's income . otherwise , The principal-agent risk caused by the inconsistency of interests between the prophet and the user will inevitably occur .

Data capitalization . Data should be treated as an asset , Pricing according to the importance and scarcity of its resources , Write smart contracts in the form of fair value .

at present , Lack of effective pricing mechanism for data assets , Because there are many kinds of data , The effects of different types of data on different users are also significantly different , At present, the data pricing power is dominated by the data resource side , There is no decentralization .

Oracle architecture

According to the form of business organization , The Oracle machine can be a centralized single prophet mechanism ( Such as Oraclize)-- Centralized Oracle ; It can also be a decentralized mechanism of multiple prophets ( Such as Chainlink、DOS Network etc. )-- Decentralizing the Oracle .

The centralized Oracle consists of a single Prophet (Oracle) Provide data to service requestors

Request for a specific data service , After the requestor specifies a data source and sends a contract request to the centralized Prophet , The service provider starts from 1 The interface of one or more data sources calls data , The data finally fed back to the requester can be 1 A source of data , The results can be summarized from multiple sources . Generally speaking , Because the cost of a single data source is much lower than the cost of summarizing from multiple data sources , The centralized Oracle only calls data from the most trusted data source , In order to realize the efficient operation of the whole Oracle system .

Decentralized Oracle provides data acquisition services jointly by multiple prophets

Using erasure code (Erasureencoding) Technology to achieve redundancy , Enhance the fault tolerance of the whole Oracle system .

When the answers submitted by all the prophets within the specified time are summarized ( The method of aggregation includes weighted average 、 The method of median or mode depends on the specific data called ) after , Feed back the summarized answers to the requester .

Centralized Oracle and decentralized Oracle, except for the underlying network protocol (TCP/IP agreement )、 Encryption infrastructure and hardware execution environment ( It's usually TEEs) Apart from the similarity, the two have significant differences in technical architecture , The iconic difference is : The centralized Oracle needs a trusted third party as the verifier or the review organization to prove its innocence , The decentralized prophecy machine passes through multiple prophets (Oracles) Mutual verification between .

版权声明:本文为[Meta universe twitter]所创,转载请带上原文链接,感谢。 https://netfreeman.com/2022/04/202204030018426951.html