Smart Contract Functions
Write Functions
Staking Functions
Stake: This call takes in the user's desired number of AZERO to stake, transfers them from the user's wallet to the
Vault
. It then mints the appropriate number of sA0 tokens to the user's wallet.
Unstaking Functions
Request Unlock: This takes the users's sA0 tokens and burns them, then sends the unlock request to the Validators. This request is made by the user when they would like to start the unstaking process. The user specifies how many of their sA0 they would like to submit for AZERO in return.
Delegate Withdraw Unbonded: This tells each Validator to claim its unbonded amount, after that amount is made available to the Validator post-cooldown period. This sends all of the AZERO claimed by Validators back to the
Vault
.Redeem: This method returns the user's available unstaked AZERO to their wallet from the Vault.
Redeem with Withdraw: This is a wrapper function that executes
delegateWithdrawUnbonded
andredeem
.
Community Functions
Compound: Anyone on the network can make a
compound
call. This sets off a command from theVault
that makes it all the way down to the participating Validators to claim then re-bond the claimed AZERO. This enables Ike 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.
Get Fee Percentage: Returns the current protocol Management Fee.
Get Incentive Percentage: This returns the incentive fee given to those who execute the
compound
function.Get Shares from AZERO: Returns the current value sA0 in terms of AZERO. This is constantly changing. For more information, see Redemption Ratio.
Get AZERO from Shares: Returns the current value AZERO in terms of sA0. 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