---
title: Discovering Most Trusted Accounts
description: Find and rank the ecosystem's most trusted accounts based on stake and activity
url: https://docs.intuition.systems/docs/v1/tutorials/queries/discovering-most-trusted-accounts
markdown_url: https://docs.intuition.systems/docs/v1/tutorials/queries/discovering-most-trusted-accounts.md
version: V1
llms_index: https://docs.intuition.systems/docs/v1/llms.txt
---

## Discovering the Most Trusted Accounts

**Time to complete:** 45 minutes
**Difficulty:** Intermediate

## Why You'd Need This

Building trust graphs, recommendation systems, or expert finders? This tutorial shows you how to identify the most trusted and active participants in the Intuition ecosystem.

**Use cases:**
- Expert discovery platforms
- Trust-weighted voting systems
- Recommendation engines
- Influencer identification
- Reputation dashboards

## What You'll Learn

Learn how to leverage the Intuition GraphQL API to find and rank the ecosystem's most trusted accounts based on their positions, stakes, and activity patterns.

## Understanding the Progression

1. **Get top 20 accounts** ranked by total shares across all positions, showing the most trusted accounts based on cumulative stakes.
2. **Get detailed information** for a given account including all positions and atoms created.
3. **Find top 20 individual positions** by share amount, showing which accounts hold the largest single stakes.

    id: 'trusted-accounts',
    title: 'Step 1: Get Most Trusted Accounts',
    query: `query GetTrustedAccounts($limit: Int = 20) {
  accounts(
    limit: $limit
    order_by: [{ positions_aggregate: { sum: { shares: desc } } }]
    where: {
      positions_aggregate: {
        count: { predicate: { _gt: 0 } }

  ) {
    id
    label
    image
    positions_aggregate {
      aggregate {
        count
        sum {
          shares

    positions(
      limit: 10
      order_by: [{ shares: desc }]
    ) {
      id
      shares
      created_at
      vault {
        term_id
        current_share_price
        market_cap
        term {
          atom {
            term_id
            label
            image

}`,
    variables: {
      limit: 20

  },

    id: 'account-details',
    title: 'Step 2: Get Account Details',
    query: `query GetAccountDetails($accountId: String!) {
  accounts(where: { id: { _eq: $accountId } }) {
    id
    label
    image
    positions_aggregate {
      aggregate {
        count
        sum {
          shares

    positions(
      limit: 50
      order_by: [{ shares: desc }]
    ) {
      id
      shares
      created_at
      vault {
        term_id
        current_share_price
        market_cap
        total_shares
        term {
          atom {
            term_id
            label
            image
            type

          triple {
            term_id
            subject { label }
            predicate { label }
            object { label }

    atoms(order_by: [{ created_at: desc }]) {
      term_id
      label
      type
      created_at

}`,
    variables: {
      accountId: '0xbd2DE08aF9470c87C4475117Fb912B8f1d588D9c'

  },

    id: 'top-holders',
    title: 'Step 3: Top Position Holders',
    query: `query GetTopHolders($limit: Int = 20) {
  positions(
    limit: $limit
    order_by: [{ shares: desc }]
  ) {
    id
    shares
    created_at
    account {
      id
      label
      image
      positions_aggregate {
        aggregate {
          count
          sum {
            shares

    vault {
      term_id
      market_cap
      current_share_price
      term {
        atom {
          label
          image

}`,
    variables: {
      limit: 20

];

## UI Integration Example

Display trusted accounts in your application:

```tsx
import { request, gql } from 'graphql-request'

const GET_TRUSTED_ACCOUNTS = gql`
  query GetTrustedAccounts($limit: Int = 20) {
    accounts(
      limit: $limit
      order_by: [{ positions_aggregate: { sum: { shares: desc } } }]
      where: {
        positions_aggregate: {
          count: { predicate: { _gt: 0 } }
        }
      }
    ) {
      id
      label
      image
      positions_aggregate {
        aggregate {
          count
          sum { shares }
        }
      }
    }
  }
`

export function TrustedAccountsWidget() {
  const [accounts, setAccounts] = useState([])

  useEffect(() => {
    async function fetchAccounts() {
      const data = await request(
        'https://mainnet.intuition.sh/v1/graphql',
        GET_TRUSTED_ACCOUNTS,
        { limit: 10 }
      )
      setAccounts(data.accounts)
    }
    fetchAccounts()
  }, [])

  return (
    <div className="trusted-accounts">
      <h3>Most Trusted Accounts</h3>
      {accounts.map((account, i) => (
        <div key={account.id} className="account-item">
          <span className="rank">#{i + 1}</span>
          <img src={account.image} alt={account.label} />
          <div>
            <div className="name">{account.label || account.id.slice(0, 10)}</div>
            <div className="stats">
              {account.positions_aggregate.aggregate.count} positions
              • {parseFloat(account.positions_aggregate.aggregate.sum.shares).toFixed(2)} total shares
            </div>
          </div>
        </div>
      ))}
    </div>
  )
}
```

## Next Steps

- [Building Activity Feeds](https://docs.intuition.systems/docs/v1/tutorials/queries/building-user-activity-feeds) - Track user actions
- [Finding Related Claims](https://docs.intuition.systems/docs/v1/tutorials/queries/finding-related-claims) - Explore connections
- [Reputation System Tutorial](https://docs.intuition.systems/docs/v1/tutorials/reputation-system) - Build reputation scoring

## Resources

- [GraphQL API Reference](https://docs.intuition.systems/docs/v1/graphql-api/overview)
- [Accounts Schema](https://docs.intuition.systems/docs/v1/graphql-api/getting-started/schema-reference)
