If you’ve read Part 1 of our Best Practices series actions you learned how to properly integrate Tellor into your project along with the proper methods of implementation for security. Now it’s time to make sure the data flowing into your contracts is properly checked & monitored. Here’s our recommendations:
Hold TRB for disputes
Reporters must stake in order to submit data to the oracle and anyone who holds enough TRB can initiate a dispute on any report and win that slash. The incentives are strong for the network to stay honest and if a bad value does get posted, disputes are incentivized to happen quickly. As the actual consumer of the data, you (the user) have an even greater incentive to dispute bad values: the secure operation of your decentralized application. It is best practice to keep some TRB on hand to dispute bad data before it is used by your protocol. This ensures that you are ready to dispute any incorrect values that matter to you. For more information on how to dispute please visit our documentation on the subject.
Hold TRB for staking reporters (as insurance)
There are crypto-economic liveness guarantees you can rely on when using Tellor. That is, there are well established incentives that keep the network of reporters active and responsive to tips. Simply put, if a user tips a little bit above gas costs, the reporters will submit for you. As “insurance” the user can also stake TRB and run their own reporter that can be set up to act as a last resort. With this in mind, there should never be a situation where it is impossible for the user to get a report for their protocol. It’s easy to get set up using our open source reporter CLI – Telliot.
Become Familiar w/ Telliot
The Tellor oracle connects smart contracts that need data from the off-chain internet with reporters who can provide that data permissionlessly. Telliot is currently the standard open-source tool for reporting and interacting with Tellor’s oracle network. Reporters running Telliot are ready to handle these data requests in real time creating data submissions that qualify for on-chain TRB tips.
Telliot resources
Monitor the data
It’s best practice to monitor the data that is flowing into your contracts in order to respond to the, however unlikely, scenario that the data is bad. You’ll want to be alerted if deviant values are submitted, and if the number is wrong enough, have reliable bots in place to dispute automatically. One python-based open source tool that users can employ is – The Disputable Values Monitor (DVM).
The DVM is a tool that anyone can use to:
- Monitor / view data submitted to Tellor oracle contracts
- Send Discord alerts for unusual data submissions
- Automatically dispute wildly inaccurate values
The Auto-disputer is a complex event listener that can be configured for any EVM chain, but specifically it listens for NewReport events on the Tellor networks the user wants to monitor.
When the Auto-disputer receives new NewReport events, it parses the reported value from the log, then compares the reported value to the trusted value from the Tellor reporter reference implementation, telliot.*
In order to auto-dispute, users need to define what a “disputable value” is. To do this, users can set “thresholds” for feeds they want to monitor. Thresholds in the auto-disputer serve to set cutoffs between a healthy value and a disputable value. Users can pick from three types of thresholds: range, percentage, and equality.
For further considerations, details, and instructions on how to set up the DVM and auto-disputer please visit this repository.
Communicate Questions/Concerns
To address your specific monitoring needs, it is important to communicate any questions or concerns that arise with the Tellor team and they’ll be happy to address them all.
How to reach us
*note: the DVM is well tested, but it’s also only as good as the API sources that are configured for the median feed. As the user, It’s a good idea to choose the sources that you trust and make a pull request into the telliot-feeds repo here: https://github.com/tellor-io/telliot-feeds/tree/main/src/telliot_feeds/sources