Skip to content

Staking

guo edited this page Jul 27, 2020 · 6 revisions

This wiki is still in progress.

Staking

This wiki is about the development details of staking. please refer to http://docs.iotex.io/docs/ioctl.html#stake-vote for how to use ioctl to stake.

Buckets

A bucket is a collection of IOTX used in stake. Any bucket has the following properties

1. ID (int >= 0, auto increased)
2. Owner (the owner of the bucket)
3. delegate name (whom the IOTX is staked to)
4. duration (in days, 0<=duration<=1050, how many days the bucket is staked for)
5. Auto-stake (On/Off, if the stake duration stay the same or not)

Bucket information can be easily found by using ioctl bc bucket $n.

A bucket has three possible status

1. Ongoing (the bucket is actively staked)
2. Unstaking (user has submitted unstake request after stake duration is over)
3. Ready to withdraw (3 days after unstaking, IOTX in the bucket can be withdrawn)

Also, a bucket is Burndrop eligible if it meets

Duration >= 91 days and Auto-stake is On

New Stake (create a bucket)

A bucket is created by submitting an action StakeCreate.

Edit Bucket

A bucket can be edited with the following actions

Change Delegate

Change whom the bucket is staked for. Delegate for a bucket can be changed anytime except "ready to withdraw" status).

Add Stake

Add new IOTX to the bucket. "Add Stake" for bucket with "Auto-Stake" is on.

Restake

Change duration and Auto-Stake status. Duration can be increased. Restake can be done anytime even "ready to withdraw".

Unstake

Request to unstake the IOTX from bucket. After 3 days, the bucket becomes "ready to withdraw.

Withdraw

Request to withdraw IOTX from a bucket. The bucket will be destroyed. Withdraw can be done after the bucket is unstaked for more than 3 days.

Reassign

Change the owner of the bucket to someone else. The current owner will lose the bucket. This can be done anytime except for "ready to withdraw".

Clone this wiki locally