osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

Change `EstimateSwap` to not require assets

Open mattverse opened this issue 3 years ago • 0 comments

Background

Current EstimateSwap queries, namely EstimateSwapExactAmountIn and EstimateSwapExactAmountOut and the EstimateSwap API in the bindings query does not only estimate swaps but includes the actual process of swapping to calculate and estimate. IMO, an API for estimating should not include balance check for the account trying to do the query. Take the gas estimation query in the Cosmos SDK for example, it does not require the sender to have the designated amount of fee and balance as well.

Suggested Design

I suggest that we move towards supporting the EstimateSwap API so that swaps can be estimated without performing the actual performance of swaps. This can be possibly done by separating out some of the logic within MultihopSwapExactAmountOut and MultihopSwapExactAmountIn

mattverse avatar Aug 09 '22 06:08 mattverse