Contracts
StZETA
StZETA serves as the fundamental contract, functioning as a liquid staking pool. This contract handles deposits and withdrawals, mints and burns liquid tokens, delegates funds to node operators, applies fees, and distributes rewards.The StZETA contract introduces stZETA, an ERC20 token, which indicates an account's proportion of the total ZETA tokens within the Zearn system. Being a non-rebasable token, the quantity of tokens in the user's wallet remains unchanged. However, its value may fluctuate over time as the volume of ZETA tokens within the protocol isn't static. It's worth noting that stZETA will be incorporated into a range of DeFi applications across ZetaChain.
View Methods
symbol()
Provides the token's symbol, typically a condensed form of its name.
decimals()
Provides the number of decimals required to represent a token amount accurately.
totalSupply()
Provides the total number of tokens currently in circulation.
balanceOf()
Indicates the quantity of tokens held by the account
getTotalStakeAcrossAllValidators()
Provides the aggregate of delegated ZETA across all validators.
Returns:
getTotalPooledZETA()
Provides the summed total of pooled ZETA
Returns:
convertZETATostZETA()
Provides the ZETA value for any given stZETA amount input into the function.
Parameters:
Returns
Methods
transfer()
Transfers amount tokens from the account of the initiator to the to account.
NOTE
Requirements:
to
should not be assigned the zero address.the caller should maintain a minimum balance of
amount
.the contract ought to be active, not paused.
Parameters
Returns:
A boolean value that shows if the operation was successful.
allowance()
This is the number of tokens that the spender is permitted to spend on behalf of owner using transferFrom. It's initially set to zero.
NOTE
This value changes when approve
or transferFrom
is called.
Parameters
approve()
Establishes amount as the allocation for spender in relation to the caller's tokens.
NOTE
Requirements:
spender
cannot be the zero address.the contract must not be paused.
Parameters:
Returns:
A boolean value that shows if the operation was successful.
transferFrom()
Transfers amount tokens from the from to the to via the allowance process. This amount is subsequently reduced from the caller's allowance.
NOTE
Requirements:
from
andto
cannot be the zero addresses.from
must have a balance of at leastamount
.the caller must have allowance for
from
(sender)'s tokens of at leastamount
.the contract must not be paused.
Parameters:
Returns:
A boolean value that shows if the operation was successful.
increaseAllowance()
Increments the allowance provided to the spender by the caller by an addedValue, in a precise and atomic manner.
NOTE
Requirements:
spender
cannot be the the zero address.the contract must not be paused.
Parameters:
Returns:
A boolean value that shows if the operation was successful.
decreaseAllowance()
Reduces the allowance given to spender by the caller by subtractedValue in a single operation.
NOTE
Requirements:
spender
cannot be the the zero address.spender
must have allowance for the caller of at leastsubtractedValue
.the contract must not be paused.
Parameters:
Returns:
A boolean value that shows if the operation was successful.
submit()
Transfer ZETA to the stZETA contract, which then generates stZETA for the sender.
Parameters:
calculatePendingBufferedTokens()
Calculate the total amount stored in all the NFTs owned by stZETA contract
Returns:
NodeOperatorsRegistry
Coming soon
Last updated