-
Notifications
You must be signed in to change notification settings - Fork 4
About query pool swap rate #1
Copy link
Copy link
Open
Description
It looks like a query interface (view function) of contract that can return multiple pool states is neccessary for your solution.
And although there is a get_return view function in contract to estimate swap out amount according to swap in amount, I guess it is not what you need, cause you can not know the exactly amount of input in advance.
So I am considering to add a view function that can receive multiple pool id as a vector and return each liquidity amounts of each pool. Besides that, pool fee is more static and can be retrieved in advance from ref-finance backend data service.
Then, amountA, amountB and fee of each pool are all in your hand, the solution would go smoothly, wouldn't it? Is there anything else needed for this solution?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels