status-desktop icon indicating copy to clipboard operation
status-desktop copied to clipboard

Check the router logic

Open saledjenic opened this issue 9 months ago • 0 comments

Within this issue we should go step by step through the router logic and confirm that it returns the appropriate routes for all different input values.

Some things to check/improve:

  1. the routing algorithm at the first step should find all potentially possible routes based on set parameters and how much each of them costs (which is candidates array in the current implementation)
  2. the second step should check if the cheapest route is selected as the best one (it should be like that in the current implementation)
  3. after selecting the cheapest route we should check if there are enough balances to pay everything needed for all routes, at the current implementation nativeBalance is compared to requiredNativeBalance per route, but if there need to be multiple routes (transactions) current code always use the current value, doesn't subtract amount needed for previous trasactions

saledjenic avatar May 08 '24 07:05 saledjenic