Remove and Secure the Stablecoin Terra Market Swap

Hi @ek826 ,

I wish I had the time today to do this issue and the code tracking justice, and I am willing to look a little foolish if I get something wrong (if it helps), but from what I am seeing, the issue appears to be this:

Piecing together a little bit from another source regarding where the bad pricing data came from in the incident mentioned in the discussion’s description, and a quick look through from the Oracle. It appears that the bad price data came from fixer. It also appears that the oracle-feeder/price-server/config/default-sample.js provides the sample that the validators would most likely have used (in addition to the readme instructions) in pulling their price data. It looks like https://currencylayer.com/product and https://fixer.io/product are both directing to https://apilayer.com/ ( meaning they may be pulling the same underlying FX data).

The oracle-feeder/price-server does look like if the validators all followed the same order for their pricing data from default-sample.js for their own default.js config, they would all be returning and voting on the exact same data. That may confirm that the data from the source is correct, but part of the implementation was to determine the actual correct price.

So, it seems like just asking the validators to mix their sources in the default.js in fiatProvider: { fallbackPriority: [‘currencylayer’, ‘alphavantage’, ‘fixer’, ‘exchangerate’, ‘bandprotocol’] } would then fix this. This way they are not all voting on the data from the same source that just happened to fall in the same priority since the majority of them used the sample file’s priority, but instead by instructing validators to change the priority it would pull data from different sources for them to vote on. It appears that this would have solved the issue in this situation.

Thank you again so much, and I hope you are doing well today :slight_smile:

2 Likes