Implementation of the ACS will vary by specific blockchain. This iteration can be implemented on chains that are Ethereum EVM compatible.
Deployment steps are dependent on each specific chain. However, you can test this repository using Truffle:
$ git clone 'https://github.com/tellor-io/TellorACS'
$ npm install
$ truffle compile
$ truffle develop
$ migrate
$ test
Tellor can be easily integrated into smart contracts with the 'usingTellor' npm package. Detailed instructions on integrating Tellor are available at https://tellor.readthedocs.io/en/latest/UserSetup/.
Blockchains are closed systems that due to their consensus mechanisms cannot natively access off-chain data. If your smart contract relies on off-chain (e.g. internet or another chain) data to evaluate or execute a function, you either have to manually feed the data to your contract, incentivize users to do it, or rely on a centralized party to provide the data.
The Tellor oracle is a decentralized oracle. It provides an option for contracts to securely interact with and obtain data from off-chain.
On Ethereum, Tellor has implemented a network of staked PoW miners that compete to provide data and their stake can be slashed if they are deemed malicious. For more information about Tellor's implementation on Ethereum check out our documentation.
However, in order to support other chains, Tellor has developed an alternative chain structure (ACS) that works for both the security model of Tellor on Ethereum and on the alternate chain(s) as well. In addition, the token economic model and utility of the current Tellor system is not compromised and only enhanced by the ability to support other chains.
Why not just deploy the current Tellor implementation in another chain?
- Doing this would split PoW hashpower and decrease security.
- Minting the "same" token in two chains is problematic since it would increase the inflation rate and keeping a healthy token price relationship is difficult.
- Tellor's current structure was specifically designed with Ethereum's limitations and DeFi in mind. Alternate chains have different data demands and even different features (e.g. speed) that we can and should incorporate into the design.
The plan for alternate chains is to build a PoS Tellor system utilizing the Tellor Token and the current network of the Tellor community to validate and provide data on the alternate chain. The design assumes the alternate chain has:
- Functioning, Decentralized Token Bridge
- On-chain smart contracts
The following workflow describes the steps for the ACS:
- Tellor Token holders wishing to validate or request data on the alternate chain need to transfer TRB tokens from Ethereum to the alternate chain. The TRB token is an ERC20 token.
- Validators stake Tellor Tokens in increments of 10 tokens
- These ACS stakers are randomly selected to provide data for the given requests.
- There are 5 validators per data point.
- Parties pay for requests with TRB or native token and the payment is split among validating stakers
- The minimum amount of TRB for each data point is determined by the network transaction cost
- Stakers are only rewarded if they fulfill the task, but if they miss their turn 5 times, they will lose a small amount of stake (e.g. 1 TRB per day) and are un-staked automatically after that.
- Values can be disputed
- There is a day long voting round initially, with additional dispute rounds where the dispute fee and voting period is doubled each time. Rounds are necessary to mitigate risk of flash voting.
- Voting is based upon the balance on the sidechain at beginning of the dispute (so you can bring over more Tellor for each subsequent dispute)
Check out or issues log here on Github or contribute to our future plans to build a better miner and more examples of data secured by Tellor.
This repository is maintained by the Tellor team - www.tellor.io
Tellor Inc. 2019