decred / dcrdex

The Decred Decentralized Exchange (DEX), powered by atomic-swaps.
Other
186 stars 95 forks source link

Market Maker - no oracles available for DCR/LTC #2334

Open bochinchero opened 1 year ago

bochinchero commented 1 year ago

Fully aware that the MM bot is POC at this point, but I imagine this will be an issue on pretty much any market that doesn't already exist in a CEX. When the market doesn't have too much activity on the books (like DCR/LTC now) the basis price can drift significantly from where it should be (e.g. right now its 0.17 and in binance its ~0.20), oracles would really come in handy here.

Could this be calculated based on thbe USD or BTC prices of both assets on the pair?

martonp commented 1 year ago

Yes, if there is no oracle available, then the USD prices will be used to calculate a rate.

chappjc commented 1 year ago

coingecko and probably other sources can give conversions for arbitrary pairs.

$ curl -X 'GET' 'https://api.coingecko.com/api/v3/simple/price?ids=decred&vs_currencies=ltc' -H 'accept: application/json'
{"decred":{"ltc":0.20197442}}