---
# System prepended metadata

title: Phala Assembly Guidance

---

# Phala Assembly Guidance

## Participate in Democracy
The public referenda chamber is one of the three bodies of on-chain governance as it's instantiated in Phala and Khala. The other two bodies are the council and the technical committee.

Public referenda can be proposed and voted on by any token holder in the system as long as they provide a bond. After a proposal is made, others can agree with it by seconding it and putting up tokens equal to the original bond. Every launch period, the most seconded proposal will be moved to the public referenda table where it can be voted upon. Voters who are willing to lock up their tokens for a greater duration of time can do so and get their vote amplified. For more details on the governance system please see [here]()*需要补充议会系统介绍的wiki链接.*

This guide will instruct token holders how to propose and vote on public referenda using the Democracy module as it's implemented in Khala.

### Important Parameters
The important parameters to be aware of when voting using the Democracy module are as follow:

**Launch Period** - How often new public referenda are launched.

**Voting Period** - How often votes for referenda are tallied.

**Emergency Voting Period** - The minimum voting period for a fast-tracked emergency referendum.

**Minimum Deposit** - The minimum amount to be used as a deposit for a public referendum proposal.

**Enactment Period** - The minimum period for locking funds and the period between a proposal being approved and enacted.

**Cooloff Period** - The period in blocks where a proposal may not be re-submitted after being vetoed.

### Proposing an Action
Proposing an action to be taken requires you to bond some tokens. In order to ensure you have enough tokens to make the minimum deposit you can check the parameter in the chain state. The bonded tokens will only be released once the proposal is tabled (that is, brought to a vote); there is no way for the user to "revoke" their proposal and get the bond back before it has become a referendum. Since it is essentially impossible to predict definitely when a proposal may become a referendum (if ever), this means that any tokens bonded will be locked for an indeterminate amount of time.

> Proposals cannot be revoked by the proposer, even if they never turn into a referendum. It is important to realize that there is no guarantee that PHA you use for proposing or seconding a proposal will be returned to that account in any given timeframe.

On Phala Apps you can use the "Democracy" tab to make a new proposal. In order to submit a proposal, you will need to submit what's called the preimage hash. The preimage hash is simply the hash of the proposal to be enacted. The easiest way to get the preimage hash is by clicking on the "Submit preimage" button and configuring the action that you are proposing.

For example, if you wanted to propose that the account "Dave" would have a balance of 10 tokens your proposal may look something like the below image. The preimage hash would be `0xa50af1fadfca818feea213762d14cd198404d5496bca691294ec724be9d2a4c0`. You can copy this preimage hash and save it for the next step. There is no need to click Submit Preimage at this point, though you could. We'll go over that in the next section.

![](https://i.imgur.com/q0yToiN.png)


Now you will click on the "Submit proposal" button and enter the preimage hash in the input titled "preimage hash" and at least the minimum deposit into the "locked balance" field. Click on the orange "Submit proposal" button and confirm the transaction. You should now see your proposal appear in the "proposals" column on the page.

![](https://i.imgur.com/7dyXJNV.png)

Now your proposal is visible by anyone who accesses the chain and others can second it or submit a preimage. However, it's hard to tell what exactly this proposal does since it shows the hash of the action. Other holders will not be able to make a judgement for whether they second it or not until someone submits the actual preimage for this proposal. In the next step you will submit the preimage.

![](https://i.imgur.com/xNo5ffu.png)


### Submitting a Preimage
The act of making a proposal is split from submitting the preimage for the proposal since the storage cost of submitting a large preimage could be pretty expensive. Allowing for the preimage submission to come as a separate transaction means that another account could submit the preimage for you if you don't have the funds to do so. It also means that you don't have to pay so many funds right away as you can prove the preimage hash out-of-band.

However, at some point before the proposal passes you will need to submit the preimage or else the proposal cannot be enacted. The guide will now show you how to do this.

Click on the orange "Submit preimage" button and configure it to be the same as what you did before to acquire the preimage hash. This time, instead of copying the hash to another tab, you will follow through and click "Submit preimage" and confirm the transaction.

![](https://i.imgur.com/BC8B2QX.png)

Once the transaction is included you should see the UI update with the information for your already submitted proposal.

![](https://i.imgur.com/U6ky4KB.png)

### Seconding a Proposal
Seconding a proposal means that you are agreeing with the proposal and backing it with an equal amount of deposit as was originally locked. The bonded tokens will be released once the proposal is tabled (that is, brought to a vote), just like the original proposer's bond. By seconding a proposal you will move it higher up the rank of proposals. The most seconded proposal — in value, not number of supporters — will be brought to a referendum every launch period.

It is important to note that there is no way to stop or cancel seconding a proposal once it has been done. Therefore, the PHA that was seconded will be reserved until the proposal is tabled as a referendum. This is an indeterminate amount of time, since there is no guarantee that a proposal will become a referendum for a given period, as other proposals may be proposed and tabled before it.

Note that it is possible for a single account to second a proposal multiple times. This is by design; it is the value, not the number of seconds per se, that counts in terms of weighting. If there were a limit of one second per account, it would be trivial for a user with, for example, 1000 PHA to create ten accounts with 100 PHA instead of a single account with 1000 PHA. Thus, no restrictions are made on the number of times a single account can second a proposal.

To second a proposal, navigate to the proposal you want to second and click on the "Second" button.

![](https://i.imgur.com/rStWnl9.png)

You will be prompted with the full details of the proposal (if the preimage has been submitted!) and can then broadcast the transaction by clicking the orange "Second" button.

![](https://i.imgur.com/zM0g9Cl.png)

Once successful you will see your second appear in the dropdown in the proposal details.

![](https://i.imgur.com/9Z0n2Iq.png)

### Voting on a Proposal
At the end of each launch period, the most seconded proposal will move to referendum. During this time you can cast a vote for or against the proposal. You may also lock up your tokens for a greater length of time to weigh your vote more strongly. During the time your tokens are locked, you are unable to transfer them, however they can still be used for further votes. Locks are layered on top of each other, so **7-days lock** will become a total **14-days lock** if you vote again.

To vote on a referendum, navigate to the ["Democracy" tab of Khala](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts). Any active referendum will show in the "referenda" column. Click the blue button "Vote" to cast a vote for the referendum.

If you would like to cast your vote for the proposal select the "Aye, I approve" option. If you would like to cast your vote against the proposal in referendum you will select "Nay, I do not approve" option.

![](https://i.imgur.com/ttWLZDV.png)


The second option is to select your conviction for this vote. The longer you are willing to lock your tokens, the stronger your vote will be weighted. The timeline for the conviction starts after the voting period ends; tokens used for voting will always be locked until the end of the voting period, no matter what conviction you vote with. Unwillingness to lock your tokens means that your vote only counts for 10% of the tokens that you hold, while the maximum lock up of 256 days means you can make your vote count for 600% of the tokens that you hold.

When you are comfortable with the decision you have made, click the orange "Vote" button to submit your transaction and wait for it to be included in a block.

![](https://i.imgur.com/YoYmjJU.png)


### Unlocking Locked Tokens
Like [vesting]()【议会系统wiki对应链接】, the tokens that are locked in democracy are unlocked lazily. This means that you, the user, must explicitly call an unlock extrinsic to make your funds available again after the lock expires. Unbonding is another term you hear a lot in Phala, it means withdrawing your PHA that was used in staking. To know more about it, please see [here]()【议会系统wiki对应链接】.

You can do this from the "Accounts" page in [Khala](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts), unless you use Ledger. First check that your account has a "democracy" lock by opening the details on your balance. In the example below the account has 9 PHA locked in democracy.

![](https://i.imgur.com/Sb8LtlW.png)


Now you can click the menu button on Apps and find the option that says "Clear expired democracy locks". After selecting this option you may confirm the transaction and your locks will be cleared when successful.

![](https://i.imgur.com/VF8MPrA.png)



### Delegate a Vote
If you are too busy to keep up and vote on upcoming referenda, there is an option to delegate your vote to another account whose opinion you trust. When you delegate to another account, that account gets the added voting power of your tokens along with the conviction that you set. The conviction for delegation works just like the conviction for regular voting, except your tokens may be locked longer than they would normally since locking resets when you undelegate your vote.

The account that is being delegated to does not make any special action once the delegation is in place. They can continue to vote on referenda how they see fit. The difference is now when the Democracy system tallies votes, the delegated tokens now are added to whatever vote the delegatee has made.

You can delegate your vote to another account and even attach a "Conviction" to the delegation. Navigate to the "Extrinsics" tab on Phala Apps and select the options "democracy" and "delegate". This means you are accessing the democracy pallet and choosing the delegate transaction type to send. Your delegation will count toward whatever the account you delegated for votes on until you explicitly undelegate your vote.

In the first input select the account you want to delegate to and in the second input select the amount of your conviction. Remember, higher convictions means that your vote will be locked longer. So choose wisely!

![](https://i.imgur.com/FGIBucm.png)

After you send the delegate transaction, you can verify it went through by navigating to the "Chain State" tab and selecting the "democracy" and "Voting" options. You will see an output similar to below, showing the addresses to which you have delegated your voting power.

![](https://i.imgur.com/AewU0G1.png)

### Undelegate a Vote
You may decide at some point in the future to remove your delegation to a target account. In this case, your tokens will be locked for the maximum amount of time in accordance with the conviction you set at the beginning of the delegation. For example, if you chose "2x" delegation for 16 days lock up time, your tokens will be locked for 16 days after sending the undelegate transaction. Once your vote has been undelegated, you are in control of making votes with it once again. You can start to vote directly, or chose a different account to act as your delegate.

The `undelegate` transaction must be sent from the account that you wish to clear of its delegation. For example, if Alice has delegated her tokens to Bob, Alice would need to be the one to call the `undelegate` transaction to clear her delegation.

The easiest way to do this is from the "Extrinsics" tab of Polkadot Apps. Select the "democracy" pallet and the "undelegate" transaction type. Ensure that you are sending the transaction from the account you want to clear of delegations. Click "Submit transaction" and confirm.

![](https://i.imgur.com/458OF2z.png)


### Voting with a Governance Proxy
Making a vote on behalf of a stash requires a "proxy" transaction from the Proxy pallet. When you choose this transaction from the "Extrinsics" tab, it will let you select "vote" from the Democracy pallet, and you will specify the index of the referendum that is being voted, the judgement (i.e. "Aye" for approval or "Nay" for rejection), and the conviction, just like a normal vote.

For more material on adding and removing Governance proxies, as well as other types, please see the [Proxy page]()【议会系统wiki链接】.

### Interpreting On-Chain Voting Data
Consider the following example showcasing how votes would be displayed on a block explorer.

> Nay 0.1x => 0
> Nay 1x => 1
> Nay 2x => 2
> Nay 3x => 3
> Nay 4x => 4
> Nay 5x => 5
> Nay 6x => 6
> Aye 0.1x => 128
> Aye 1x => 129
> Aye 2x => 130
> Aye 3x => 131
> Aye 4x => 132
> Aye 5x => 133
> Aye 6x => 134

At first glance, it may be difficult to interpret what you voted on. We need to take a step back and consider the "voting data" at the binary level.

The vote is stored as a byte using a bitfield data structure and displayed on the block explorer as a decimal integer. The bitfield stores both the conviction and aye/nay boolean, where the boolean is represented using the MSB of the byte. This would mean that the grouping of the 7 remaining bits is used to store the conviction.


## Join the Council
The council is an elected body of on-chain accounts that are intended to represent the passive stakeholders of Phala and/or Khala. The council has two major tasks in governance: proposing referenda and vetoing dangerous or malicious referenda. For more information on the council, see the governance page. This guide will walk you through entering your candidacy to the council.

### Submit Candidacy
Submitting your candidacy for the council requires a small bond of PHA / K-PHA. Unless your candidacy wins, the bond will be forfeited. You can receive your bond back if you manually renounce your candidacy before losing. Runners-up are selected after every round and are reserved members in case one of the winners gets forcefully removed.

>Currently the bond for submitting a council candidacy on Phala/Khala is 10 PHA/K-PHA.

It is a good idea to announce your council intention before submitting your candidacy so that your supporters will know when they can start to vote for you. You can also vote for yourself in case no one else does.

Go to [Khala Dashboard](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts) and navigate to the "Council" tab. Click the button on the right that says "Submit Candidacy."

![](https://i.imgur.com/H6UFk1Z.png)


After making the transaction, you will see your account appear underneath the row "Candidates."

![](https://i.imgur.com/wEBQitI.png)


It is a good idea now to lead by example and give yourself a vote.

### Voting on Candidates
Next to the button to submit candidacy is another button titled "Vote." You will click this button to make a vote for yourself (optional).

![](https://i.imgur.com/3VT6sK2.png)


The council uses [Phragmén]()【议会系统对应wiki链接】 approval voting, which is also used in the validator elections. This means that you can choose up to 5 distinct candidates to vote for and your stake will equalize between them. For this guide, choose to approve your own candidacy by clicking on the switch next to your account and changing it to say "Aye."

![](https://i.imgur.com/mBT7jb1.png)


### Winning
If you are one of the lucky ones to win a council election you will see your account move underneath the row "Members".

![](https://i.imgur.com/Wp2Zxqn.png)


Now you are able to participate on the council by making motions or voting proposals. To join in on the active discussions, join the [Phala Direction channel]()【工具链接】.

## Voting for Councillors
The council is an elected body of on-chain accounts that are intended to represent the passive stakeholders of Phala and/or Khala. The council has two major tasks in governance: proposing referenda and vetoing dangerous or malicious referenda. For more information on the council, see the [Governance page]()【议会系统wiki对应链接】. This guide will walk you through voting for councillors in the elections.

### Voting for Councillors
Voting for councillors requires you to lock 5 PHA on Phala or **5** K-PHA on Khala for the duration of your vote.

>NOTE: Voting and staking locks **can overlap** A user can use staked funds to vote for Councillors and/or use those funds in referenda). A user is only prohibited from transferring these funds to another account.

>Warning: If your balance is vesting, you cannot use unvested tokens for this lock. You will have to wait until you have at least that many **free** tokens to vote.

Like the validator elections, you can approve up to **5** different councillors and your vote will be equalized among the chosen group. Unlike validator elections, there is no unbonding period for your reserved tokens. Once you remove your vote, your tokens will be liquid again.

>Warning: It is your responsibility not to put your entire balance into the reserved value when you make a vote for councillors. It's best to keep at least enough PHA/K-PHA to pay for transaction fees.

Go to the [Khala Dashboard](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts) and click on the "Council" tab. On the right side of the window there are two blue buttons, click on the one that says "Vote."

Since the council uses approval voting, when you vote you signal which of the candidates you approve of and your voted tokens will be equalized among the selected candidates. Select up to **5** council candidates by moving the slider to "Aye" for each one that you want to be elected. When you've made the proper configuration submit your transaction.

You should see your vote appear in the interface immediately after your transaction is included.

### Removing your Vote
In order to get your reserved tokens back, you will need to remove your vote. Only remove your vote when you're done participating in elections and you no longer want your reserved tokens to count for the councillors that you approve.

Go to the "Governance" > "Council" tab on the Polkadot-JS Apps Dashboard.

Under the "Overview" tab, click on "Vote".issue the “unvote all” option.

![](https://i.imgur.com/Uln8z8p.png)


When the transaction is included in a block you should have your reserved tokens made liquid again and your vote will no longer be counting for any councillors in the elections starting in the next term.



---
## Phala 民主模块

公投议院是链上治理的三个机构之一，在 Phala 和 Khala 中都是如此。另外两个机构是[理事会和技术委员会]()【待补充】。

公投（Public Referenda ）可以由系统中的任何代币持有人提出和投票，只要他们绑定（代币）。在一个议案被提出后，其他人可以通过 “附议（second）“ 并拿出和原绑定金额相同的代币来赞成该议案。在每个提案启动阶段，附议最多的提案都会被移交到公投上进行投票表决。选民如果愿意将代币锁上更长的时间，也可以这样做，从而加大他们的投票权重。有关治理机制的更多详细信息，请参阅[此处]()【wiki链接】。
本指南将指导代币持有人如何使用 Khala 上的民主模块（Democracry Module），就公投进行提案和投票。

### 重要参数

使用民主模块投票时需要注意的重要参数如下：

- 启动期：多久进行启动一次新公投。
- 投票期：多久进行一次全民投票。
- 紧急投票期：针对一个需要快速跟进的紧急公投的最短投票期。
- 最低存款额：公投议案保证金的最低金额。
- 执行期：锁定资金的最短期限，和议案从被批准到颁布之间的时间。
- 冷却期：提案被否决后不能重新提交的时间。

### 提交提案

提出议案首先需要你绑定一些代币。为了确保你有足够的代币进行最小的存款，你可以检查链状态下的参数。绑定的代币只有在提案提交（即进行投票）后才会释放；在公投之前，用户无法“撤销”提案并取回保证金。由于无法准确预测提案何时会被全民公投（假如有），这意味着任何绑定的代币的锁定期都是未知的。

>提案人不能撤销提案，即使这些提案永远不会变成公投。重要的是要注意，用于提议或附议提案的 PHA 不会在任何确定的时间范围内进行返还。

在 Khala 网络上，您可以使用 “民主（Democracy）” 这一栏来提出新的提案。为了提交提案，你需要提交所谓的原像哈希（preimage hash）。原像哈希是要发布的提案的哈希值。获取原像哈希的最简单方法是单击 “Submit preimage” 按钮并配置您提案建议的操作。

例如，如果你想提议帐户“ALICE”的余额为 10 个代币，那么您的提案可能类似于下图所示。原象哈希`0xd1ae46565118fc347a7c7a67dc68fb2fdeec6d77bc6ef4ae9cd9d4d964e0470c`你可以复制此原像哈希并将其保存到下一步。此时不需要单击 Submit Preimage，尽管可以这样做。我们将在下一节讨论这个问题。

![](https://i.imgur.com/dbwqufA.png)


现在，您将单击“Submit Proposal”按钮，在名为“preimage hash”的输入中输入原像哈希，并在“locked balance”字段中输入最低存款额。点击橙色的“Submit proposal”按钮并确认交易。现在你应该会看到你的提议出现在页面的“议案”列中。

![](https://i.imgur.com/ZTEeE2a.png)


现在，任何访问该链的人都可以看到你的提案，其他人可以对其进行附议或提交 preimage。然而，很难说这个提案到底做了什么，因为它显示的是提案的哈希。其他持有者将无法判断他们是否支持它，直到有人提交了这项提案的实际 preimage。在下一步中，你将提交 preimage。

![](https://i.imgur.com/A1hDYms.png)


### 提交 Preimage

因为提交一个大的 preimage 的存储成本可能相当昂贵，所以提出一个提案的过程与提交该提案的 preimage 是分开的。preimage 作为一个单独的交易处理意味着如果您没有足够的资金，另一个账户可以为您提交 preimage，这也意味着您不必马上支付超预算的资金，因为你有 preimage hash 证明。

然而，在提案通过之前，您需要提交 preimage，否则提案无法实施。我们现在将向你演示如何执行此操作。

单击橙色的 “submit preimage” 按钮并将其配置为与之前获取 preimage hash 一样的操作。这一次，您不需要将哈希复制到另一个选项卡，而是继续执行并单击 “submit preimage” 并确认交易。

![](https://i.imgur.com/Ne3a3PA.png)

一旦交易完成，用户界面就会更新您已经提交的提案信息。

![](https://i.imgur.com/ENyAfVO.png)

### 附议

附议意味着您同意该提案，并以与最初锁定的相同金额的押金作为保障。通过附议，您会把它提升到比较靠前的位置。最受支持的提案，按照价值而非支持者数量统计，将成为公投提案，在每个启动期进行投票。
要支持某一个提案，请导航到要进行支持的提案，然后单击“Second”按钮。

![](https://i.imgur.com/0ifVLmd.png)


系统将提示您议案的完整详细信息（如果 preimage 已提交！）然后通过点击橙色的“Second”按钮来广播交易。

![](https://i.imgur.com/zCUWaqL.png)

一旦成功，您将看到您的赞成票出现在议案详细信息的下拉列表中。

![](https://i.imgur.com/N8P4ygr.png)



### 提案公投

在每个启动期结束时，支持率最高的提案将转为公投提案。在此期间，您可以投赞成票或反对票。也可以把代币锁上更长的时间，来增加投票权重。在代币锁定期间，代币虽然无法转移，但是仍可以用于进一步的投票。代币的锁定期是层层叠加的（一个周期为7天），也就是说，完成投票后再次投票，锁定期将一共是14天。

要对公投提案进行投票，请导航到 [Khala](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts) 的“民主”栏。任何积极的公投都会在“referenda（公投）”一栏中显示出来。点击橙色按钮“投票”，为公投投票。

![](https://i.imgur.com/OREAQq6.png)

如果您想对提案投赞成票，请选择“Aye, I approve”选项。如果想投反对票，请选择“Nay, I do not approve”选项。

第二个选项是为这次投票选择您的 Conviction（意愿值）。锁定代币的意愿时间越长，投票的权重就越大。不愿意锁定代币意味着您的投票权重仅占您所持代币的 10%，而 256 天的最大锁定时间意味着您的投票权重是所持代币的 600%。

若赞成提案，单击橙色的“Vote（投票）”按钮提交交易，并等待它被区块打包。

![](https://i.imgur.com/hoYqBmf.png)


### 代币解锁

与归属权一样，锁定在 democracy 中的代币将惰性释放。这意味着用户必须调用 Extrinsics 函数来解锁，以确保资金在锁定到期后可再次使用。 解绑（Unbonding）是在 Phala 中经常听到的另一个术语，意思是回收用户在 staking 中使用的 PHA。了解更多信息，请参阅[此处]()【待定】。

用户可以从 Khala 应用程序中的“帐户（Account）”页面执行此操作，除非使用 Ledger（见下文）。首先打开账号余额详细信息，检查账户是否有“democracy”资金。在下面的例子中，账户有 9 PHA 锁定 democracy 在中。

![](https://i.imgur.com/rlECajc.png)


单击“Clear expired democracy locks（清除过期的民主锁）”，确认交易，交易成功后锁定的代币将解锁。
![](https://i.imgur.com/9g8gJ5o.png)


### 委托投票

如果因为太忙而没有时间继续投票，可以选择将您的投票权委托给信任的账户。当您委托后，该帐户将获得您代币的附加投票权以及您设置的投票意愿。授权投票意愿的工作原理与常规投票的意愿相同，只是您的代币锁定时间可能比正常情况下更长，因为取消委托投票时锁定会重置。

一旦委托成功，被委托的账户不会执行任何特殊操作。他们可以继续就他们认为合适的公投进行投票。不同的是，当民主制度计票时，无论被授权人投了什么票，都会附加上被委托的代币。

您可以把您的投票权委托给另一个账户，甚至可以给这个授权附加一个“Conviction（意愿值）”。导航到 Khala 上的“Extrinsics”选项卡，然后选择“Democracy （民主）”和“Delegate（委托）”选项。这意味着您正在访问民主模块并选择要发送的委托交易类型。您的授权将计入您委托的任何账户，直到您取消您的投票。

在第一个输入框中，选择您要委托的账户，在第二个输入框中选择您的意愿值。记住，更高的意愿值意味着您代币将被锁定更长的时间，所以要明智地选择！

![](https://i.imgur.com/dkvQaXx.png)


发送委托交易后，您可以通过导航到“Chain State”选项卡并选择“Democracy（民主）”和“Voting（投票）”选项来验证它是否通过。您将看到类似于下面的输出框，显示您已将投票权委托给某地址。

![](https://i.imgur.com/kq7JGks.png)


### 取消委托投票

您可能会在将来的某个时候决定取消对目标账户的委托。在这种情况下，您的代币将按授权时设定的意愿值的进行锁定。例如，如果你选择了“2x”的意愿值，那您的代币将在发送取消授权交易后锁定16天。一旦您的投票被取消授权，您就可以再次进行投票，既可以直接投票，也可以选择账户进行委托。

Undelegate（取消授权）交易必须从您希望清除其委托权限的账户发送。如果 Alice 授权给了另外一个用户，那 Alice 就需要调用 undelegate 来取消她的委托。

最简单的方法是从 Khala 的“Extrinsics”选项卡中进行操作。选择“Democracy”模块和“Undelegate”交易类型。确保交易是从您想要清除授权的账户发出的。点击“Submit Transaction（提交交易）”并确认。

![](https://i.imgur.com/gVZT1R0.png)


### 通过代理投票

代表 stash 账户进行投票需要代理模块中的“代理”交易。当你从“Extrinsics”选项卡中选择此交易时，它将允许您从“Democracy（民主）”模块中选择“Vote（投票）”，并且您将指定正在投票的公投的索引、判决（即“Aye”表示赞成或“Nay”表示拒绝）和意愿，就像普通投票一样。


### 链上数据说明

以下示例展示了区块浏览器是如何显示投票结果的。

> Nay 0.1x => 0
> Nay 1x => 1
> Nay 2x => 2
> Nay 3x => 3
> Nay 4x => 4
> Nay 5x => 5
> Nay 6x => 6
> Aye 0.1x => 128
> Aye 1x => 129
> Aye 2x => 130
> Aye 3x => 131
> Aye 4x => 132
> Aye 5x => 133
> Aye 6x => 134

乍一看，可能这是很难解释的投票内容，我们需要在二进制维度上解读“投票数据”。

投票是通过位域数据结构以一个字节的形式存储，并以十进制整数显示在区块浏览器上。位域存储了信念值和 aye/nay 布尔值，其中布尔值使用字节的 MSB 表示。这意味着剩余 7 位的分组用于存储结果判定信念值。

## 加入理事会议会

理事会是一个选举机构，代表 Phala 和/或 Khala 的被动利益相关者。理事会在治理方面有两个主要任务：提出公投和否决危险或恶意的公投。有关理事会的更多信息，请参阅[治理页面]()【补充wiki链接】。本指南将向您介绍如何获得理事会候选资格。

### 提交候选人
提交理事会候选人需要少量的 PHA/K-PHA 保证金。除非您的候选人获胜，否则保证金将被没收。如果您在竞选失败前手动操作放弃，可以收回保证金。每轮之后还将选出亚军作为保留成员，以防其中一名获胜者被强行移除。

>目前在 Phala/Khala 上申请理事会候选人的保证金是 10 PHA/K-PHA。

在提交前宣布您的理事会主张会是一个好主意，这样您的支持者就会知道他们何时可以开始投票给您。如果没有其他人投票，您也可以为自己投票。

转到 [Khala Dashboard](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts) 并导航到“Council”选项卡。单击右侧显示“提交候选人”的按钮。

![](https://i.imgur.com/FpTO9pm.png)

完成交易后，您将看到您的帐户出现在“候选人”这一行的下方。

![](https://i.imgur.com/n38BX2w.png)



### 对候选人进行投票
提交候选资格的按钮旁边是另一个名为“投票”的按钮。您将单击此按钮为自己投票（可选）。

![](https://i.imgur.com/PzjZhgs.png)

理事会使用 [Phragmén]()【待补充】 批准投票，这也用于验证人选举。这意味着您最多可以选择 5 位不同的候选人进行投票，您的份额将被他们均分。在这篇指导中，您可以单击帐户选择您自己的候选人。

![](https://i.imgur.com/qktKFFq.png)


### 获胜

如果您是赢得议会选举的幸运者之一，您将看到您的帐户移动到“成员”行下方。

![](https://i.imgur.com/ceb4ciJ.png)


现在您可以通过提出动议或投票提案来参与理事会。


## 为理事会议员投票
理事会是一个选举机构，代表 Phala 和/或 Khala 的被动利益相关者。理事会在治理方面有两个主要任务：提出公投和否决危险或恶意的公投。有关理事会的更多信息，请参阅[治理页面]()【待补充】。本指南将引导您在选举中为议员投票。

### 为议员投票
投票给议员需要你在投票期间在 Phala 上锁定 5 PHA 或在 Khala 上锁定 **5 K-PHA。**

>注意：投票和质押锁定可以重叠，用户可以使用质押资金为议员投票和/或在公投中使用这些资金。用户只能将这些资金转移到另一个帐户。

>警告：如果您的余额已绑定，则不能使用未绑定的代币进行此锁定。您必须等到至少有足够的未绑定代币才能投票。

与验证人选举一样，您最多可以支持 **5 名**不同的议员，并且您的投票将在所选组中平均分配。与验证人选举不同，您保留的代币没有解绑期。一旦您取消投票，您的代币将再次具有流动性。

>警告：当您为议员投票时，您有责任不将您的全部余额放入保留值中。最好保留足够的 PHA/K-PHA 来支付交易费用。

转到 [Khala 应用程序仪表板](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara1-api.phala.network%2Fws%2F#/accounts)，然后单击“理事会”选项卡。在窗口的右侧有两个蓝色按钮，单击显示“投票”的按钮。

由于理事会使用批准投票，当您投票时，您表示您赞成哪些候选人，并且您投票的代币将在选定的候选人中平均分配。滑动滑块至“赞成”，你最多可选 **5**名希望当选理事会成员的候选人。配置完毕后，提交交易。

当您的交易被确认后，您应该会立即看到您的投票出现在界面中。

### 删除您的投票

为了取回您保留的代币，您需要取消投票。 仅在您完成选举并希望保留的代币不再计入您批准的议员时才取消您的选票。

转到 Khala 应用程序仪表板上的“Governance（治理）”>“Council（理事会）”选项卡。

在“Overview（概览）”选项卡下，单击“Vote（投票）”,发起“Unvote all（取消全部投票）”选项。

![](https://i.imgur.com/KBbtc6f.png)


当交易包含在一个区块中时，您应该让剩余代币恢复流动，您的选票将不再计入下一期选举的任何议员的票数。


