> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stablecoin Balances Enriched (Solana)

> Daily stablecoin balances and circulating supply with address-type enrichment on Solana.

export const StablecoinBalancesSupplyNote = ({filterHint, includeCoverageGap = false, includeAddressCategoryBridge = false, hasIsCirculatingField = false}) => <>
    <h2>Interpreting balances vs circulating supply</h2>
    <ul>
      <li>This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.</li>
      <li>
        Two metrics, two recipes:
        <ul>
          <li><strong>Total balances</strong> — sum <code>balance_usd</code> with no exclusion filter. Includes bridge-locked funds (e.g., more than $4B USDT can appear in the Tether <code>USDT0Adapter</code> contract on Ethereum while representing circulating <code>USDT0</code> on other chains), issuer escrow, and CEX-locked balances.</li>
          {hasIsCirculatingField ? <li><strong>Circulating supply</strong> — add <code>WHERE is_circulating = true</code>. The flag excludes lock-and-mint / rollup-escrow / check-balance / non-minting bridges (<code>address_subcategory</code> in <code>bridge_lockAndMint</code>, <code>bridge_rollup_escrow</code>, <code>bridge_check_balance</code>, <code>bridge_nonMinting</code>), issuer bridge escrow, and CEX proof-of-assets wallets (e.g., Binance Stablecoin Proof of Assets).</li> : <li><strong>Circulating supply</strong> — this foundation table does not carry the <code>is_circulating</code> flag. Use the enriched balances table (<code>stablecoins_evm.balances_enriched</code>, <code>stablecoins_solana.balances_enriched</code>, or <code>stablecoins_tron.balances_enriched</code>) and filter <code>WHERE is_circulating = true</code>.</li>}
        </ul>
      </li>
      <li>We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The <code>is_circulating</code> flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.</li>
      {includeCoverageGap && <li>Excluding only selected bridges would also be incomplete in practice: some bridge-held balances represent liquidity for chains not covered elsewhere (for example Lighter and Hyperliquid bridge balances).</li>}
      {includeAddressCategoryBridge && <li>Bridge exposure is directly analyzable with <code>address_category = 'bridge'</code>.</li>}
      {filterHint && <li>{filterHint}</li>}
    </ul>
  </>;

export const PremiumDatasetAccessCard = ({href = "https://dune.com/enterprise#contact-form"}) => <Card title="Premium dataset access" icon="info" href={href}>
    This dataset is part of a premium offering and requires additional access. Contact the Dune enterprise team to request access.
  </Card>;

The `stablecoins_solana.balances_enriched` table extends Solana stablecoin balances with address classification, whale flags, and a circulating supply flag.

<PremiumDatasetAccessCard />

## Why these enriched tables matter

Stablecoin analysis comes down to two fundamental questions:

1. Where are stablecoins right now? (balances)
2. How did they get there? (activity)

This balances-enriched table answers the first question by going beyond raw balances and adding attribution for where capital sits: CEX, lending, treasury, yield, bridge, whale concentration, and more.

## Table schema

| Column                | Type        | Description                                                                                                                                                                                                                                                                          |
| --------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `blockchain`          | `VARCHAR`   | Chain name (`solana`)                                                                                                                                                                                                                                                                |
| `day`                 | `DATE`      | Balance date (partition column)                                                                                                                                                                                                                                                      |
| `address`             | `VARCHAR`   | Wallet address                                                                                                                                                                                                                                                                       |
| `token_symbol`        | `VARCHAR`   | Token symbol                                                                                                                                                                                                                                                                         |
| `token_address`       | `VARCHAR`   | Token mint address                                                                                                                                                                                                                                                                   |
| `token_standard`      | `VARCHAR`   | Token standard (`spl_token` or `token2022`)                                                                                                                                                                                                                                          |
| `token_id`            | `VARCHAR`   | Always `NULL`                                                                                                                                                                                                                                                                        |
| `balance_raw`         | `UINT256`   | Raw balance                                                                                                                                                                                                                                                                          |
| `balance`             | `DOUBLE`    | Decimals-adjusted balance                                                                                                                                                                                                                                                            |
| `balance_usd`         | `DOUBLE`    | USD value                                                                                                                                                                                                                                                                            |
| `currency`            | `VARCHAR`   | ISO 4217 code                                                                                                                                                                                                                                                                        |
| `address_category`    | `VARCHAR`   | Address category (see below)                                                                                                                                                                                                                                                         |
| `address_subcategory` | `VARCHAR`   | Address subcategory (nullable)                                                                                                                                                                                                                                                       |
| `address_project`     | `VARCHAR`   | Project/entity name (nullable)                                                                                                                                                                                                                                                       |
| `address_version`     | `VARCHAR`   | Project version (nullable)                                                                                                                                                                                                                                                           |
| `address_label`       | `VARCHAR`   | Label value (nullable)                                                                                                                                                                                                                                                               |
| `is_whale`            | `BOOLEAN`   | Address holds >= \$10M total stablecoins that day                                                                                                                                                                                                                                    |
| `is_circulating`      | `BOOLEAN`   | `true` when the balance contributes to circulating supply. `false` for bridge escrows (lock-and-mint, rollup-escrow, check-balance, non-minting subcategories), issuer bridge escrow, and CEX locked-token wallets. Use `WHERE is_circulating = true` to compute circulating supply. |
| `last_updated`        | `TIMESTAMP` | Last balance update time                                                                                                                                                                                                                                                             |

## Address categories

Every address receives exactly one `address_category` — no double counting is possible by construction. When an address matches a curated label, that label wins. Unlabeled addresses fall through: >= \$10M balance → `unidentified_whale`, otherwise → `unidentified`.

When an address appears in multiple label sets, a fixed priority order resolves the conflict (table is ordered by priority, highest first):

| `address_category`       | Allowed `address_subcategory` values           | Description                                                                                 |
| ------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `bridge`                 | `bridge_liquidity`                             | Stablecoins escrowed or locked for cross-chain transfers.                                   |
| `dex`                    | `dex_liquidity`, `dex_execution`               | Stablecoins in decentralized exchange pools and routing contracts.                          |
| `lending`                | `lending_liquidity`, `lending_execution`       | Stablecoins deployed as credit in lending protocols.                                        |
| `yield`                  | `yield_liquidity`, `yield_execution`           | Stablecoins in strategy or wrapper contracts earning passive yield.                         |
| `issuer`                 | `issuer_operations`, `issuer_treasury`         | Stablecoin monetary infrastructure — minting, redemption, peg management.                   |
| `treasury_or_governance` | `treasury`, `treasury_collector`, `governance` | Protocol-controlled capital for governance, reserves, or fees.                              |
| `cex`                    | `cex`                                          | Known exchange-controlled wallets (hot and cold). Not user deposit addresses.               |
| `burn`                   | `burn`                                         | Irrecoverable token sinks (dead/burn addresses).                                            |
| `unidentified_whale`     | `unidentified_whale`                           | Unlabeled addresses holding >= \$10M total stablecoin balance that day. Recalculated daily. |
| `unidentified`           | `unidentified`                                 | Addresses with no known classification.                                                     |

As label coverage expands, new values may be added in backward-compatible fashion.

## Methodology

1. Start from daily rows in `stablecoins_solana.balances`.
2. Join curated Solana address labels to assign category, subcategory, and project metadata where available.
3. Derive `is_whale` (>= \$10M total stablecoin balance) and `is_circulating` (true unless the address is a bridge escrow / issuer bridge escrow / CEX locked-token wallet) flags per address per day.
4. Apply the priority waterfall for unlabeled addresses to maintain complete coverage.

Category totals should be interpreted as "where balances sit" rather than ownership or liability accounting. Labels represent the best-known economic function of an address and can evolve as coverage improves.

## Sample query

```sql theme={null}
SELECT
    b.address_category
    , b.token_symbol
    , SUM(b.balance_usd) AS total_usd
FROM stablecoins_solana.balances_enriched AS b
WHERE b.day = CURRENT_DATE
    AND b.balance > 0
GROUP BY b.address_category, b.token_symbol
ORDER BY total_usd DESC
```

## Notes

* For performance, filter by `blockchain` and `day`.
* For circulating supply, filter `WHERE is_circulating = true`. For bridge exposure, filter `WHERE address_category = 'bridge'`. Both are intentionally retained in the table.

<StablecoinBalancesSupplyNote hasIsCirculatingField={true} includeAddressCategoryBridge={true} />
