An Empirical Analysis Study of The Parameter Settings of The Konomi Oracle
Introduction
Price accuracy and timeliness are some of the most important indicators of the standard of an Oracle. Konomi Oracle was designed initially with extensive empirical research on price accuracy to ensure that the Oracle provides accurate feedback on the price of each currency from the very beginning of its launch. This article will provide a detailed overview of the empirical research done before the launch of Konomi Oracle, so that potential users of Konomi Oracle can better understand our product.
Synopsis
This empirical analysis will focus on four types of currencies, BTC, ETH, DOT and SOL, to analyze whether the current parameter settings of Konomi Oracle can reflect the price fluctuations of each currency accurately and timely. In terms of data sources, we chose three months of hourly data of these four currencies from the highly trustworthy Coinbase as the accurate data for the empirical analysis and obtained a total of 129285*4 sets of data. In terms of experimental design, we conducted empirical analysis on the aggregation time and Time Frequency between feeds of different currencies respectively. The empirical results were more consistent, with the price accuracy reaching the optimum at the aggregation time of 10 minutes. In order to ensure the robustness of the results, we also conducted a robustness test by further reducing the aggregation time to 30 minutes, and the results showed that the price accuracy was not significantly affected by the change in the price feeding frequency when the aggregation was further reduced.
Data sources
In this experiment, we used minute data from June 21 2021 to September 18 2021, a total of 129,285*4 sets of data from BTC, ETH, DOT, SOL obtained from Coinbase, CoinGecko, Uniswap and other data sources. The data information includes time, highest price in one minute, lowest price in one minute, starting price, end price, and transaction volume. Figure 1 shows the data indicators of BTC in this experiment. [1]
[1] Due to space constraint, screenshots of ETH, DOT and SOL data will be attached in the appendix
Empirical Methodology
The Konomi Oracle uses time-weighted average price (TWAP) as the basic algorithm, and there are two key variables in the TWAP algorithm, one of which is the Total-Time Period and the other is the Time Frequency between feeds. The purpose of this experiment is to determine the optimal values of these two key variables based on empirical results.
The basic formula for the TWAP calculation of the Konomi Oracle is
TWAP=(PriceCumulative2-PriceCumulative1)/(TimeStamp2-Timestamp1)
Empirical Study I: Study of the Effect of Aggregation Time on Price Accuracy
According to TWAP algorithm, it can be seen that the reduction of aggregation time will make the quotation more accurate. However, extreme short aggregation time will increase the operation cost and the performance of current public chains cannot support aggregation frequency that is too high as well. Therefore, we controlled the feeding frequency in the first empirical evidence and chose the aggregation time of 60 minutes, 720 minutes and 1440 minutes for the empirical analysis.
Figure 2 shows the empirical results of SOL at different aggregation times, where the blue line is the standard price obtained from Coinbase, the yellow line is the result of aggregation at 60 minutes, the green line is the result of aggregation at 720 minutes, and the red line is the result of aggregation at 1400 minutes. The reason for choosing SOL is that compared to the other currencies, SOL has the highest volatility during the experimental period and is more representative[2]. The results are consistent with our team’s prediction that a shorter aggregation time can significantly increase price accuracy. Based on the high volatility of the cryptocurrency market, 720-minute aggregation and 1400-minute aggregation do not reflect accurate prices when the market is highly volatile. With the 60-minute aggregation option, the maximum error can be kept within 5%, and the error can be automatically reduced within a short period of time based on the algorithm.
[2] Due to space constraint, the empirical results for BTC, ETH, and DOT will be provided in the appendix
Based on the results in Figure 2, our team realized that shortening the aggregation time could significantly improve the price accuracy. Hence in the next experiment, our team further shortened the aggregation time for the four currencies[3] and compared the performance of different aggregation times for the same currency with the same Time Frequency between feeds.
[3] Due to space constraint, the empirical results for BTC, ETH, and DOT will be provided in the appendix
In Figure 3, the blue line represents the standard price provided by Coinbase, the yellow line represents the 10-minute aggregation price, the green line represents the 30-minute aggregation price, and the red line represents the 60-minute aggregation price. As we can see, the 10-minute aggregated price is the closest to the real price, but the 10-minute aggregated price is significantly more expensive to operate and less stable to obtain. 30-minute aggregated price is between 60-minute and 10-minute in terms of accuracy, but in the face of extreme market conditions, it makes the price change steeper. 60-minute aggregated price is less accurate than the other two, but in the most extreme situations, the price difference can be kept within 3% from the standard price and the operating cost will be significantly reduced. More importantly, 60-minute aggregation will make price fluctuations smoother, reducing the likelihood of malicious attacks and increasing the cost of attackers.
Empirical Study II: Whether Increased Time Frequency between Feeds Improves Oracle Accuracy
In the second empirical study, we control the aggregation time to investigate whether the reduction of the Time Frequency between feeds can significantly improve the price accuracy of the Oracle. The empirical results are consistent across the four currencies, i.e., a change in Time Frequency between feeds does not have a significant impact on price accuracy. Using SOL as example[4], we can see that the difference between the predicator price and the standard price does not change when the Time Frequency between feeds is changed within the same aggregation time, so we can assume that increasing the Time Frequency between feeds within the same aggregation time does not improve the Oracle price accuracy.
[4] Due to space constraint, the empirical results for BTC, ETH, and DOT will be provided in the appendix
Conclusion
This empirical study focuses on four currencies, BTC, ETH, DOT and SOL, to investigate the effect of the length of aggregation time on price accuracy and whether an increase in the Time Frequency between feeds can improve the accuracy of the Oracle. We conclude that a shorter aggregation time can improve price accuracy, and that a 60-minute aggregation time can improve price stability by about 3% compared to 10 minutes. Considering the operating cost and other factors, we decided to set the aggregation time for regular currencies to 60 minutes. In another study to investigate whether an increase in Time Frequency between feeds can improve the accuracy of the Oracle, we found that a change in Time Frequency between feeds does not significantly affect price accuracy after controlling for aggregation time.
Appendix A: BTC-related data and empirical results
Appendix B: ETH-related data and empirical results
Appendix C: DOT-related data and empirical results
Appendix D: SOL-related data and empirical results
About Konomi Network
Konomi is a full suite asset management solution for cross-chain crypto assets. Using Substrate as the development framework, the network aims to support more assets in the Polkadot ecosystem. Users could manage their crypto holding positions, trade assets and earn interest through decentralised money market products. Konomi also issues its native network token in order to kick-start liquidity and decentralised governance.
Stay in Touch with Us Through:
Website: https://www.konomi.network/
Twitter: https://www.twitter.com/KonomiNetwork
Telegram: https://t.me/konominetwork
Telegram Announcements: https://t.me/konominetworkchannel
Telegram (Vietnam): https://t.me/konominetwork_vn
Reddit: https://www.reddit.com/r/KonomiNetwork