ARK-Builders / ARK-Rate

ARK Rate is a tiny convenience app for quickly converting multiple currencies at the same time
https://www.ark-builders.dev/apps/rate/
MIT License
2 stars 2 forks source link

Use all pairs for conversions #14

Open kirillt opened 2 years ago

kirillt commented 2 years ago

https://github.com/ARK-Builders/ARK-Rate/pull/13/files/3ab38d7d0f286ad24a388faa69d251fcff49dfb7#diff-3356bc53a97bf9b7871002de7206cd61868a871759da3c49c1d29fa3dfba4c52R40

When we convert crypto assets, we use only those pairs, which have USD as one side of the pair. In other words, we always convert one crypto token to another via USDT. We could achieve more realistic conversion if we store all pairs in memory and first attempt to find direct match, before converting via USDT as a fallback.

Bonus points for advanced routing, e.g. ATOM -> DOT -> BTC.