<span>Monthly Archives</span><h1>July 2020</h1>
    DeFi risk

    Code loopholes, hackers, market volatility, arbitrageurs: the paradigm of DeFi risk management

    July 20, 2020

    DeFi refers to the decentralized financial agreement realized by smart contract, including asset trading, lending, insurance, various derivatives, etc.; except for credit service, financial service in reality can be realized through DeFi protocol. These agreements are decentralized and automatic, and there is no third-party organization in the management and maintenance. Therefore, the risk control of contracts has become a difficult problem in the industry.

    DeFi has dual attributes of Finance and technology, mainly including the following risks:

    1. Code risk. Including Ethereum underlying code risk, smart contract code risk, wallet code risk, etc. For example, the famous DAO incident in those years, the recent Uniswap vulnerability attack, and all kinds of wallet theft incidents are caused by code risk.
    2. Business risk. The main reason is that there are loopholes in the process of business design, which are reasonably attacked or manipulated. For example, FOMO3D was blocked in those years, and bZx mistakenly used the Uniswap Oracle, which was not resistant to attacks, and was reasonably suppressed to steal assets. These people are called arbitragers. Arbitrage has both disadvantages and advantages for a DeFi project.
    3. Market fluctuation risk. The lack of some response variables in the design of DeFi leads to the occurrence of market extreme situation. For example, MakerDao’s performance in 312 is mainly caused by the extreme volatility risk of the market.
    4. Oracle risk. The Oracle provides global variables and is the basis of most of the DeFi. If the Oracle encounters an attack or stops, the downstream DeFi will collapse. We believe that the Oracle will become the most important infrastructure of the future DeFi, and the Oracle with any centralized risk will eventually die out.
    5. “Technology Agency” risk. It mainly refers to that ordinary users who are not familiar with smart contracts and blockchain use the “convenient” interactive tool developed by the centralized team, which may have risks.
    risk management framework for DeFi

    The above risks should be taken into account in the design of any DeFi project. The complete process is not only to make prompt in the document, but also need some risk management means. Most of these measures are carried out in a decentralized way, and a small amount are completed in the form of community governance (mainly refers to chain governance). Here we propose a risk management framework for DeFi, which is divided into pre event, in-process and post event

    In advance: it is mainly to formally verify the contract code, including clarifying the boundary of methods, resources and even instructions used in the contract, as well as the correlation and influence of these methods, instructions and resources in the combination process, and resolutely use the method without demonstration or combination without finding boundary. This is not the thinking of traditional software development testing, it is a concept close to mathematical demonstration. Good contract development should be based on a proven combination of methods.

    In the event: the main design is downtime design and exception trigger design, that is, the contract can identify and intervene the attack behavior, including automatic shutdown design and governance outage design. The abnormal triggering is a kind of control and management of the unexpected phenomenon in the process of contract operation; the abnormal trigger is generally automatic, and some risk management variables are corrected through the abnormal trigger. Please refer to the beta coefficient and anti blocking attack settings in nest Oracle system, which is the first practice in the industry to consider shutdown and abnormal triggering.

    After the event: risk management after the event includes several parts. First, code vulnerabilities need to be corrected. Generally, it is managed through chain governance, that is, DAO governance. Secondly, the governance asset itself is attacked, and contract bifurcation is needed at this time! This is a blind spot ignored by the industry. Secondly, through the insurance mechanism, the possible risks of the contract are insured to reduce the loss. Finally, the community can track losses through tracking data on the chain and cooperate with various institutions. For on Chain Governance and contract bifurcation, please refer to nest’s design, which is an innovation.

    system framework for the security of DeFi

    The above is a system framework for the security of DeFi for your reference only. At present, the understanding of safety in the industry is too early and too traditional. If we can’t change our thinking and introduce new ideas such as boundary, completeness, consistency, formal verification, shutdown, abnormal triggering, governance and bifurcation, we can’t adapt to the future development.

    SOLO mining mode
    Blockchain public chain

    Is the mine pool the first to be regulated?On external incentive and new structure

    July 14, 2020

    With the continuous development of the blockchain world, the mining scale is becoming larger and larger, and the difficulty is also higher and higher. The SOLO mining mode of the early traditional small miners withdrew from the market and replaced by a mine pool integrated with distributed miner’s computing power: some scattered miners entrust the mineral computing power to professional institutions for management, and regularly settle the mining income. The emergence of the mine pool was once questioned by many decentralised fundamentalists. However, when we fully understand the significance of bifurcation, these doubts will not be over. We will write an article on bifurcation in the future.

    Although the concern of decentralization has been dispelled, another problem of the mine pool has not been discussed: the external incentive against the interests of miners! This will become more and more important in Ethereum.

    The so-called external incentive is the concept corresponding to the internal incentive. Before discussing this concept, the relationship between the miner and the mine pool is clear: This is a very clear principal-agent relationship in the traditional legal system, the miner is the principal, and the mine pool is the agent. In the principal-agent relationship, the agent should maximize the interests of the principal within the scope of the agreement, and can not use the agency to do any interest transfer or maximize their own interests (but not the principal’s interests). Although this principle is clear, it is difficult to implement it. It needs some mechanism design to solve the problem of incentive compatibility: the maximization of the agent’s own interests is consistent with the maximization of the principal’s interests.

    Based on the principal-agent relationship, we will discuss the internal incentive and external incentive. The so-called internal incentive refers to the value target and its distribution within the scope of the contract agreed by both parties. In terms of mining, the internal incentive is to maximize the mining revenue, including the ETH obtained from mining and the ETH obtained from package trading. Because the general mining pool obtains a certain proportion of the total mining income, this contract arrangement is theoretically incentive compatible, that is, the mine pool can maximize its own interests only by maximizing the interests of miners, or it will naturally maximize the interests of miners. This is the compatibility of internal incentives that we have analyzed at present.

    internal incentive

    However, in Ethereum, the situation may change, and this change is the emergence of DeFi.

    We mentioned in the previous article on miners’ risks that although miners cannot change transactions, there is the possibility of selective packaging transactions. The earlier the package is, or only one transaction is packed, the greater the profit will be.

    At this time, it is possible for the mine pool to make use of its own computing power to arrange related party transactions. However, this arrangement does not completely damage the interests of the miners, because the miners will still get the maximum mining income or a little lower mining income, that is, the mine pool perfectly implements the internal incentive, but obtains other benefits in the DeFi through the package transaction arrangement. This part of the income is not agreed in the contract of miners, or even can not be agreed, which is external incentive.

    Recently, it is often mentioned that the word “front-running“, that is, the above-mentioned miner preemptively arranges a transaction package, which has been regarded as a risk by the DeFi industry, and the mine pool is the most likely to take advantage of this advantage. How to determine the ownership of the profits if the mine pool has obtained profits as a result? As I mentioned earlier, there is a traditional principal-agent relationship between the mine pool and the miners, and the income should belong to the miners in a strict sense! The problem now is that if the mine pool does not disclose its packaging strategy, no one can infer whether the ore pool has obtained external incentives based on the data on the chain, and the miners can not prove it! There is a black hole of trust.

    However, if the strategy of the mine pool is disclosed and strictly implemented, it can avoid the problem of external incentive, but it is easy to be targeted by some malicious attackers. For example, the strategy of blocking attack is very clear, or in turn, the benefit of external incentive is snatched by the attacker (indicating that the design of downstream DeFi should avoid the architecture similar to front running), and even other more serious attacks Hit the solution, so that the chain application developers can not defend.

    In this way, there is a pair of contradictions in the mine pool: open strategy — attack, non disclosure strategy — trust black hole.

    mine pool architecture

    We propose a reasonable mine pool architecture: open random strategy.

    According to the effectiveness of internal incentive, several reasonable packaging strategies are designed and disclosed. These strategies are to maximize the interests of miners, and the difference is the order or combination of packaging. Then, based on some hardware random sources and software random algorithms, they are combined into a hybrid strategy (strategy set of probability distribution), and the original data of random sources are saved for verification by miners at any time. This scheme makes it impossible for attackers to capture the packing strategy effectively, and for all miners, it greatly reduces the possibility of external incentive for the mine pool, that is, it fills the trust black hole. Of course, if the mine pool does not strictly implement this process, it can still force profits, then the evidence and supervision can be used.

    Because the mine pool is completely in line with the traditional legal system, the theoretical basis of its supervision is very sufficient. In the future, it must be the most sensitive module of the public chain system, and also the module that is most easily included in the supervision. This is the necessity of the orderly development of the whole public chain. We believe that the structure of the mine pool proposed by us will appear sooner or later.

    DeFi developers

    How do developers of the DeFi protocol make money?

    July 10, 2020

    I don’t know if you have ever thought about such a question, why would someone like to do DeFi? If you are a DeFi developer, what is the purpose of your DeFi?

    1. Interest
    2. Make money by collecting service charges
    3. Meet your DeFi needs
    4. Other

    DeFi: decentralized finance.

    Therefore, the basic principle and precondition of DeFi is “decentralization”. As for the financial attribute and financial demand, it depends on the audience size and development level of the whole encryption market.

    DeFi can be very simple. For example, if there is such a contract on the chain, if you transfer into an ETH, you can generate two DETHs. If you transfer these two DETHs in, you can exchange one ETH. The contract on the chain is a DeFi protocol. It is very simple and pure. It conforms to the basic definition of DeFi. Its financial attributes and financial needs need its developers and interested users to mine together.

    Defi decentralization

    The essence of DeFi is decentralization (disintermediation), which also requires that DeFi must be open source. Since it is open source, there will inevitably be a homogeneous difi protocol.

    In this case, can developers charge users a fee?

    The same smart contract running on the chain, for users, they are no difference; moreover, they are indeed no difference.

    If we say that developer team a is more well-known under the chain, while team B, which develops the same protocol (with the same code), is very common, but the agreement fee of B is lower; if the market data shows that the difi developed by team a is more popular, what are the users choosing? Are you choosing DeFi? Or are you choosing a development team?

    If the user is choosing the DeFi, the agreement developed by team a and team B is essentially the same, and there is no difference between the advantages and disadvantages; if the user is choosing the development team, then the difi will lose its significance of existence, which is also contrary to the spirit of the blockchain!

    After the open source of the DeFi protocol, there will inevitably be homogenization competition, which will lead to the final free of charge. Therefore, it is obviously not logical for the developers of difi to charge the service fees to the users. In other words, it is impossible to charge for a long time, which will eventually be eliminated by the market.

    DeFi service fee

    However, the developer of the interaction tool can charge users a service fee.

    You can make a front-end interactive tool to provide users with a better experience of the interactive service of difi. At this time, the tool developer can charge the service fee from the difi users. However, the fee is not paid by users for using the DeFi protocol, but for the interactive experience in the process of using the DeFi protocol. The protocol is indistinguishable, but the service is different and can be perceived.

    So, back to the question we asked at the beginning of the article: why do developers develop DeFi?

    Maybe it’s really interesting for developers to develop a DeFi protocol for a sense of achievement. However, most of the DeFi developers are supposed to make money or meet their needs.

    According to the traditional Internet thinking, if a product has no demand from the developers themselves, it is almost impossible for it to be developed.

    From this point of view, the original intention of developers to develop the DeFi protocol should also have the same logic: first of all, the developers themselves have this kind of demand, and there is also a wide range of such demand in the pre-determined encryption user group; therefore, it will urge the developers to have the idea to do such a DeFi protocol to meet everyone’s needs and make money “by the way”.

    As for whether to make money by the way or the goal is to make money, we do not make a specific analysis; in short, most of the developers of profi have expectations of making money.

    DeFi protocol

    As we have already analyzed, it is impossible for a DeFi developer to charge user fees. So, how can developers make money from the DeFi protocol?

    Next, we analyze the different types of DeFi protocols. There are two types of DeFi protocols:

    The first category: the non incentive mechanism of the DeFi protocol

    The so-called no incentive mechanism means that the agreement itself has no economic model and no token issued. A typical case is the uniswap protocol.

    In this type of DeFi agreement, it is the liquidity provider, commonly known as the market maker, who can make money.

    If a DeFi developer wants to make money in this kind of DeFi protocol, he needs to participate in it and become a member of the protocol ecology. For example, he also goes to market makers to earn what he should earn.

    However, at this time, whether you are a developer of the DeFi protocol or other participants, you are on the same starting line, and there is no difference between the advantages and disadvantages. Maybe the only advantage of developers is that they have a better understanding of the protocol itself, can participate in the shortest time, provide services, and start to make money; after the market is balanced, this only advantage will no longer exist.

    Therefore, if developers want to make money in the non incentive mechanism of the DeFi protocol, they should participate like other users, otherwise there will be no chance to make money.

    The second category: DeFi protocol with incentive mechanism

    The DeFi protocol with incentive mechanism has its own token economic model. Under normal circumstances, the economic model tends to solve the “cold start” problem of the DeFi protocol; in other words, the earlier the participants are involved, the lower the cost of obtaining token, and of course, the greater the risk.

    At this time, for the developers of the DeFi protocol, they can be the first to participate, obtain token, participate in and promote consensus building.

    It should be noted here that users have costs in acquiring token or using the DeFi protocol, which can be understood as a handling fee. However, the handling fee here is not paid to the developer of the DeFi protocol, but is paid to the difi protocol system itself, and belongs to the agreement consensus holders (the people who hold the Token).

    Therefore, in this kind of DFI protocol with incentive mechanism, the developer of DFI has a very obvious first mover advantage, which also conforms to their own interest needs and the development proposition of the agreement. With the development of the agreement and the application value of the protocol itself, developers will get good returns after a period of development. Typical example: Satoshi Nakamoto wrote a white paper on the bitcoin protocol. He also participated in bitcoin mining in the early days. As you can see, the bitcoin held by Nakamoto has been worth tens of billions of US dollars.

    Through the above analysis, we basically clarify the causes and consequences of the birth of a DeFi protocol. No matter you are a developer, a participant, or an ordinary user, you can know your rights and responsibilities as long as you make clear the cause and effect logic.

    The DeFi agreement is pure, objective and reasonable. There are no so-called moral problems in it. If there is to be said, it is imposed on it by human beings. Therefore, we should not use the defects of human nature to try to prove the failure of DeFi, which is a kind of incompetence!


    After the black swan, the DeFi data mutation!

    July 5, 2020

    On February 6, 2020, the total value of ETH and ERC-20 tokens locked in Ethereum’s DeFi ecosystem exceeded US $1 billion. After a series of high-level “smash” incidents, a series of “black swan” events coincide.

    bZx attack event

    In mid February 2020, two arbitrage “attacks” occurred in bZx protocol. After the event data statistics show that the two attacks before and after bZx protocol caused the total loss of 3649 ETH. Because Uniswap uses algorithmic price, the price is easy to change dramatically when the transaction depth is limited; arbitrage “attacker” just takes advantage of the algorithm price defect of Uniswap to manipulate the transaction price of some assets maliciously, which causes the users of the related DeFi protocol who introduce the Uniswap data as the Oracle price to suffer huge asset losses.

    ETH Locked in DeFi
    total value locked in DeFi

    After the bZx incident, from February 18 to February 19, the ETH lock up amount of Ethereum head DeFi protocol decreased by about 175000, about 5.8%; while the lock up amount of USD stable currency assets did not change significantly.

    The bZx protocol attack event led to a significant decrease in the number of ETH lockups, which indicates that a large number of DeFi users have doubts about the security of the DeFi protocol. At the same time, the bZx incident triggered a collective discussion on the issues related to the oracle and the flasloan in the industry.

    The encryption market plummeted on March 12

    At the end of the first quarter of 2020, the new crown epidemic is spreading rapidly around the world, which has a serious impact on almost all walks of life. The US stock market has experienced several historic fusions, and the crypto investment market is no exception. On March 12 (later known as “Black Thursday”), the U.S. stock market collapsed, and BTC, ETH and other mainstream encryption assets fell sharply by nearly 40% in a single day. According to the data, during the period from March 12 to March 13, all kinds of trading activities on Ethereum network increased significantly, resulting in serious network congestion for a long time, and many of the DeFi protocols had the highest active period in history.

    The market crash on March 12 affected almost all types of investment assets, including cryptocurrency, except for the stock market. Although the relationship between crypto investment market and traditional financial market does not always exist, the one-day crash and stock market crash are almost caused by the same reasons: the global panic and liquidity crisis caused by the new crown epidemic.

    Enlightenment from the collapse of encryption market on March 12: what is missing in DeFi?

    ETH locked in DeFi 2

    Based on the analysis of the data of online DeFi, we found that there was a large fluctuation in the amount of ETH lock positions from March 7 to 18

    3.07-3.10: ETH lock up volume increased from 2.893m to 3.03M, up 4.7%

    3.10 ~ 3.12: ETH lock up volume began to decline sharply, from 3.03M to 2.928 m, a decrease of 3.4%

    3.12-3.13: ETH lock up volume began to increase again, from 2.928m to 3.037m, up 3.7%

    3.13-3.18: ETH lock up volume began to decline all the way from 3.037m to 2.792m, a decrease of 8%

    This kind of volatility is the true reflection of Ethereum DeFi ecology in the case of a large drop in the price of ETH: at the beginning, the price of ETH fell slightly, the bondholders continued to make up their positions, and the amount of ETH locked positions increased; however, after the great fall of ETH price, some creditors did not have time to make up their positions, or gave up covering positions At the same time, there are also some debt holders who actively redeem the mortgage assets to avoid closing positions, which also makes ETH lock position decrease.

    From the above data performance, the instantaneous negative impact of 312 crash event on ETH lock up is less than the previous bZx attack event; however, as the price of ETH continues to fall, the impact of the event on the lock up of DeFi ecological ETH is growing: in the week after March 12, ETH lock up volume decreased by 12.2%.

    total value locked in DeFi 2

    On the other hand, on the day of 312 sharp fall, the scale of USD stable currency assets locked in DeFi declined significantly, from 893.43m on March 12 to 559.211m on March 13, and the 24-hour stable currency lock position decreased by more than 37%, which is also related to the “liquidity crisis” in the encryption market proposed by later industries.

    ERC777 protocol reentry attack

    On the morning of April 18, 2020, the Uniswap protocol was successfully attacked by hackers using the re-entry vulnerability. The hacker carried out this reentry attack through the compatibility defects of Uniswap and ERC777 standards, which exhausted about 1278 ETH assets in the Uniswap ETH-imBTC pool.

    What’s worse, just 24 hours later, at 08:45 a.m. on April 19, another DeFi protocol, dForce, was attacked by hackers in a similar way. In the dForce attack, hackers successfully borrowed a variety of encryption assets from dForce platform by using inflated imBTC as collateral, resulting in heavy losses to dForce platform users, with a total amount of up to 25 million US dollars. (Note: the stolen funds were recovered successfully under the coordination of various efforts)

    total value locked in DeFi 3
    ETH locked in DeFi 3
    total value locked in DeFi 4

    After the incident, the encryption funds of dForce lock warehouse dropped to nearly 0, and the head of the difi users suffered a serious impact, which greatly damaged the vitality of the whole industry. However, this re-entry attack is not a major technical vulnerability with high complexity, but a low-level development vulnerability, which does not have more impact on other Ethereum DeFi protocols. Therefore, from the data performance point of view, after the attack event, the lock up amount of ETH and USD stable currency assets of DeFi ecology did not fluctuate significantly.


    However, on the 19th, there was a huge increase in the related transactions of USD stable currency assets on Compund; in addition, the trading volume of USD stable currency on Kyber and IDEX also increased. Some of these data changes are closely related to the operation after hackers steal dForce assets.

    The incident of this reentry attack has triggered collective speculation in the DeFi industry, which is of great significance to the development of the entire DeFi industry. It makes more and more DFI developers begin to reexamine security issues, decentralization principles, rights and responsibilities involved, and even so-called moral issues.

    The above is about some accidents and data in the DeFi ecology since 2020.

    DeFi has just started, and it will be more wonderful next time. Let’s look forward to it!

    Blockchain public chain

    Easy to read Gas,GasLimit,GasPrice on Ethereum

    July 4, 2020

    What is Gas?

    Gas exists in the EVM of Ethereum, and is the unit of measurement for calculating workload. As the fuel of Ethereum network, it provides power for the development and operation of Ethereum network ecology. Just as gasoline plays a role in automobiles, Gas is essential for Ethereum users and developers.

    On the one hand, Gas is used to reward Ethereum miners to pack blocks; on the other hand, its existence improves the threshold of malicious transactions, which can better maintain the normal operation of Ethereum network.

    In the bottom layer of Ethereum system, Gas consumption is determined for each specified operation and contract method, and Gas consumption is required for each operation step in the transaction process. For example, the user deploying the NEST Oracle quotation contract needs to pay a certain Gas fee to execute the transaction, and Gas is the service charge charged by the Ethereum system. When using Ethereum network, the maximum value of Gas consumption must be set. When the Gas consumption is finished or the smart contract logic is completed, the execution of the contract will be stopped. In Ethereum system, Gas needs to be converted into ETH for payment.

    Tip: no matter whether the transaction initiated by the user is packaged successfully or not, the Gas fee must be paid. This is just like driving home on the way home and running out of Gas. Even if you don’t get home successfully, the gasoline consumed has indeed been consumed, so you have to pay for it.


    What is GasLimit?

    GasLimit is the maximum amount of Gas that Ethereum users are willing to pay for the successful execution of a transaction logic.

    If the GasLimit of a transaction is set too low to complete the transaction logic, the system will prompt “out of Gas” and the transaction will fail. The transaction will still be packaged into the block, and the Ethereum assets carried in the transaction will be automatically returned, but the Gas fee will still be charged, which will be paid as a reward to the miners who pack the block. (users who often deploy smart contracts should have encountered this situation)

    If the number of Gas used in the transaction is less than or equal to the GasLimit you set, it will be packaged successfully. The total amount of Gas consumed in the execution of this transaction is GasUsed, and the unused Gas will be returned to the transaction initiation address.

    Please note that GasLimit here refers to the Gas cap of a transaction. In the whole development process of Ethereum, there is also a GasLimit value that is more important and often mentioned, that is, the GasLimit of a block, that is, the upper limit of the total Gas of the transactions that can be executed in a single Ethereum block.

    When each block is packed, the total GasLimit of all transactions in the current block will be determined, so as to determine the number of transactions that can be packed in the block. Therefore, when packing each transaction, miners will judge whether the current Gas volume is enough to package the current transaction. If you package a transaction that will exceed the GasLimit of the current block, it will be rejected by the Ethereum network, and the system feedback will be “below Gas limit”. After several upgrades of Ethereum 1. X, the GasLimit value of an Ethereum block is 12 million Gas.

    Etherscan GasPrice data
    Etherscan GasPrice data

    Price of single Gas: GasPrice

    GasPrice is the price a user is willing to pay for each Gas, in Gwei.

    1 ETH = 1,000,000,000 Gwei

    In addition to the award of mining block, Ethereum miners always hope that more Gas fees will be included in the block; therefore, when the mining pool packs the transaction, it will give priority to the transaction that pays more miners’ fees.

    Miner’s fee for one transaction = GasPrice * GasUsed

    Therefore, the higher the GasPrice is set, the earlier the transaction is packed into the block and the more confirmed; if the GasPrice setting is too low, the transaction will be in the pending state for a long time, waiting for the miner to pack. Therefore, when the Ethereum network is congested, if we want to speed up the transaction, we need to greatly increase the GasPrice value of the transaction, and let the miners give priority to packing our transactions.

    The above is about the definition and relationship of Gas, GasLimit and GasPrice parameters in Ethereum network. If you want to have a more direct perception of blockchain technology and smart contracts, you can quickly deploy your own smart contract on the Ethereum chain, or join the NEST price Oracle network to become a quotation miner and participate in the Oracle quotation.


    Agent risk of miners

    July 2, 2020

    After the birth of Bitcoin, a special industry came into being: “mining”, the node that completes nonce calculation and packs blocks is called miner.

    Every transaction we make on Bitcoin is recorded by these miners on the blockchain. As miners have the right to keep accounts, naturally they are very important to the special currency system, which makes us worry: can they affect our assets, such as turning away, disappearing, or not allowing us to trade? This kind of influence is the agent risk of miners.

    To analyze the agent risk of miners, it is necessary to go deep into the mining process to determine which miners can make their own decisions and which are arranged by agreement or algorithm.

    Taking BTC and ETH as an example, in the process of packaging, which transactions to choose, which data to package (such as time stamp), which nodes to broadcast to and which nodes to accept are all decided by the miners themselves; while the packing rules, the HASH after packaging, and the calculation of nonce value based on HASH are all agreed in the protocol and can be verified by the system, and can not be tampered with by miners at will.

    According to this process, without the private key, it is impossible for a miner to forge a transfer out transaction, so it is impossible to transfer your money away. But miners can not let your deal package, or even add your address to the blacklist, as long as it is packaged, ignore your transaction. In addition, if there is a need to prioritize transactions, miners can rank your trades at the bottom or other designated transactions at the top.

    selectively receive radio

    Because miners can selectively receive radio, this will become an excuse: blacklisting an address can be said to have not received the transaction, and the blacklisted people can not find evidence of their being blacklisted from any data, so they can not trace the responsibility of miners.

    Of course, for a pure miner, anything he wants to do is OK, as long as it meets the agreement. However, for the miners entrusted to the mine pool, if an address is included in the blacklist randomly, it should be regulated or explained. Because the relationship between the mine pool and the miner is the principal-agent relationship, it can not be guaranteed that the behavior is based on the interests of the miners rather than the interests of the mine pool. For this issue, we will write a separate article to discuss the agency risk of the mine pool.

    From the above description, the impact of miners on individuals mainly includes preemptive transaction and exclusion transaction (blacklist, etc.), both of which will not cause asset loss on BTC (of course, time loss is also a kind of loss); at the same time, considering that the impact of a single miner is small (except for the mine pool), and the packed miners are generated randomly, these two kinds of agency risks will follow With the increase of nodes and the expansion of the system, it decreases. But if the development of the mine pool is more and more concentrated, it may be the opposite.

    However, in ETH, due to the more complex logic contained in smart contracts, especially in the field of DeFi, the importance and relevance of a transaction has greatly increased, which means that the risk of miners’ agency has increased.

    smart contracts

    Taking 312 as an example, when there is a large-scale run on DeFi, the income risk structure of preemptive trading and excluding transaction becomes very important. At this time, there is “external incentive”: that is, miners are not motivated by ETH generated by package trading, but by the arbitrage value of various contracts on the chain, so that under the most open assumption (miners are completely based on their own total incentive) There may be all kinds of confusion in ETH, and miners have become the biggest beneficiaries of difi’s arbitrage interests.

    Such confusion will affect the decentralized consensus of the public chain, especially if the mining pool does so, the negative impact will be doubled.

    Of course, in the real world, miners and mining pools will be affected by various factors such as reputation, external supervision, community resistance and so on. Therefore, there are only a few miners who really dare to carry out such blatant external incentives. But this kind of potential risk still exists, especially the mine pool; because it conforms to the principal-agent structure of the current law, once the interests of the principal are damaged, it is likely to be accused by the traditional legal relationship, which is a high cost thing.

    introduction of NEST Oracle

    Comparative analysis of price on chain and market of Nest Oracle

    July 1, 2020

    Brief introduction of NEST Oracle

    NEST price Oracle is a Layer 2 protocol network based on Ethereum network, which is a decentralized Oracle system.

    NEST Oracle defines and implements a new scheme to generate price facts on the blockchain. Based on the market game theory, the price facts of the off chain market are generated synchronously on the chain by the way of miners’ quotation. Combined with the mining mechanism of NEST quotation, the miners are encouraged to become a set of logical closed-loop distributed quotation system, which perfectly generates the off chain price facts on the chain and forms the NEST price Oracle.

    Features of NEST Oracle

    The essence of the orlcle price up chain is not to “Upload” price information to the chain, but to form (generate) price facts on the chain; whether the price information is uploaded centrally or in a decentralized way, it means that the off chain price fact is generated before the chain. The real Oracle system should make sure that the off chain price facts are generated on the chain synchronously.

    The unique feature of NEST Oracle is that it directly forms a price fact on the chain, while other Oracle systems only upload a price fact to the chain, which is an essential difference.

    In addition, the cost and credit scale of the price formation of the prophecy machine should be able to support the DeFi far beyond this scale. Every piece of data generated by the NEST Oracle is provided by the quoted miners with real gold and silver, and each quotation data must be verified by the whole market before being employed by the system.

    Data on NEST Oracle chain

    NEST Oracle quotation contract address:

    NEST Oracle quotation contract address
    (data collection time: 13:30, April 16, 2020, the transactions circled are the quotation of NEST Oracle)

    In order to more intuitively and accurately analyze the timeliness of data on the chain of NEST Oracle, we collected and sorted out the price data generated by NEST oracle on the chain in the last 24 hours (2020.04.15 12:00 ~ 2020.04.16 12:00), as well as the transaction data of the Huobi platform at the corresponding time point. Put the two together to make a most direct comparison chart of the fit between the price data of NEST Oracle and the data of trading market

    analyze the timeliness
    (data collection time: 12:00, April 16, 2020, dark blue curve is price data of NEST Oracle)

    Observing the trend of the data in the above figure, we can see that the price data generated by NEST oracle on the chain is highly consistent with the price trend of the trading market of the Huobi platform. In order to further calculate the difference between the specific data, we conducted statistical analysis on the chain data from April 15, 2020 to 12:00, April 16, 2020

    (we collected 250 pieces of data, only part of the data in the figure)

    In these 24 hours, we collected and sorted out 250 price data of NEST Oracle chain; after calculation, the average deviation ratio of price data on NEST Oracle chain and that of Huobi platform is 1.675 ‰

    Through the STDEVP algorithm in Excel, we get the following conclusions:

    The standard deviation ratio is 1.759 ‰

    If the transaction data of the Huobi platform is regarded as the market fair price data, the “standard deviation” of the deviation ratio between the ETH / usdt price data generated by NEST prediction machine and the market fair price data is only 1.759% (Note: STD dev, standard deviation) – a statistical term. A measure of the degree of dispersion of data distribution. It is used to measure the degree to which data values deviate from the arithmetic mean. The smaller the standard deviation, the less the values deviate from the average and vice versa.)

    quotation block interval of NEST Oracle
    (data collection time: 14:40, April 16, 2020, Y-axis is the quotation block interval of NEST Oracle)

    According to the current chain quotation data of NEST Oracle, as shown in the figure above: we can see that the quotation block interval of NEST Oracle in recent hours is about 28 blocks (Note: Ethereum generates a new block in 13 seconds, and the quotation is about once every 6 minutes).

    According to such a price update frequency and price deviation ratio, NEST price predictor should be the most time effective decentralized Oracle scheme among all the current Oracle schemes.

    The importance of decentralized Oracle

    As the most important infrastructure in Web3.0 era, decentralized Oracle solves the industry problem of price shortage on the chain, and it will play a decisive role in promoting the development of DeFi!

    As an innovative player of the seeker track, NEST price Oracle will bring more effective information to the world on the chain, help the development of DeFi and create infinite possibilities!