provenance-io / provenance

A distributed, proof of stake blockchain designed for the financial services industry.
https://provenance.io
Apache License 2.0
87 stars 37 forks source link

Vesting accounts: Add to existing account #945

Open SpicyLemon opened 2 years ago

SpicyLemon commented 2 years ago

Summary

Allow vesting coins and schedules to be added to an existing account.

Problem Definition

As the recipient of vesting funds, I want them added to my existing account so that I don't have to maintain as many accounts/keys/secrets.

Currently, a new account must be created as a vesting account in order to have vesting coins/schedule. This is problematic because:

  1. The account should be owned by the recipient, but must be created by the granter. This requires the recipient to create new keys and communicate the fresh address to the granter each time a grant is to be made.
  2. A recipient that has multiple vesting grants must manage the keys for all of them which can become cumbersome.

Proposal

Make an enhancement to our fork of Cosmos-SDK that will allow the addition of vesting coin/schedules to existing accounts. This should allow adding vesting coin/schedules to an account that doesn't yet have vesting coin/schedules. This should also allow adding extra vesting coin/schedules to an account that already has vesting coin/schedules. If an account already has vesting coin/schedules, the existing vesting coin/schedules should not be changed when adding the new coin/schedules.


For Admin Use

iramiller commented 2 months ago

We should consider using a hold module/encumbrance model for this.

SpicyLemon commented 1 month ago

The SDK has some changes coming related to vesting accounts. I think they're renaming them to "locked" accounts (or something like that). But that combined with the changes to the x/auth module, and creation of x/accounts should help us with this issue.