This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Support Multiple Vesting Schedules in Vesting Pallet #7101
Labels
J0-enhancement
An additional feature request.
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Right now we have a pretty strict limitation that only one vesting schedule is allowed per user.
This means if you already have a vesting schedule (say from participating early in Polkadot), that you cannot receive any more manifests with a vesting schedule.
You might imagine that the treasury would want to support vesting payouts at some point, and a single user would want to be the target of multiple vesting payouts.
The solution here should be pretty simple. We should allow a user to have a vector in storage with max length
MaxVestingSchedules
(configurable) to represent the vesting schedules for the user.A lock is placed on the account with the maximum balance across all vesting schedules. When a user updates their vesting, we go through the schedules and correctly update the lock, removing any completed schedules.
Since there is still some limit to number of vesting schedules, we should add an additional extrinsic which allows a user to "combine" vesting schedules.
This would combine the balance of two vesting schedules, and create one vesting schedule whose lock time is the greatest of the two.
This means that a user can always extend their vesting schedule to consolidate vesting balances, but also free up space to collect more vesting schedules.
The text was updated successfully, but these errors were encountered: