Item Type
Story
Description
We want to be able to reserve the funds for an asset rather than send them to some arbitrary account.
Additional Information
We currently have ways to "Reserve" an asset, but it does break the philosophy of XBI and isn't really anything to do with XBI.
There are traits InspectHold
& MutateHold
. These allow an asset to be treated much like ReservableCurrency
, but I'm aware that they do not respect ExistentialDeposit
. The other issue is that these traits are not actually implemented in assets
and basically don't do anything.
One option, which is rather nuclear, is to introduce some DTO in our pallet-assets::Extra
config to have the fields reserved
and anything else. This does tightly couple any user of XBI to this implementation.
The other option we do in t3rn::AccountManager
as a first-pass solution, is to basically just send the funds to a treasury and refund when we like via some ticketing system. This also cannot work for XBI since it couples parachains to use this very specific implementation.
We could in the meantime just send it to an account that the pallet owns, and pay it out, which we can do in the Queue PR. But this is a very feral implementation and is not for purpose.
Parity has introduced the true fix for it on this pr however this is very recent and we're still on an old version of substrate.
My personal proposition is to wait. And ensure we keep an eye on this PR and maybe retro fit it to a Newtype Trait, but still requires custom work on pallet-assets.
Acceptance Criteria
A
What are the points assigned to this item?
None
Is the issue ready?