Anonymous proxies are an advanced feature and can only be created from the Extrinsics page. 


WARNING: It is critical to set up anonymous proxies with care. Take note of appropriate permissions and be aware of the potential dangers. There is no way to get access to the anonymous proxy account after deleting it. 

Instead, the killAnonymous extrinsic must be called from the anonymous proxy. This means the anonymous proxy must be added as an account on the Polkadot-JS UI Accounts page. Making a mistake could result in loss of funds.

Setting an Anonymous Proxy


1. To set an anonymous proxy, head to the Polkadot-JS UI and navigate to the Developer > Extrinsics tab. A page should display similar to this:



2. Select the proxy type, and add a delay (in block height) if necessary. The index will typically always remain at 0. Sign and submit the transaction to create the proxy account.


IMPORTANT: The first anonymous proxy you add should always be of type Any. Also, if there are multiple anonymous proxies for the proxied account, you should keep at least one Any type. Without having an Any type proxy, you won't be able to send funds, add new proxies, kill the anonymous proxy, or take any action not specifically allowed by the types of the proxies that have been set up for the account.

Time Delayed Proxies


The delay: u32 field allows you to set a delay for each call that the proxy account makes. You can enter this value in blocks. For example, if you create a proxy with a delay value of 100 blocks, proxy calls made by this account will take approximately 10 minutes to execute (100 * 6 (seconds) = 600 seconds). Within this delay time frame, the origin account is able to reject the announcement from the proxy account. If your intention is to create a normal proxy account, use the default value of 0.


Types


Polkadot offers different types of proxies you can set, depending on the permissions use case. You can create the following types with the Polkadot-JS UI:


  • Any - this proxy type has permission to make any type of transaction, including balance transfers.


  • Non-transfer - this proxy type will allow any type of transaction except for balance transfers.


  • Governance - proxies of this type can make transactions related to governance (Democracy pallet, Treasury pallet, etc).


  • Staking - these proxies allow staking-related transactions. Not to be confused with controller accounts, which are needed for certain transactions. Staking proxies are meant to allow you to access your stash account less frequently.


  • Identity Judgement - proxies that are in charge of allowing registrars to make judgement on an account's identity. See more information here.


  • Auction - proxies of this type allow transactions related to auctions and crowdloans. 


See more in-depth info about proxy types in this article.


Removing an Anonymous Proxy


The procedure for removing an Anonymous Proxy is different and there are a few functions on the extrinsics page that will help to accomplish this. The following steps can be used to remove your anonymous proxy:


1. Use a block explorer to find the following information:


  • the account you created the anonymous proxy from


  • type of proxy, and index (almost always 0)


  • block height it was created at


  • the extrinsic index on the block (on most block explorers, you will see the extrinsic ID listed as something along the lines of "11111111-2". 11111111 is the block height (block number) and 2 is the extrinsic index.



2. Navigate to the accounts page and make sure you are on the correct network. Click Proxied and add your address; name it ANON PROXY. You should now see this address in your accounts.


3. Next, you need to call killAnonymous from the anonymous proxy. It is important to note that anonymous proxies work backward, in that the original account acts as the proxy.



4. Navigate to the extrinsics page.


5. Call the extrinsic proxy.killAnonymous using the selected account ANON PROXY with the following parameters:


  • Spawner (original account)


  • Proxy type (kind of proxy)


  • Index 0 (almost always, but this can be found on the block explorer in the original extrinsic)


  • Block number x


  • Extrinsic index y



6: Submit and sign the extrinsic.




What are they useful for?


Anonymous proxies, in particular, can be used for permissionless management. In the example below, there is a multisig with four different accounts inside. Two of the accounts, Alice and Bob, have an anonymous proxy attached to them. In the case that the multisig account wanted to add or remove Alice or Bob or even add in a new account into the anonymous proxy, the anonymous proxy would take care of that change. If a multisig wanted to modify itself without an anonymous proxy, a whole new multisig would be created.



Check out this video from our Tech Ed team which explains proxy accounts in more detail: