abeychain staking contract is deployed at address:
One node can participate as a validator to proposal new blocks with
depositfunction. To create your validator, you need to
abeycoin and register you validator public key. Delegators can bond their coin to the validator account and shares block reward by their portion. Validator can charge for additional
feerate from the delegators reward.
The feeRate calculation:
feeRate = fee / 10000
After deposit, the node becomes a validator candidate. Only if the deposit balance > 20000(abey), the validator can be selected as a candidate.
Validator can cancel a portion of the deposit from staking balance. With the
canceltransaction executed, the cancelled portion is locked in the contract for about 2 weeks. After the period, validator can withdraw the canceled coins.
Validator can deposit extra
abeytoken to the deposit contract by
Validator can withdraw the unlocked token after a locking period of 2 weeks. All the deposit balance can be retrived by
Validator can query deposit balance by
getDepositfunction. there are 3 states for the deposit:
- staked: token which validator bond to stake contract and may receive block reward
- locked: token which were canceld but are still locked in the deposit util 2 weeks.
- unlocked: valdator use withdraw token of unlocked state
uint256tuple of 3 items:(staked, locked, unlocked)
People who do not want to run a validator full node can deposit their token to a certern validator to gain staking reward.
If the holder's own deposit is less than 20000 abey, delegtor can not receive any reward as the validator would't be elected as a candidate.
Delegator can cancel a portion of the deposit from a certern validator holder. With the
undelegatetransaction, the cancelled portion is locked in the contract for about 2 weeks. After the period, delegator can withdraw the canceled token.
Delegator can withdraw the unlocked token from a validtor. All the delegation balance can be retrived by
getDelegatereturn the balance state of a delegator. The state of token balance is similar to
uint256tuple of 3 items: (staked, locked, unlocked)