Use wPHA or delegation NFT for governance voting

After the implementation of the StakePoolv2 feature, there has been a change in how delegations are stored in users' accounts. Previously, delegations were locked tokens, but now they are converted into wPHA and transferred to the StakePool in exchange for Delegation NFTs. As a consequence of this change, users are no longer able to use their delegations for direct voting on platforms such as subsquare.

In this page, we will guide you through the process of using Delegation NFT and wPHA in your account to participate in voting on Polkadot.js.

Why can Delegation NFT and wPHA be used for voting?

In reality, The item used for voting is not Delegation NFTs or wPHAs, but locked PHAs. When users use WrappedBalances to exchange between PHA and wPHA tokens, WrappedBalances serves as an on-chain ledger that records ownership information for all wPHA tokens on the chain. All locked PHA is counted in WrappedBalances, and the corresponding voting right is assigned to the respective owner.

In other words, WrappedBalances will provide a combined value of your Delegation NFT and wPHA holdings, and allowing you to utilize this value to participate in voting for PHA.

How to vote through Polkadot.js

Track my voting right

By utilizing on-chain queries, you can get the total value of your Delegation NFT and wPHA holdings. Within the Phala App, this information can be found easily.

The total value of your Delegation NFT and wPHA is indicated in the top left corner of the image as Delegation. In this photo, I can use 234793 tokens to participate in voting.

Token-to-vote ratio

Your vote casted through WrappedBalances equals to 0.1x voting balance. It has no lockup period.

Voting 200,000 PHA here is equivalent to 20,000 votes.

How to vote

  • Use Polkadot.js, go to the Extrinsics page
  • Find PhalaWrappedBalances. Select vote. This is the entrance for voting.
  • Please enter the number of votes you agree/disagree in the aye or nay column. Note that since we’re using the u128 format here, you need to add 12 zeros at the end of the input value. So you’ll need to input 5000000000000 to represent 5 votes.
  • Enter the Referendum id in the voteId: u32 (ReferendumIndex) column, and you can find it on the democracy page
  • Click Submit Transaction and sign the signature. Then the voting will be finished.

Due to some historical reasons, there is a possibility that even if you have enough Delegation or wPHA, you may still encounter the “VoteAmountLargerThanTotalStakes” error when making voting transactions. In this case, please add an extra 1PHA to each of the pools you have staked on (including StakePools and Vaults) to solve this issue.

How can I cancel my previous vote history and initiate a new vote?

You just need to initiate a new voting transaction, and the previous voting transaction will be directly replaced by the new one.

The voting is over. How can I unlock my voting rights?

  • Firstly, with the same page, select democracy.removeVote(index), enter the ended Referendum ID, remove your vote.
  • Secondly, go back to WrappedBalances and select WrappedBalances.unlock(voteId, maxIterations). Enter the Referendum ID and the number of voting tokens you want to unlock, submit the transaction to unlock your them.

Now your tokens have been unlocked.

  • If you don’t remember which Referendum you voted. Go to the Chain state page, choose phalaWrappedBalances.accountVoteMap(AccountId32, u32): Option<Null>. Use the specific address to check its voted Referendum.
  • If you don’t know how much tokens are used to vote in a Referendum. Go to the Chain state page, choose phalaWrappedBalances.voteAccountMap(u32, AccountId32): Option<(u128,u128)>. Enter the Referendum id and use the specific address to check its locked tokens.

In summary, the voting process using WrappedBalance becomes to be challenging due to the need to transfer tokens during staking, which is not a seamless operation. However, we are actively working on improving this process to make it more user-friendly. Our goal is to create a separate voting page that enables users to vote and unlock with just one click, thus streamlining the process and making it more accessible for all.

Edit this page on GitHub