State Transitions
The x/vesting
module allows for state transitions that create and update a clawback vesting account with CreateClawbackVestingAccount
or perform a clawback of unvested funds with Clawback
.
Create Clawback Vesting Account
A funder creates a new clawback vesting account defining the address to fund as well as the vesting/lockup schedules. Additionally, new grants can be added to existing clawback vesting accounts with the same message.
Funder submits a
MsgCreateClawbackVestingAccount
through one of the clients.Check if
the vesting account address is not blocked
there is at least one vesting or lockup schedule provided. If one of them is absent, default to instant vesting or unlock schedule.
lockup and vesting total amounts are equal
Create or update a clawback vesting account and send coins from the funder to the vesting account
if the clawback vesting account already exists and
--merge
is set to true, add a grant to the existing total vesting amount and update the vesting and lockup schedules.else create a new clawback vesting account
Clawback
The funding address is the only address that can perform the clawback.
Funder submits a
MsgClawback
through one of the clients.Check if
a destination address is given and default to funder address if not
the destination address is not blocked
the account exists and is a clawback vesting account
account funder is same as in msg
Transfer unvested tokens from the clawback vesting account to the destination address, update the lockup schedule and remove future vesting events.
Last updated