Polkadot proxy account allows users to keep an account in cold storage and participate in the network more securely through various proxy permissions.
Original title: How does Polkadot set up a proxy account? |Polkadot Wiki》
Written by: Polkadot
Translation: PolkaWorld
Polkadot provides a proxy module through which you can set up proxy accounts to add a layer of security. This article is part of Polkadot Wiki. Polkadot Wiki is a Polkadot introduction document written by Polkadot. PolkaWorld is gradually translating and serializing this document.
Polkadot provides a module that allows users to set up proxy accounts to perform limited actions on their behalf. Similar to the storage and control account relationship in staking, proxy accounts allow users to keep an account in cold storage and use the weight of tokens in the account to actively participate in the network.
Agent type
You can set up a proxy account through the proxy module. When setting up a proxy account, you must select the proxy type for the relationship. Polkadot provides the following relationships:
- Any agent
- Non-transfer
- Governance
- Staking
- Identity judgment
When a proxy account conducts a proxy transaction, Polkadot filters the transaction to ensure that the proxy account has the appropriate authority to conduct the transaction on behalf of the cold account.
Any agent
As the name implies, the proxy type “Any” allows any transaction on the proxy account, including balance transfers. In most cases, this should be avoided because proxy accounts are used more frequently than cold accounts and are less secure.
Non-transfer agent
The “non-transfer” type of proxy account allows any type of transaction except balance transfers (including vested transfers).
Governance agent
The “governance” type will allow agents to conduct governance-related transactions (ie, democracy, council, treasury, technical committee, and election modules).
For more information about governance agents, see the governance section:
Staking proxy
The “Staking” agent type allows staking-related transactions, but do not confuse the staking agent with the control account. In the Staking module, some transactions must come from the Stash storage account, while other transactions must come from the controller control account. The Stash account will remain in cold storage, while the Controller account performs daily transactions, such as setting a session key or deciding which verifiers to nominate. However, the Stash savings account still requires some transactions, such as binding additional funds or designating a new control account. The proxy account does not change the role of the storage account and the control account, but it can make the access frequency of the storage account lower.
Identity judgment agent
“Identity Judgement” proxy account allows the registration center to judge the identity of the account. If you are not familiar with the judgment and identity on the chain, please refer to this page .
Anonymous proxy
Polkadot includes a function to create an anonymous proxy, the account can only be accessed through the proxy. In other words, it generates an address, but does not have a corresponding private key. Usually, the master account specifies the proxy account, but the anonymous proxy does the opposite. The account that creates the agency relationship is the agency account, and the new account is the master account. Use exreme care for anonymous agents, after deleting the agent relationship, the account will not be accessible.
Why use a proxy account?
Proxy accounts are great for specific purposes because they add a layer of security. Unlike using funds in a separate account, a small account with a unique role can complete the main task of a savings account. This will shift attention from the master account to the agent account.
Especially anonymous proxy can be used for unauthorized management. In the example below, there is a multi-signature with four different accounts. Two of these accounts, Alice and Bob, have an anonymous proxy. If the multi-signature account wants to add or delete Alice or Bob from the anonymous proxy, or even add a new account, the anonymous proxy will be responsible for the change. If a multi-signature account wants to modify itself without an anonymous proxy, then a new multi-signature account needs to be created.
How to set up a proxy account
Use Polkadot-JS UI
To set up the proxy, navigate to Polkadot JS UI and click “Developer”> “Extrinsics”. Here we will see a page similar to this:
To add an agent, click the module selection drop-down menu. The drop-down list is labeled “submit the following extrinsic”. Select the proxy module, then select addProxy extrinsic (in the drop-down menu next to it). To add a proxy, you need to select the addProxy (proxy, proxy_type) function. The selected proxy account you set up will be an account with a proxy. The account selected at the top is the account that will be the master account.
Note: If you see the “Not Used” option when adding a proxy, this is not the proxy type. This is an empty option, if you try to add it as a proxy account, nothing will happen. No new agents will be created.
Create anonymous proxy on Polkadot-JS UI
For anonymous proxy, another function needs to be called, namely anonymous(proxy_type, index). This will let you choose which anonymous proxy to set up, and the index.
Another way to create a proxy
There is another way to set up a proxy on Polkadot JS UI. Go to “Account” in the navigation and click the “Account” button. For each account you have on this page, click the three-dot button to directly “Add Agent” to create an agent account. Then a window will pop up on your screen where you can select the proxy type for that particular account.
Note: An anonymous function cannot be created from the “Account” page, it must be on the “External” page.
Remove agent
If you want to delete a proxy, there are several functions on the extrinsic external page to help you do this. The killAnonymous() function can delete anonymous agents. Both removeProxies() and removeProxy() can delete any other type of proxy, but the former will delete all proxies, and the latter will delete a selected proxy.
to sum up
If the concept of agent type and its application looks abstract, then it is indeed abstract. Below is an example of how to use these accounts. Suppose you have an account as your main token holding account and don’t want to visit it often, but you do want to participate in governance and staking. You can set up governance and staking proxy accounts.
In this example, the master account A will only make two transactions, and account B is set as the governance agent account, and account C is set as the staking agent account. Now, account B can participate in governance activities on behalf of A.
Similarly, account C can perform operations normally associated with storage accounts, such as binding funds and setting control account D. Operations that usually require a storage account, such as binding additional tokens or setting up a new control account, can be handled by its proxy account C. If account C is compromised, it does not have the authority to transfer related transactions, so the main account can set up a new agent to replace it.
By creating multiple accounts to proxy one account, it allows you to actively participate in the network while protecting the private key, thereby having more sophisticated security measures.
Source link: wiki.polkadot.network