Exchange rate as a decimal
Is your feature request related to a problem? Please describe.
Currently we're storing the exchange pair's rate as a float8, which means that it's able to store only up to 15 decimal digits precision.
Since we need to be compatible with cryptocurrencies that usually have up to 18 decimal digits, this means the exchange rate might not be accurate down to the smallest unit of many cryptocurrencies.
Describe the solution you'd like
Convert exchange_pair.rate to a decimal with NUMERIC(27, 18) (syntax).
This would max the rate at 999,999,999.999999999999999999 which is enough for ETH for the foreseeable future (decimal points fixed to 18, total supply is currently ~100,000,000 ETH, supply growth is currently ~13,000 and decreasing).
Additional context What I'm not sure though, is if this large rate is really needed and will ever be realistically used? And the impact on computation resources using this level of precision.
Maybe there's a lower precision that's tolerable? Maybe floating point precision is good enough since exchange rates are already ratios anyway?