This will be necessary for controlled e2e and manual tests. The oracle clients read price information from a number of currency exchange APIs and use that to calculate the price of the kCoins in the market, and thus adjust the minting and burning rates.
We need a set of mock API endpoints that we control, which will replay fake price data as if it were happening now. Because the outcomes of those data are known, we can then make sure the oracle clients are fetching the correct values, and also that the minting and burning rates are correct.
An example of an exchange that we'll be working with for kUSD is Exrates (which has an API).
The mock exchange must:
[x] Be able to replay fake data from several exchanges (Extrates, with more to follow) in the proper format of that exchange
[x] Be able to generate realistic data on an ongoing basis (for the testnet) that can be manually altered.
[x] Be portable (ie Dockerised) so that we can deploy any number of different exchanges
[x] Have some sort of control mechanism, so that we can choose what data to replay
[x] Have very simple analytics/logging so that we can make sure the oracles are making requests properly
[ ] Serve the API content over HTTPS, because that's required for oracle request verification
This will be necessary for controlled e2e and manual tests. The oracle clients read price information from a number of currency exchange APIs and use that to calculate the price of the kCoins in the market, and thus adjust the minting and burning rates.
We need a set of mock API endpoints that we control, which will replay fake price data as if it were happening now. Because the outcomes of those data are known, we can then make sure the oracle clients are fetching the correct values, and also that the minting and burning rates are correct.
An example of an exchange that we'll be working with for kUSD is Exrates (which has an API).
The mock exchange must: