Open dib542 opened 6 months ago
In a discussion around the new Neutron App UI, it was discussed that we could complete this task by routing trade through Skip API (if they can provide this feature of using Duality and Astroport) rather than implementing our own splitting logic between Astroport and Duality routes.
If a token pair has a low amount of TVL liquidity in pool, there is a risk of high price-slippage when larger trades are executed.
To reduce the amount of price-slippage when swapping, we can pass a specific amount through Duality low-slippage pairs and the remainder through Astroport pairs. This depends on the actual pool sizes and prices of the pair in question at the point of time of trade execution, so an algorithm (likely a stepping algorithm) should be used to calculate the optimum split to put through each platform.
The implementation should be that if selected (by default?), the generated dex tx should go from an array of
placeLimitOrder
type Msgs, to an array ofplaceLimitOrder
and AstroPortswap
Msgs (the final solution is likely to be one of each type). On initial investigation it seems like the main issue will be determining thecontract_addr
of the Astroport token to swap.Astroport docs: