balancer-sor icon indicating copy to clipboard operation
balancer-sor copied to clipboard

Add route metadata to SwapInfo

Open danielmkm opened this issue 3 years ago • 1 comments

Tried this one a while back, but think its still relevant! :)

Add an expansion of the route data to the SwapInfo. With the expectation of many more boosted paths, the current model lacks metadata to nicely visualize the path, as seen in the screenshot of the current boosted pool routes on app.balancer.fi.

We extend the Swap interface to include the swapAmountOut, which provides all necessary data to build the SwapInfoRoute array at the same moment we format the swaps. We use this model to show the route visual on beets.fi (seen below).

The initial feedback from Tom was that the SwapInfo object is becoming bloated, which is a fair assessment, but I believe this data is valuable enough to justify it.

Screenshot 2022-09-13 at 08 25 59

Screenshot 2022-09-13 at 08 25 21

danielmkm avatar Sep 13 '22 07:09 danielmkm

This is interesting. We are facing a similar issue for another application case. I would discuss this in two stages: (a) whether we want the SOR output to have more complete information and (b) In case we do, what's the best way to do it.

sergioyuhjtman avatar Sep 14 '22 00:09 sergioyuhjtman

Closing as we focus on moving to b-sdk

johngrantuk avatar Jul 27 '23 13:07 johngrantuk