pendulum-chain / oracle-pallet

The Unlicense
0 stars 0 forks source link

Add custom handling for argentinian blue dollar #32

Closed ebma closed 1 month ago

ebma commented 1 month ago

Context

The exchange rate of the argentinian peso (ARS) is mostly not relevant for trading but unofficial market-based rates are more commonly used. Instead, for example the 'blue rate' is more relevant and closer to the actually traded price of the ARS token. Binance offers a price feed that is close to the blue rate, see here.

The batching server should be able to return the blue rate of the ARS token to make it available for crypto applications.

TODO

Change the batching server so that the query for the ARS price returns the blue rate instead of the 'official' one. Use the exchange rate of the USDT_ARS pair from binance.

ebma commented 1 month ago

Hey team! Please add your planning poker estimate with Zenhub @b-yap @gianfra-t @TorstenStueber

TorstenStueber commented 1 month ago

So I think that we would add this to the CustomPriceApi or shall we add a new handler BinancePriceApi instead (which at the moment would only process USDT_ARS and later on we could add other asset pairs)?

ebma commented 1 month ago

Good point. I think it makes sense to implement a general BinancePriceApi as part of this. I have to see how I can hook up the code so that the FIAT:ARS-USD is not returned based on the polygon price but the binance one but I'll try to come up with something that's not too confusing.