substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Implement `Lockable` for Assets (for use in e.g. vesting or voting systems)

Open hbulgarini opened this issue 3 years ago • 3 comments

An interesting feature for chains using the assets pallet is the chance to vest those assets, similar to what is possible now with DOT and KSM on their respective relay chains. 

I can think of multiple use cases on Statemint/e for teams deploying their assets on these chains and extending their possibilities around their launch strategy.

The functionality can be implemented on the same assets pallet  or modify the vesting pallet to accept different assets ( or a complete new pallet ). Whatever it is makes the implementation simpler and safer.

CC: @joepetrowski @shawntabrizi

hbulgarini avatar May 18 '22 06:05 hbulgarini

Part of https://github.com/paritytech/polkadot-sdk/issues/327 and a highly requested feature for assets on Statemint.

joepetrowski avatar Nov 10 '22 08:11 joepetrowski

For clarity, does this refer to the LockableCurrency trait? https://docs.rs/frame-support/latest/frame_support/traits/trait.LockableCurrency.html

Or as the task to introduce a new trait as mentioned in https://github.com/paritytech/polkadot-sdk/issues/327 :

Introduce fungibles::Lockable/fungible::Lockable and implement for Balances and AssetsFreezer. Introduce LockableAssets derivative pallet and implement fungibles::Lock.

tonyalaribe avatar Nov 16 '22 16:11 tonyalaribe

AFAIU the goal is to introduce a new trait and then migrate pallets to it, eventually deprecating the Currency traits:

  • Swtich over trait requirements from Currency to fungible::* in pallets.

I'm not sure off the top of my head if fungible::Lockable should have the same API as LockableCurrency though. Can @gavofyork confirm?

joepetrowski avatar Nov 16 '22 16:11 joepetrowski