DNM: PoC for SwapAssetAdapter to use hold and release pattern#9657
DNM: PoC for SwapAssetAdapter to use hold and release pattern#9657athei wants to merge 1 commit intoat/tx_paymentfrom
SwapAssetAdapter to use hold and release pattern#9657Conversation
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
9e1281e to
c82ed29
Compare
|
Didn't review the implementation, but all tests are passing so we know it works! 👍 |
|
Yeah it works in general. It is more of a soft failure: Transactions might pre-charge an additional ed. But on parachains this is very cheap. So hopefully not an issue in practice. Talking about additional cents you need in your wallet to send a tx. |
|
The hold and release pattern didn't work out. We switched to a simpler model not requiring holds: #9780 |
We don't want to merge it yet. Just to show how it will work and that it passes all tests. Building on #9590
For accounts that only hold a sufficient asset but no native balance we need to get creative: We increase the pre dispatch fee by the ed. This is because even when increasing the
providersof an account, dusting will still happen when an account is below ed. Hence we need to make sure that in addition to the actual fee there is at least the ed inside the hold. Pallet's wont touch the ed as long as they useKeepAlivewhen transferring from the hold.