About Portfolios
In Polymesh, all assets (excluding the native token POLYX) are held at the identity level. This allows Polymesh to enforce compliance in real-time based on claims also held at the identity level.
To allow users to organize their assets underneath their identity, and to flexibly assign key permissions and custody, Polymesh has the concept of portfolios. A particular asset can have different balances across portfolios within the same identity.
Every identity has a default portfolio. This is where assets are received, and where assets are moved to when a portfolio is deleted. Transfers of assets between portfolios of the same identity are always possible and not subject to any compliance rules.
Users can assign one custodian per portfolio they own. A portfolio can contain any number of different assets.
Portfolios can be managed on the Polymesh dashboard or in the Polymesh App.
This guide shows both ways and is broken down into the following main sections:
- How to Create and Manage Portfolios on the Polymesh Dashboard
- How to manage portfolios with the Polymesh app
How to Create and Manage Portfolios on the Polymesh Dashboard
Creating a portfolio on the Polymesh Dashboard
- Open the Polymesh dashboard.
Note: The portfolio named "Unassigned" is your default portfolio. This is where assets are received, and where assets are moved to when a portfolio is deleted.
2. Click on Create new portfolio
3. Enter a name for your portfolio, then click on Add
and confirm the transaction
4. You will see a pop-up on the right side of the dashboard indicating success:
Moving assets between Portfolios on the Polymesh Dashboard
- Open the Polymesh dashboard
- Scroll down to the portfolios and find the one you would like to send your asset from
- Click on
Send
- A popup window will appear, fill in the details
- Select the asset then enter the amount of the asset you would like to transfer
- Select "One of my portfolios" then select the destination portfolio
5. Once you filled in all the data, click on Send
and then confirm the transaction with your wallet
Sending assets from a portfolio to another Polymesh Account on the Polymesh Dashboard
- Open the Polymesh dashboard.
- Scroll down to the portfolios and find the one you would like to send your asset from
- Click on
Send
- A popup window will appear, fill in the details.
-
- Select the asset then enter the amount of the asset you would like to transfer
- Select "Other Polymesh Account" and then enter the destination Polymesh account which begins with 0x. You can also enter a memo if you like.
5. Once you filled in all the data, click on Send
and then confirm the transaction with your wallet
Managing Portfolio Managers on the Polymesh Dashboard
A portfolio can only have one owner and optionally one custodian/secondary portfolio manager
Step 1: Assign a secondary user for your account
First of all, you will need to assign a secondary user for your Polymesh account. To add a secondary user, you will be required to assign their key using the Polymesh Dashboard.
To do this, please follow this article.
Step 2: Manage access control for secondary users
- Open the Polymesh Token Studio.
- Look for the card of your token, then click on
Manage token
- Click on the Access Control tab.
Alternatively, you can reach it via this URL: https://tokenstudio.polymesh.network/token/YOURTICKER/access-control (replace YOURTICKER with your actual token ticker).
Here you can control management access for your security token including which secondary user can manage compliance, token distribution, and more. - Once you've finished selecting access control rules, click on
Submit
then sign the transaction with your wallet:
Step 3: Add the secondary user as a portfolio manager
1. Open the Polymesh dashboard.
2. Scroll down to the portfolios and find the one you would like to send your asset from
3. Click on Manage
4. You will see a list of the portfolio managers. Click on the triangle to open the dropdown menu where you will see the secondary user's key you've just added to your account. Click on the checkmark to add it, then click on Save
at the bottom
5. A confirming window will appear, click onConfirm
then sign the transaction with your wallet.
You can remove a portfolio manager anytime by clicking on the junk icon near the account:
How to manage portfolios with the Polymesh app
Creating a portfolio with the Polymesh app
1. Go to the Polymesh App then fill in the data as per below:
- using the selected account: Select your Polymesh account
- submit the following extrinsic: Select
portfolio
thencreatePortfolio(name)
- name: Enter a name for your portfolio
Click here to see this image at full resolution. - Once all data are filled, click on
Submit Transaction
at the right corner of the page
2. A confirmation window will appear, click on Sign and Submit
and then sign the transaction with your wallet.
How to retrieve your Portfolio ID
Retrieve Portfolio ID by querying the blockchain
Go to the Polymesh App then fill in the data as per below:
- selected state query: Select
portfolio
thenportfolio(PolymeshPrimitivesIdentityId, u64)
- Paste your DID from your wallet (which begins with 0x) to the field Identity: PolymeshPrimitivesIdentityId
- Click off the “include option” toggle
- Click the
+
button at the top right to see then you will see all the portfolios and portfolio ID's associated with your DID at the bottom of the page
Click here to see this image at full resolution.
Retrieve Portfolio ID from the Polymesh Block Explorer
1. Open the Polymesh Block Explorer and search for your Polymesh key (it begins with 2)
2. In the Extrinsics tab, look for the action "portfolio (create_portfolio)" then click on the Extrinsic ID
Click here to see this image at full resolution.
3. On the new page scroll down to the event with the action "portfolio (PortfolioCreated)"
Click here to see this image at full resolution.
Delete a portfolio with the Polymesh app
A portfolio can be deleted only if it has no funds.
- Go to the Polymesh App then fill in the data as per below:
- using the selected account: Select your Polymesh account
- submit the following extrinsic: Select
portfolio
thendeletePortfolio(num)
- num: This is the Portfolio ID or number. Enter the number of the portfolio you want to delete
Click here to see this image at full resolution.
- Once all data are filled, click on
Submit Transaction
at the right corner of the page: - Another popup window will appear, click on
Sign and Submit
and then sign the transaction with your wallet.
Moving assets between Portfolios with the Polymesh app
1. Go to the Polymesh App then fill in the data as per below:
- using the selected account: Select your Polymesh account
- submit the following extrinsic: Select
portfolio
thenmovePortfolioFunds(from, to ,items)
Click here to see this image at full resolution. - From:
- did: Enter your Polymesh DID which begins with 0x.
- Kind: This is the portfolio that holds the token you want to send. Keep it as
Default
if this is your default portfolio (named "Unassigned" on the Polymesh Dashboard). If it is one of your named/user portfolios, enter the number of it.
Note: The first portfolio you create has the number 1 and it increments by 1 for any new portfolio you create afterward.
Click here to see this image at full resolution.
- To:
- did: Enter your Polymesh DID which begins with 0x.
- Kind: This is the destination portfolio. Keep it as
Default
if this is your default portfolio (named "Unassigned" on the Polymesh Dashboard). If it is one of your named/user portfolios, enter the number of it.
Note: The first portfolio you create has the number 1 and it increments by 1 for any new portfolio you create afterward.
Click here to see this image at full resolution.
- PolymeshPrimitivesTicker: Enter the asset ticker in HEX format
Click here to see this image at full resolution.
Note: Use a HEX converter like this one. For the Output delimiter string, select "None".
Example: The ticker name is "testtoken", which is "4D79207465737420746F6B656E" in HEX.
This HEX value should be padded with zeros to be 12 bytes like "74657374746F6B656E00000" with a 0x prefix, so the value you should enter is "0x74657374746F6B656E00000".
Fill up the ticker field with zeros until the message in red disappears from the bottom of the page. - amount: Enter the amount of the asset you would like to transfer
- memo (optional): You can enter a memo in HEX format for the transfer if needed.
Click here to see this image at full resolution.
Note: Use a HEX converter like this one. For the Output delimiter string, select "None".
Example: The memo is "testmemo", which is "746573746D656D6F" in HEX.
This HEX value should be padded with zeros to be 32 bytes like "746573746D656D6F000000000000000000000000000000000000000000000000" with a 0x prefix, so the value you should enter is "0x746573746D656D6F000000000000000000000000000000000000000000000000".
Fill up the memo field with zeros until the below message in red disappears:
Click here to see this image at full resolution.
2. Once all data are filled, click onSubmit Transaction
at the right corner of the page:
3. Another popup window will appear, click on Sign and Submit
and then sign the transaction with your wallet.
Common errors and solutions
- PortfolioDoesNotExist: This means that if one or both of the portfolios reference an invalid portfolio. Check if the portfolio number is correct.
- Destination_is_same_portfolio: This means that both the sender and receiver portfolios are the same. Check if the portfolio number is correct.
- DifferentIdentityPortfolios: This means that the sender and receiver portfolios belong to different identities. The identity must be the same for both portfolios.
- UnauthorizedCustodian: This means that the secondary portfolio manager user is not authorized as the custodian of the sending portfolio. Make sure that the secondary portfolio man
- InsufficientPortfolioBalance: This means that the sender does not have enough free balance of the sending token on his portfolio. Make sure that the sender has enough tokens in their portfolio.
Managing Portfolio Managers with the Polymesh app
Step 1: Portfolio owner to authorize the secondary portfolio manager
1. A portfolio can only have one owner and optionally one custodian/secondary portfolio manager.
2. Go to the Polymesh App then fill in the data as per below:
- using the selected account: Select your Polymesh account
- submit the following extrinsic: Select
Identity
thenaddAutorization
Click here to see this image at full resolution. - target: select
Identity
- Identity: Enter the DID (which begins with 0x) which holds the portfolio you want to add a manager.
Click here to see this image at full resolution. - data: Select
PortfolioCustody
- did: Enter the new secondary portfolio manager's DID (which begins with 0x).
- kind: This is the portfolio you want to assign a secondary portfolio manager. Keep it as
Default
if this is your default portfolio (named "Unassigned" on the Polymesh Dashboard). If it is one of your named/user portfolios, enter the number of it.
Note: The first portfolio you create has the number 1 and it increments by 1 for any new portfolio you create afterwards.
Click here to see this image at full resolution. - expiry (optional): Enter the expiry date and time in Unix timestamp format. You can use a converter like this one.
Click here to see this image at full resolution.
2. Once all data are filled, click onSubmit Transaction
at the right corner of the page:
3. Another popup window will appear, click on Sign and Submit
and then sign the transaction with your wallet.
Step 2: Portfolio owner to retrieve the Auth ID
1. Go to the Polymesh App then fill in the data as per below:
- Selected state query: select
Identity
thenAuthorizations
- Paste your DID from your wallet (which begins with 0x) to the field Identity: PolymeshPrimitivesIdentityId
Click here to see this image at full resolution. - Click off the “include option” toggle
- Click the
+
button at the top right to see the AuthID
Click here to see this image at full resolution. - This will get you the authorization IDs for the PortfolioCustody. Copy them as you will need it at the next step (52064 in this example):
2. Once all data are filled, click onSubmit Transaction
at the right corner of the page:
3. Another popup window will appear, click on Sign and Submit
and then sign the transaction with your wallet.
Step 3: New portfolio manager to accept portfolio custody
1. Go to the Polymesh App then fill in the data as per below:
- using the selected account: Select your Polymesh account
- submit the following extrinsic: Select
portfolio
thenacceptPortfolioCustody
- authId: Enter the AuthID you've gathered in the previous step
Click here to see this image at full resolution.
2. Once all data are filled, click onSubmit Transaction
at the right corner of the page:
3. Another popup window will appear, click on Sign and Submit
and then sign the transaction with your wallet.
If you have any questions or issues, feel free to open a conversation with our support team through the Polymesh Community page.
Comments
0 comments
Please sign in to leave a comment.