Blockchain is a self-verifying, self-enforcing cryptographic world. It cannot directly know what is happening in the real world, such as the price of Tesla stock, the weather conditions in Beijing, the Premier League score, etc. Blockchain needs someone to tell it real-world information in order to perform specific operations and meet the needs of specific scenarios. The provider of this information is the oracle.
The Necessity and Decentralization of Oracles
If only one person or institution were to provide this information, that person could intentionally enter incorrect results because he or she could be bribed, threatened, hacked, or for profit. Centralized oracles have security issues. In order to achieve higher security and comply with the permissionless nature of the cryptographic world, it has become very important to build a decentralized oracle.
Exploration of ChainLink: The importance of oracles to the cryptographic world was also mentioned in the previous article of Blue Fox Notes "ChainLink, Oracles and the Connection between Two Worlds". For today's DeFi, price stream data is needed everywhere. Once a problem occurs, it will endanger the entire DeFi building. In order to realize a decentralized oracle, ChainLink provides optional multi-data source and multi-node oracle services for smart contracts, and weights the summary to obtain the final result. It also uses node mortgage tokens, verification systems, and reputation systems. , authentication services, trusted hardware and many other ways to improve its security.
Tellor’s PoW mechanism: an attempt at decentralized oracles
Tellor's path of exploration of decentralized oracles is unique. Its biggest difference is its PoW mechanism. Everyone is relatively familiar with the PoW mechanism, because it is the block proposal mechanism adopted by Bitcoin. The node that proposes a new block is determined by the computing power. The miner who proposes the new block can obtain the block reward of Bitcoin. The model of competing to propose new blocks through computing power investment can increase the cost of evil and prevent tampering with transaction records.
Tellor's PoW mechanism: Why is the PoW mechanism used for the Tellor oracle? The decentralized oracle network means that it will not only have one or two oracle nodes. Since participation is permissionless, many oracle nodes can participate in the Tellor network to provide oracle services for the blockchain. Since there are multiple oracle nodes participating, there is no need to worry about a single point of failure or a single oracle node providing incorrect data. However, it also brings up a question, so many nodes, which node services are used? Tellor adopts the PoW mechanism to solve this problem.
Tellor's PoW also combines the advantages of the pledge mechanism. To become a Tellor oracle node, you first need to pledge 1,000 Tellor tokens TRB. Once a node behaves inappropriately, these tokens will be reduced. This is the first way to prevent nodes from doing evil. Road protection. As long as it is a normal node, there is no motive for doing evil.
Tellor’s security mechanism
The second barrier for Tellor to ensure the security of oracle nodes is the PoW selection mechanism. Among all nodes participating in providing oracle services, the first five nodes to complete the PoW puzzle challenge can obtain Tellor’s newly issued token TRB. award. In other words, to become the five oracle nodes that ultimately provide data, competition for computing power is required. The five nodes that won the computing power competition provide numerical values. Tellor will use the median of five different node values instead of the average to prevent someone from manipulating the values.
In addition, Tellor also has a mechanism to challenge the results. Any TRB token holder can challenge the value submitted by the miner within one day. In order to prevent malicious attacks, challenging the value requires paying a challenge fee. After that, there will be a one-week voting period for TRB token holders to vote whether the value is valid. If the challenge is successful, the malicious miner's stake will be rewarded to the challenger who submitted the challenge. If the challenge fails, the challenge fee is paid to the challenged miner.
The above lines of defense are the most important mechanisms for Tellor to achieve security. However, Tellor’s security also needs to consider a larger level. For example, if someone enters wrong information through the oracle and can obtain greater profits on other protocols, then even if all tokens on the Tellor oracle network are slashed, the attacker will feel that it is a good deal. To prevent similar attacks, it is critical to increase the value of the TRB token, as this can greatly reduce the incentive for attacks. First, if there is an attack, the pledged TRB tokens will be confiscated. Second, it will not be able to obtain future TRB block rewards and user rewards.
Ultimately, Tellor's security largely depends on the value of TRB. This also raises a question. In the early days, Tellor was more suitable to serve encryption projects with smaller market capitalization, or to serve encryption projects with larger market capitalization together with other oracles to ensure the security of the oracles.
Incentives for Tellor oracle mining nodes
The motivation for Tellor mining nodes is to obtain mining token rewards and data query fees from the data demand side. The mining reward is Tellor’s native token TRB, which is similar to Bitcoin’s mining reward. However, this is different from other oracles that mainly capture revenue through data query fees.
If a smart contract on the chain, such as DeFi, wants to obtain secure oracle data, it needs to submit a data request to the oracle. Based on the reward assigned to each request, the oracle selects the request with the most funds every ten minutes. Each request collects specific data (such as the price of ETH/USD) and makes it available on-chain. Tellor will create puzzles for miners to solve using computing power competition to become the five selected nodes. The five selected nodes will receive equal rewards.
For users, ensuring that the queries they need can be mined by miners by issuing more bounties to incentivize miners to retrieve their values. Similar to Ethereum, transactions that pay higher gas fees will be packaged into blocks first. The Tellor oracle time target is 10 minutes, with an average of only 144 queries per day. Limited queries will also bring competition. Once the number of encryption projects using Tellor services increases, demands may be queued up, resulting in fee competition. This will help miners increase their profits and improve security.
Tellor’s brief service process
The Tellor oracle uses a delegate-agent structure for the contract and deploys two smart contracts: TellorMaster.sol and Tellor.Sol. Among them, TellorMaster.sol allows delegate calls from Tellor.sol for data storage. Tellor.Sol, on the other hand, holds and distributes the token supply, tells miners what values to submit, and has built-in puzzle challenges. It provides miners with the necessary fields for data collection, allows miners to submit proofs and off-chain data, sorts values, and allows users to retrieve values and bid on which data sequence to mine next. The contract mines new value every ten minutes through difficulty challenge adjustment.
Process for adding and retrieving data
Users submit query requirements to the oracle machine, and use TRB tokens to incentivize miners to prioritize their queries:
Other users wishing to obtain the same data pay or “tip” that data sequence to further incentivize miners’ choices:
Every ten minutes, the oracle selects the most lucrative query and sets a new challenge puzzle for miners to solve:
Miners submit their PoW solutions and off-chain data points to the oracle contract. The oracle contract sorts the input values and once 5 values are received, the official value (the median of the five values) is selected and saved on-chain. Miners will then receive an equal share of rewards, including basic rewards and tipping fees.
The Tellor oracle runs on the Ethereum Rinkeby testnet and is also accessible on Github.
Conclusion
Tellor adopts a different construction model from Chainlink. Just like the encryption spirit mentioned in the "Tradeoffs in Blockchain Projects: Climb. Walk. Run" previously released by Blue Fox Notes, Tellor has adopted a decentralized approach from the beginning to build its oracle, which combines The advantages of PoW mining and PoS staking, this hybrid mechanism brings it a certain security guarantee and a flexible incentive mechanism.