Vesting
Last updated
Last updated
The Vesting ADO allows the vesting of tokens for one recipient which is fixed upon instantiation.
A new batch can be created using the CreateBatch
message which will create a batch with the funds that are sent along with the message. This message contains parameters that define the lockup period and vesting parameters. All time-related parameters are done using seconds.
Ownership of the ADO should be transferred after creating the vesting batch to the user who is vesting. For example, if party A wants to vest tokens for user B, they would create a custom batch with the vesting properties specified like lockup duration, release unit ect... (These cannot be changed by anyone once created). Then after the batch/batches have been created, they would transfer ownership of the contract to user B who can claim the tokens when the time comes.
Ado_type: vesting
Name | Type | Description | |
---|---|---|---|
Creates a new batch with the funds sent along with the message.
Only available to the contract owner or an operator of the contract.
The attached funds should be a single native fund.
Denom of attached funds should be the same as the one specified upon instantiation.
Each batch has an Id which starts at 1 and increments by 1 for each new batch.
There are two main withdrawal types:
Amount: Withdraw a flat amount from the vault/strategy.
Percentage: Withdraw a percentage of funds found in the vault/strategy.
Claim the number of batches specified starting from the beginning. If not specified then the max amount will be claimed.
Only available to the contract owner.
Claims tokens from all batches using a paginated approach. If up_to_time
is specified then it will only claim up to a specific time, otherwise it will claim to the most recent release.
Only available to the contract owner.
The rest of the execute messages can be found in the ADO Base section.
Queries the configuration of the contract.
Returns a config struct.
Queries batch information for the batch with the specified Id.
Queries multiple batches for their batch information with pagination.
Returns a Vec<BatchResponse>.
The rest of the query messages can be found in the ADO Base section.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
recipient
The recipient of all funds locked in this contract.
denom
String
The denom of the coin being vested.
kernel_address
String
Contract address of the kernel contract to be used for AMP messaging. Kernel contract address can be found in our deployed contracts.
owner
Option<String>
Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified.
lockup_duration
Option<Milliseconds>
A lockup period before vesting starts specified in milliseconds. Specifying None would mean no lock up period and funds start vesting right away.
release_unit
How often releases occur in seconds.
release_amount
Specifies how much is to be released after each release_unit
. If it is a percentage, it would be the percentage of the original amount.
number_of_claims
Option<u64>
The number of batches to claim. Defaults to the maximum amount if not specified.
batch_id
u64
The Id of the batch.
up_to_time
Option<u64>
Optional time to claim up to. The minimum between the current time and the specified time is taken. Specified as a timestamp in seconds.
limit
Option<u32>
The number of batches to claim from. Defaults to 10 and can be set to a maximum of 30.
recipient
The recipient of each batch.
denom
String
The denom of the coin being vested.
id
u64
The Id of the batch to query.
id
u64
The Id of the batch.
amount
Uint128
The amount of tokens in the batch.
amount_claimed
Uint128
The amount of tokens that have been already claimed.
amount_available_to_claim
Uint128
The amount of tokens available to claim right now.
number_of_available_claims
Uint128
The number of available claims now.
lockup_end
u64
When the lockup ends.
release_unit
u64
How often releases occur in seconds.
release_amount
Specifies how much is to be released after each release_unit
. If it is a percentage, it would be the percentage of the original amount.
last_claimed_release_time
u64
The time at which the last claim took place.
start_after
Option<u64>
Optional Id used for pagination. The fetched batches will start after the provided one here.
limit
Option<u32>
The number of batches to retrieve starting from the one specified above . Defaults to 10 and can be set to a maximum of 30.