Closed jsidorenko closed 1 year ago
We have implemented & deployed this since beginning for Acala so I have a few questions here to make sure you have considered them.
- How do you benchmark this? How does this effect the base tx weight? How do you ensure the weight is correctly consumed for tx that required conversion vs the one does not require conversion?
This needs to be addressed.
- How do you ensure someone doesn't accidentally spend all the funds to perform a swap on a pool with no liquidity?
We don't, this is something that wallets and UIs can (and should) handle.
- How do you handle weight refund?
Look at the PR.
- Would you handle multi path swap? (because the direct path is not available or low on liquidity or unbalanced)
On Asset Hub we won't need to since everything can only pair with DOT, but this would be a nice addition (and should at least be documented in the README).
bot merge
Allows to pay for the tx in any assets by swapping it into the native, given the liquidity pool exists
cumulus companion: https://github.com/paritytech/cumulus/pull/2148