raiden
raiden copied to clipboard
Update base rate for enabled swaps from uniswap each block
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.
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.