QX Explore - Getting started with Polymesh data
  • 💡ABOUT
    • About
    • License
    • How to Give Attribution For Usage of QX Explore - Polymesh
  • 🖥️Getting Started
    • Polymesh Network
    • Polymesh Data
    • Polymesh Metrics
  • 🔎Exploring Polymesh Data
    • Assets
    • Liquidity
    • Identities & Accounts
    • Settlements & Legs
  • 📊VIZUALIZING POLYMESH DATA
    • Assets
    • Liquidity
    • Identities & Accounts
    • Settlements & Legs
Powered by GitBook
On this page
  • Nb of identities
  • Identities created by month
  • Average number of accounts per identity
  • Max accounts - Identity
  • Average number of assets by identity
  • Max assets - Identity
  • Max Legs - Identity
  1. Exploring Polymesh Data

Identities & Accounts

Exploring Identities and Accounts on Polymesh

PreviousLiquidityNextSettlements & Legs

Last updated 1 year ago

The identity and account metrics aim to provide an understanding of the involvement and behavior of participants on the network.

Metric Category
Metric
Metric Description

Identities

Nb of identities

Total number of identities created on the network

Identities

Identities created by month

Number to identities created per month

Identities

Average number of accounts per identity

Average number of accounts related to identities

Identities

Max accounts - Identity

Identity associated with the highest number of accounts on the network.

Identities

Average number of assets by identity

Average number of assets by identity

Identities

Max assets - Identity

Identity holding the highest number of assets

Identities

Max Legs - Identity

The identity involved in the most number of legs (settlement legs) across both the from_id and to_id.

Nb of identities

This metric reflects the growth and adoption of the Polymesh network by indicating how many unique entities are participating. It's helpful for gauging overall ecosystem health and expansion.

How many participants are on the network ?

SQL

SELECT COUNT(DISTINCT did)
FROM identities

GraphQL

query {
  identities {
    totalCount
  }
}

Identities created by month

This metric offers insights into the growth trend of network participation over time. Tracking identities created each month can help identify patterns, seasonal fluctuations, or the impact of specific events on network adoption. The rate of new identity creation can serve as an indirect measure of market sentiment and the attractiveness of the Polymesh network to potential users. A steady or increasing rate of new identities may indicate positive sentiment and growing interest.

How is the Polymesh network growing in terms of new participants?

SQL

SELECT COUNT(*) as "nb Identities", DATE_TRUNC('month', datetime) AS createdMonth
FROM identities
GROUP BY createdMonth
ORDER BY createdMonth ASC

GraphQL

query {
  identities {
    nodes {
      createdBlock {
        datetime
      }
    }
  }
}

This query retrieves all the identities along with their corresponding createdBlock.datetime field. Since the provided schema doesn't support aggregation and grouping directly in the query, you'll need to handle the grouping and counting of identities by month in the application code.

Possible improvement #10

To support the query for counting identities grouped by creation month directly in GraphQL, . one idea could be to modify the schema by introducing a new entity called IdentityAggregateByMonth and thenmodify the Identity entity to include a reference to the IdentityAggregateByMonth.

Average number of accounts per identity

This metric provides an understanding of how identities typically distribute their activities across multiple accounts. A higher average could indicate a preference or need for compartmentalization of operations within the network. A higher average suggests that identities typically manage multiple accounts, indicating a robust engagement with the network's features and capabilities.

How actively are identities engaging with the network?

SQL

SELECT 
    AVG(account_count) AS "Average Accounts per Identity"
FROM (
    SELECT 
        identity_id,
        COUNT(id) AS account_count
    FROM 
        accounts
    GROUP BY 
        identity_id
) AS counts;

GraphQL

query {
  accounts {
    nodes {
      identity {
        id
      }
    }
  }
}

This query retrieves all the accounts along with their associated identity ID then it will necessary to process the results to calculate the average number of accounts per identity.

Possible improvement #11

To support the query for calculating the average number of accounts per identity directly in GraphQL, one idea could be to modify the schema by introducing a new field in the Query type. Add the averageAccountsPerIdentity field to the Query type then Implement the resolver for the averageAccountsPerIdentity field in your GraphQL server.

Max accounts - Identity

This metric highlights the identity with the most accounts, which could be indicative of a major player in the ecosystem or a specific operational strategy that involves managing numerous accounts. An identity with a significantly high number of accounts could indicate a business or organizational user leveraging the Polymesh network for various operations, reflecting on the network's utility for complex organizational structures.

What does the distribution of accounts across identities tell us about how the network is being used?

SQL

SELECT 
    identity_id,
    COUNT(id) AS account_count
FROM 
    accounts
GROUP BY 
    identity_id
ORDER BY 
    account_count DESC
LIMIT 1;

GraphQL

query {
  identities(first: 1, orderBy: SECONDARY_ACCOUNTS_COUNT_DESC) {
    nodes {
      id
      secondaryAccounts {
        totalCount
      }
    }
  }
}

Average number of assets by identity

This metric offers insights into how involved or invested the average identity is in terms of asset holdings. This metric can help understand the depth of engagement within the Polymesh ecosystem. A higher average number of assets per identity suggests that entities tend to hold a broader range of assets.

How much do participants diversify asset holdings on the network?

SQL

SELECT 
    AVG(asset_count) AS "Average Assets per Identity"
FROM (
    SELECT 
        identity_id,
        COUNT(DISTINCT asset_id) AS asset_count
    FROM 
        asset_holders
    GROUP BY 
        identity_id
) AS counts;

GraphQL

query {
  assetHolders {
    nodes {
      identity {
        id
      }
      asset {
        id
      }
    }
  }
}

This query retrieves all the asset holders along with their associated identity ID and asset ID. The result will then need to be processed to calculate the average number of assets per identity.

Possible improvement #12

To support the query for calculating the average number of assets per identity directly in GraphQL, one idea could be to modify the schema by introducing a new field in the Query type .Add the averageAssetsPerIdentity field to the Query type and then Implement the resolver for the averageAssetsPerIdentity field in your GraphQL server.

Max assets - Identity

This metric identifies the identity holding the highest number of assets, which could point to a significant investor or a key institutional participant. This metric can be useful for identifying major stakeholders in the network. The identity holding the most assets may have considerable influence over market liquidity, asset prices, and overall market sentiment, depending on the types and quantities of assets held.

Which identity has the potential to significantly influence the market?

SQL

SELECT 
    identity_id,
    COUNT(DISTINCT asset_id) AS asset_count
FROM 
    asset_holders
GROUP BY 
    identity_id
ORDER BY 
    asset_count DESC
LIMIT 1;

GraphQL

query {
  identities(first: 1, orderBy: HELD_ASSETS_COUNT_DESC) {
    nodes {
      id
      heldAssets {
        totalCount
      }
    }
  }
}

Max Legs - Identity

This metric identifies the identity involved in the highest number of settlement legs (as either the sender or receiver). By identifying the identity with the highest number of settlement legs, it provides insights into which entity is potentially facilitating or engaging in a significant portion of the network's liquidity and asset transfers.

Who is the Most Active Participant in the Settlement Process?

SQL

SELECT 
    id, 
    COUNT(*) AS occurrences
FROM (
    SELECT 
        from_id AS id
    FROM 
        legs
    WHERE 
        from_id IS NOT NULL

    UNION ALL

    SELECT 
        to_id AS id
    FROM 
        legs
    WHERE 
        to_id IS NOT NULL
) AS combined
GROUP BY 
    id
ORDER BY 
    occurrences DESC
LIMIT 1;

GraphQL

query {
  legs {
    nodes {
      from {
        id
      }
      to {
        id
      }
    }
  }
}

This query retrieves all the legs along with their associated from and to portfolios' IDs. The result will then need to be processed to find the ID with the maximum occurrences.

🔎
Identities created by month
Max accounts - Identity
Average number of assets by identity
Max Legs - Identity