Validator Staking
Introduction
The Staking ADO is smart contract that allows users to stake native tokens with the validator of their choice.
This ADO is not meant for general use meaning that it should not be open for the public (Have people other than the owner use it for staking). It is designed so the owner of the ADO has full control over the staking which is why most messages are restricted to the owner.
The staking message can still be called by any address. This is to allow the ADO owner to integrate this ADO with Andromeda Apps allowing the allocation of funds gained by the App to be routed to this ADO and staked.
Example
Let us assume a project is looking to start an NFT project having part of the project be that the users will get some funds over time:
This would be just one part of the benefits of buying the project's NFT.
Project is looking to launch an NFT collection.
The collection will be sold using one of the ADOs like our Marketplace ADO.
Using a splitter connection, the funds from the sale are distributed having part of the funds go to the Staking ADO and start staking automatically.
The rewards accrued from staking are then sent to another splitter that distributes the rewards back to the NFT buyers.
This gives a small idea of how you can use the Validator Staking ADO in your Andromeda Applications to achieve very usefull and cool use cases.
Ado-type: validator-staking
Version: 0.2.1-beta.1
InstantiateMsg
ExecuteMsg
Stake
Stakes the attached funds with the specified validator.
If the validator is not specified, then the
default_validator
specified at instantiation will be used.Make sure to attach one type of funds only.
Unstake
Unstakes the delegated tokens from the specified validator.
Only available to the contract owner.
If the validator is not specified, then the
default_validator
specified at instantiation will be used.The tokens will be released back to the ADO after the unbonding period has passed. You will need to call the WithdrawFunds message after that to get the tokens back into your wallet.
Claim
Claim the rewards accrued from staking for a specific validator.
Only available to the contract owner.
If the validator is not specified, then the
default_validator
specified at instantiation will be used.
WithdrawFunds
Withdraw unstaked tokens from the ADO.
Only available to the contract owner.
Make sure the unbonding period has passed before trying to withdraw funds.
UpdateDefaultValidator
Update the set default validator.
Only available to the contract owner.
Redelegate
Moves the specified amount of staked tokens from one validator to another.
Only available to the contract owner.
Base Executes
The rest of the execute messages can be found in the ADO Base section.
QueryMsg
StakedTokens
Queries the staked tokens with the specified validator.
If the validator is not specified, then the default_validator
specified at instantiation will be used.
FullDelegation
Returns the information of the staked tokens.
UnstakedTokens
Queries the tokens that are unstaked and provides the time they can be claimed (Unbonding period is over).
UnstakingTokens
Struct containing information of the unstaked tokens.
DefaultValidator
Queries the default validator address set at instantiation.
Returns the address as a string.
Base Queries
The rest of the query messages can be found in the ADO Base section.
Last updated