raiden icon indicating copy to clipboard operation
raiden copied to clipboard

Update base rate for enabled swaps from uniswap each block

Open palango opened this issue 4 years ago • 1 comments

Sub-issue for https://github.com/raiden-network/raiden/issues/6506

Description

If token swaps are enabled, the node needs up-to-date information about swapping rates. Therefore it needs to update the base rates each time a new block is received.

Tasks

  • [ ] Implement efficient (if possible batched) request to fetch latest base rates
    • If possible design an interface that make using different oracles later easy
  • [ ] Only query the currently enables token pairs to lower load on the ethereum nodes.

palango avatar Sep 07 '20 09:09 palango

We could also fetch the rate during the mediation. This would vastly reduce the number of calls and should be still acceptable from a latency perspective.

karlb avatar Sep 10 '20 08:09 karlb