Crypto Exchange Crypto Exchange
Ctrl+D Crypto Exchange
Home > Huobi App > Info

HashKey Cao Yixin: Detailed explanation of the oracle machine principle of mainstream decentralized lending products



Compare the oracle principles of MakerDAO, Aave, and Compound from two dimensions of security and timeliness. The oracle machine is particularly important in the asset pricing link in the decentralized financial system. The security, timeliness, accuracy, and cost of the oracle machine quotation are the dimensions that we should focus on. This article comprehensively analyzes the principles of oracle machines adopted by mainstream decentralized lending products and compares them from the two dimensions of security and timeliness. As an important infrastructure, the oracle has been widely discussed. In the past, it generally refers to the modules that provide trusted data outside the chain for the blockchain in a narrow sense. information machine. The information conveyed varies, which may be information such as prices, indexes, and macro parameters used in the trading market; or information such as weather and elections used to predict the market. The dependent information sources can come from on-chain or off-chain, with different degrees of decentralization. Figure 1. Examples of different types of information sources and oracles Figure 1 gives several examples: the signed and certified API provided by the Coinbase exchange is a typical centralized off-chain information source endorsed by authoritative reputation; Uniswap acts as an on-chain The original decentralized exchange, the TWAP oracle machine provided is a typical source of information on the decentralized chain. These two types of information sources have their own advantages and disadvantages. The centralized off-chain information source has the credit risk of the operator, but the type of information that can be covered is relatively comprehensive and generally has good timeliness and high accuracy; the information source on the decentralized chain uses block The credit risk is removed from the chain, but at present the AMM price oracle machine is the main type, with a single type, and there have been too many incidents of manipulation. They can all be used as the cornerstone of the generalized oracle machine, making it more robust and secure through aggregation and mutual anchoring, and participating in the operation of the decentralized system. For example, MakerDAO has built an alliance oracle system that authorizes several third-party off-chain information sources to form an alliance to provide price information for assets, which can resist the credit problems of individual centralized information sources to a certain extent, but does not rule out the risk of alliance collusion and corruption. Governance and incentives to manage. South Korean encryption investment institution Hashed will launch a second fund of 170 million US dollars this month: According to news on September 7, South Korean encryption investment institution Hashed will launch its second blockchain fund this month, planning to raise more than 200 billion won (173 million US dollars) ). Hashed launched its first $120 million blockchain fund last December, backed by South Korean IT giants Naver and Kakao. According to Naver's financial report, the company invested at least 14 billion won (more than $12 million) in that fund, and said Hashed has the most experience in the blockchain field. Hashed typically invests between $1-10 million per company. The company participated in Axie Infinity production company Sky Mavis’s 2019 seed round and joined billionaire Mark Cuban in Sky Mavis’ $7.5 million round in May. Hashed also invested $2.5 million in Indian game streaming platform Loco. Hashed founder Simon Seojoon Kim is an early ETH investor, his wealth mainly comes from this, and he still holds a large amount of ETH. (Bloomberg) [2021/9/7 23:05:18] Chainlink proposes a more decentralized oracle system that manages permissionless information sources through economic incentives and a reputation system. Compound proposes a solution to anchor centralized off-chain information to decentralized on-chain information, which strengthens risk control while retaining the advantages of centralized information sources. This article starts from the price oracle to explore the adoption of the top three decentralized lending products (as shown in Table 1), and analyzes and compares their principles and performance. Table 1. Oracle forms and information sources used by Top3 decentralized lending products MakerDAO, as a veteran DeFi project, launched a single ETH-pegged stablecoin DAI (now renamed SAI) in June 2017, and based on its self-built The first version of the oracle quotes for the collateral ETH. This version of the oracle machine provides ETHUSD quotations from 14 personal anonymous information sources (Feeds) licensed by MakerDAO, and obtains the median of the quotations through an aggregation contract, and finally feeds the price to the main contract of the MakerDAO system. Resist the risk of information source nodes being manipulated or blackmailed through anonymity. The selection of information sources, the number of information sources and other configuration parameters are managed by the MakerDAO governance organization. Gold-i partners with Zero Hash to offer institutional clients centrally settled crypto products: Fintech provider Gold-i and digital asset settlement company Zero Hash have launched a partnership to provide Prime-of-Prime, retail FX brokers and Hedge funds offer centrally settled crypto products and a cost-effective way to access crypto liquidity providers. The partnership leverages Gold-i's order routing and order matching technology, Zero Hash's fully automated and customizable post-trade infrastructure through its Crypto Switch™ 2.0 to maximize capital efficiency. (Hedgeweek) [2020/9/4] MakerDAO launched the second version of the oracle machine in September 2019. Compared with the first version, in addition to the functional improvement and performance improvement that supports multi-currency quotations, the main improvement points are: the proposal to add DeFi partners serve as institutional information sources (including dYdX, 0x, Set Protocol, Gnosis); propose to create oracle team roles and build an oracle governance framework; propose an optimized oracle incentive mechanism. The risk of the alliance oracle machine is that users need to trust information sources and governance institutions. The above improvements are aimed at making the MakerDAO oracle machine more decentralized: the introduction of decentralized information sources can alleviate the credit risk of centralized information sources to a certain extent, but it may Introducing more risks of being manipulated by a third party; while the improvement of the governance mechanism and incentive mechanism often has a long-term impact on the system and cannot be seen immediately. Schematic Diagram 2 of the MakerDAO oracle machine shows from left to right the process of the MakerDAO oracle machine relying on off-chain licensed information sources to quote (there is no official explanation on how to obtain the information sources of DeFi partner institutions, and further follow-up reports are needed). Figure 2. MakerDAO oracle machine architecture (source: MakerDAO official website Docs) In order to ensure the secure transmission of off-chain data to the chain, each licensed information source node runs a client (Omnia Feed Client), which will use the Ethereum private key The signed price information is broadcast to the relayer (Omnia Relayer Network) through a distributed gossip protocol called scuttlebutt. News | Blockchain company Hedera Hashgraph launches Composer Chrome extension: According to CryptoNinjas news today, the US-based distributed ledger technology platform Hedera Hashgraph has launched its Composer Chrome extension, which is used to enable Hedera in client access Dapps. [2019/9/26] The repeater listens to these signed messages, checks their liveness, and packages the price data and signature into an Ethereum transaction, broadcasts it to the Ethereum network, and is modeled by the on-chain oracle machine. The group further processes the price information. The on-chain oracle module mainly includes two contracts, Median and OSM. The main task of the Median contract is to verify the time stamp, whether the information source is in the white list, whether the price sequence is in ascending order, and use the Bloom filter to verify that the price comes from different information sources according to the price and signature sequence pushed in the second step. Calculate the median after passing and replace the original value. An information source whitelist is maintained in the Median contract to check whether price information updates come from licensed addresses. The MakerDAO governance body adjusts the information sources by updating the whitelist, and has the right to update the minimum number of information sources required to calculate the median (currently set to 13). OSM is a smart contract that further improves the security of the oracle machine. It is mainly used to set a delay mechanism for quotations to reserve time for identifying and responding to potential security incidents. A price queue is maintained in the OSM contract, and the latest price information will be adopted by the "middleman" Spotter contract and called by the main contract (Vat) only after 1 hour. Emergency oracle The emergency oracle is MakerDAO's last line of defense against attacks and is voted by MKR holders. The emergency oracle has the right to unilaterally trigger an emergency shutdown (Emergency Shutdown), so the risk of a run can be mitigated by freezing a single oracle. Timeliness of MakerDAO oracle Through the above process analysis, we can find that the working timeliness of MakerDAO oracle is mainly affected by the following links: Information source update frequency dynamics | HashCash launched a white-label payment platform based on Bitcoin: According to bitcoinexchangeguide, blockchain Technology company HashCash announced Thursday the launch of a bitcoin-based white-label payment platform that will help merchants accept bitcoin as payment. [2018/11/10] Information sources submit price update information based on two principles: a) the difference between the current price and the last submitted price is greater than the specified threshold (currently set at 1%); b) when the last submitted price exceeds 6 Hour. The Median contract update frequency is instant and depends on the repeater transmission frequency. Whenever the Median contract receives the price sequence sent by the repeater, it will immediately execute the verification process and update the median after passing the check. The OSM contract update frequency is approximately every 1 hour (at least). An external EOA address can execute the poke() method in the OSM contract in batches by calling a public contract named MegaPoker to complete the update of the price queue in the OSM contract of each mortgage asset, and then trigger the Spotter contract to read the latest price in turn. In order to maintain this update frequency, the poke() method in the OSM contract is restricted to be called again only when the block timestamp interval is greater than or equal to 3600 seconds. Figure 3 shows the OSM contract addresses and Spotter contract addresses of the 24 mortgage assets currently supported by the MakerDAO oracle. Network transmission and block generation time lag These two delays are at the second level, which is negligible compared to the one-hour delay of OSM. Figure 3. OSM contract addresses and Spotter addresses of 24 assets supported by the MakerDAO oracle (source: MegaPoker contract: 0x7472e5830dc6402c22bb5b3abbca14d6a058e482). It can be seen that the price update frequency of the MakerDAO oracle is as fast as once an hour, but it will be subject to Median due to the barrel effect. The price update frequency in the contract. We can measure its update frequency through ETHUSD’s Median contract transaction records. It can be seen from Figure 3 that the time interval for updating quotations of the contract peaks at around 9 minutes and 219 minutes, and there is a 70% probability that the quotations will be updated within 60 minutes, which means that the quotations obtained by the OSM contract every 1 hour are 1 3.65 hours is the upper limit of the oracle price update delay in most cases. NiceHash, the world's largest cryptocurrency mining computing power market, has stolen as many as 4736.42 BTC worth about 62 million US dollars: NiceHash, a cloud-based encrypted digital currency mining platform, announced today that its system was damaged by hackers, and their virtual The bitcoins in the wallet were also stolen, and the specific amount of stolen bitcoins has not been disclosed. [2017/12/7] Figure 3. MakerDAO oracle ETHUSD Median contract LogMedianPrice event time interval distribution (source: Median contract: 0x64DE91F5A373Cd4c28de3600cB34C7C6cE410C85) Principle of Chainlink oracle The structure of Chainlink oracle and MakerDAO oracle is actually very similar. The difference is that the information source does not need to obtain Chainlink's permission. The principle and economic incentive mechanism have been mentioned in other research reports, so I won't go into details here. The Chainlink system can be briefly described as the work of two types of nodes: Out-of-chain nodes respond to the request of the aggregation contract, and transmit the off-chain information to the aggregation contract by sending transactions on the Ethereum chain. The node responder generates an aggregated price. The nodes on the chain run smart contracts on Ethereum, which are generally sponsored and established by community users, mainly including proxy contracts (Proxy) and aggregation contracts (Aggregator). The on-chain request of the contract accesses the corresponding Aggregator to obtain the latest price stored in it, and feeds the quotation back to the user contract in the same on-chain transaction. Figure 4. The user calls the Chainlink oracle process (from the official docs) to trigger the Aggregator contract to start a new round of aggregated quotations. There are two factors: the delay from the last aggregated quotation exceeds a certain threshold; the contract will monitor the quotations from some information sources and communicate with The last aggregate quote comparison, triggers when the price difference deviates from a certain threshold.


Huobi App
When does the Kusama auction start? Why does my DOT always fail to transfer?

Recently, I have received a lot of private messages from my classmates about auctions and pledges, so I held an online live broadcast yesterday to answer some of your questions. For the questions with more questions.

Li Wei of the Central Bank: Three Effects and Three Directions of Legal Digital Currency Standard Construction

Recently, Li Wei, deputy chairman of the National Financial Standardization Technical Committee and director of the Science and Technology Department of the People's Bank of China.

Golden Observation | How to mint NFT in Art Blocks?

The Art Blocks platform can generate artwork on demand, and how to use it will be introduced below.NFT is not a simple copy of traditional digital products.Of course not, to a large extent.

Bitcoin Consolidates $1 Trillion Market Value Futures Open Interest Hit New High

Last week, Bitcoin’s market trading price range was between US$57,168 and US$60,265, with a fluctuation range of about 5.4%. It is worth noting that its market value has exceeded US$1 trillion for a week.

200 times in 1 year, what is the origin of the airborne Top10 THETA?

Speaking of those "dark horse Tokens" that have performed outstandingly recently, Theta can be regarded as one of them. On March 2 this year.

The latest developments in the Ripple case: looking forward to reconciliation and pointing out that the United States has a "risk of falling behind"

Recently, Ripple CEO Brad Garlinghouse visited Bloomberg and CNN to respond to the latest developments in the Ripple case.Garlinghouse said that all of Ripple attaches great importance to the SEC's prosecution this ti.