Smart Contract Functions

Write Functions

Staking Functions

  1. Stake: This call takes in the user's desired number of Gas Tokens to stake, transfers them from the user's wallet to the Vault. It then mints the appropriate number of sTokens to the user's wallet.

Unstaking Functions

  1. Request Unlock: This takes the users's sTokens and escrows them in the Vault. This request is made by the user when they would like to start the unstaking process. The user specifies how many of their sTokens they would like to submit for Gas Tokens in return.

  2. Cancel Unlock Request: This cancels a Request Unlock call, and can only be execute by the same user that made the respective Request Unlock call.

  3. Send Batch Unlock Requests: This takes all of the sTokens escrowed in the Vault and burns them. It then tells the Nomination Pools to initiate unbonding for a certain number of Gas Tokens with their Validators. The number of Gas Tokens requested of each Nomination Pool is calculated using the Constant Retargeting Algorithm. Anyone on the network can execute this call.

  4. Delegate Withdraw Unbonded: This tells each Nomination Pool to claim its unbonded amount, after that amount is made available to the Nomination Pool post-cooldown period. This sends all of the Gas Tokens claimed by Nomination Pools back to the Vault.

  5. Redeem: This method returns the user's available unstaked Gas Tokens to their wallet from the Vault.

  6. Redeem with Withdraw: This is a wrapper function that executes delegateWithdrawUnbonded and redeem.

Community Functions

  1. Compound: Anyone on the network can make a compound call. This sets off a command from the Vault that makes it all the way down to the participating Validators to claim then re-bond the claimed Gas Tokens. This enables Kintsu to benefit from compounding yield rewards, and can happen at most once per Era. For more information on this, see Community Actions.

Read-only Functions

Here is a non-exhausted list of commonly used functions.

  1. Get Fee Percentage: Returns the current protocol Management Fee.

  2. Get Incentive Percentage: This returns the incentive fee given to those who execute the compound function.

  3. Get Shares from AZERO: Returns the current value sAZERO in terms of AZERO. This is constantly changing. For more information, see Redemption Ratio.

  4. Get AZERO from Shares: Returns the current value AZERO in terms of sAZERO. This is constantly changing. For more information, see Redemption Ratio.

In addition, the Vault contract includes a number of basic getter methods for various values. For more information on these, see the contrat's interface on our Github.

Last updated

Logo