status-im / open-bounty

Enable communities to distribute funds to push their cause forward.
https://openbounty.status.im/
GNU Affero General Public License v3.0
118 stars 36 forks source link

Reduce amount of requests sent to FIAT value providers #434

Closed martinklepsch closed 6 years ago

martinklepsch commented 6 years ago

In commiteth.util.crypto-fiat-value we define a bunch of utility functions to retrieve the fiat value of various cryptocurrencies. As part of commiteth.scheduler/update-balances these functions are called for every bounty every 10 minutes.

This results in a lot of requests to our fiat value provider (coinmarketcap usually) causing them to shut us off with 429 Too Many Requests.

We should implement a mechanism to cache our fiat value provider's response for a limited amount of time and only refresh this data if it's too old.