Staking on POX Network

The POLLUX network has three system resources:

  • Energy

  • Bandwidth

  • Voting right

How to stake to obtain system resources

Energy and bandwidth resources are acquired by the account owner through the process of staking. To understand how to complete the staking operation via the HTTP API, please refer to "wallet/freezebalancev2." If you prefer to utilize a contract for the stake operation, you can refer to the "Stake2.0 Solidity API" for guidance.

Within the Pollux network, resources are allocated through the staking mechanism. Staking POX not only results in obtaining bandwidth or energy resources but also grants voting rights, referred to as Pollux Power (PP). The amount of PP acquired through staking is equal to the amount staked. For instance, staking 1 POX yields 1 PP. The energy or bandwidth resources obtained through staking serve the purpose of paying transaction fees, while the acquired voting rights are utilized to vote for super representatives, leading to potential voting rewards.

Performing the unstaking operation will release the corresponding staked resources back to the account.

How to delegate resources

Certainly! After obtaining energy or bandwidth resources through staking, the account has the flexibility to delegate these resources to other addresses using the delegation operation. Furthermore, the account can reclaim the allocated resources through the cancel delegation operation. This process allows for efficient management and distribution of energy and bandwidth resources within the Pollux network. Please pay attention to the following situations when delegating resource:

  • Only energy and bandwidth can be delegated to other addresses, voting rights cannot be delegated

  • Only unused resources obtained by staking through Stake2.0 can be delegated to other addresses

  • Energy/Bandwidth can only be delegated to an activated external account address, not to a contract address

Certainly! The wallet/getcandelegatedmaxsize interface can be employed to query the available delegation share of a specific resource type in the account. When delegating resources, a timelock and lock_period can be utilized. If the time lock is set to true, the following conditions apply:

  • After completing the resource delegation, the delegation for the address can only be canceled after the specified locking period passed.

  • During the locking period, if the user performs the same type of resource delegation for the same address again, the lock time will be updated to the newly specified value.

If the time lock is not used, the delegation can be canceled immediately after the resource is delegated. These mechanisms provide flexibility and control over the delegation process based on the specified time lock conditions.

How to unstake POX

After completing the POX staking, you can unstake at any time. Following the unstaking process, a waiting period of 14 days is enforced before you can withdraw the unstaked POX into your account. This 14-day duration is governed by the No.70 parameter of the Pollux network, subject to voting through network governance proposals. For details on completing the unfreeze balance through the HTTP API, please refer to the unfreezebalancev2 documentation.

It's worth noting that staked POX can be partially unstaked multiple times. However, a maximum of 32 unstaking operations is allowed simultaneously. In practical terms, when a user initiates the first unstake operation, only 31 additional unstake operations can be initiated before the POX from the first unstaking becomes available for withdrawal to their account. The remaining counts of unfreeze operations can be queried through the getavailableunfreezecount interface.

Delegated POX cannot be unstaked. Along with losing the same amount of resource shares, the unstaking process will also result in the loss of an equivalent amount of PP (Pollux).

During the unstaking process, if there are unclaimed voting rewards, these rewards will be automatically withdrawn to the account. Additionally, if there is previously unstaked principal that has passed the lock-up period, the unstake operation will simultaneously withdraw the unstaked principal that has expired the lock-up period to the account. To inquire about the voting reward extracted in this transaction, use the gettransactioninfobyid API, and you can find the information in the withdraw_amount field for voting rewards and the withdraw_expire_amount field for the withdrawn amount of unstaked POX that has passed the lock-up period.

Pollux Power Reclaim

After unstaking the POX staked in the Stake2.0 stage, an equivalent amount of voting rights will be forfeited. The system will initially reclaim the dormant voting rights in the account. If the available PP is insufficient, it will proceed to reclaim the utilized PP. In scenarios where the user has voted for multiple super representatives, a proportionate number of votes will be withdrawn from each super representative, facilitating the recovery of the corresponding voting rights.

The number of votes withdrawn from the current super representative = total number of votes to be withdrawn  * (number of votes for the current super representative/total number of votes of this account)

Currently, the Pollux network employs the Stake2.0 staking mechanism, while the resources and votes obtained through Stake1.0 remain valid. The POX staked in Stake1.0 can still be withdrawn using the Stake1.0 API. However, it's important to note that unstaking the POX staked in Stake 1.0 will result in the revocation of all votes associated with the account.

How to cancel Unstaking

Stake2.0 introduces the feature of canceling all unstakes, allowing users to swiftly reinvest the assets for staking to obtain corresponding resources. This eliminates the need to wait for the unstaked funds to pass the lock-up period before withdrawing them to the account and staking again. To understand how to cancel all unstaking operations through the HTTP API, please refer to the cancelallunfreezev2 documentation.

When canceling unstakings, all funds still within the waiting period will be re-staked, and the resources obtained through re-staking will remain the same as before. It's important to note that unstakings that have exceeded the 14-day waiting period cannot be canceled. In such cases, this portion of the unstaked funds will be automatically withdrawn to the owner’s account.

Users have the option to query the canceled unstaked principal amount (cancel_unfreezeV2_amount) and the withdrawn principal amount that has expired the lock-up period (withdraw_expire_amount) through the gettransactioninfobyid interface. This functionality provides transparency and control over the cancellation and withdrawal process in the Stake2.0 mechanism.

API

Certainly! Here's the information organized in a table With the relevant interfaces of the stake model and their descriptions:

Last updated