> ## 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.

# Token Transfers

> Curated and enriched token transfer events across all EVM networks for fungible tokens.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

export const DuneEmbed = ({qID, vID, height = '500px'}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/${qID}/${vID}?darkMode=true`} style={{
  width: '100%',
  height,
  border: 'none',
  marginTop: '10px'
}}></iframe>
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/${qID}/${vID}`} style={{
  width: '100%',
  height,
  border: 'none',
  marginTop: '10px'
}}></iframe>
    </div>
  </>;

The `tokens.transfers` table contains token transfer events across ERC20 tokens and native tokens for all EVM-compatible networks indexed on Dune. This dataset encompasses:

* Transfer events for ERC20 tokens
* ERC4626 fallback mint and burn transfers for supported vaults
* WETH deposits and withdrawals
* Native currency transfers
  * Transaction value transfers
  * Trace value transfers
  * Gas used transfers

<Info>
  Some ERC20 tokens and native currencies have non-standard ways of being transferred and might not be included in the transfers table.
  You can check the logic for the transfers table [here](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/tokens/models/transfers_and_balances). The level of detail of the transfers table will vary by chain.
</Info>

### Utility

The transfers table provides a comprehensive view of token movement across networks, enabling you to:

* Track token flows between addresses
* Analyze transaction volumes and patterns
* Identify significant token movements
* Monitor exchange and DeFi protocol activity

### Pricing Methodology

<Warning>
  **Important**: The USD values in `tokens.transfers` are calculated using `prices_external.hour`, **not** the hybrid `prices.hour` table.
</Warning>

The `amount_usd` column in the transfers table uses Coinpaprika-sourced pricing data exclusively, which provides:

* **Stable, externally-validated pricing** from centralized exchange aggregation
* **Protection against outliers** that can occur in DEX-derived pricing algorithms
* **Consistent valuation** across major tokens (\~2,000 tokens with Coinpaprika coverage)

This approach prevents pricing anomalies from DEX trading activity that could negatively impact aggregations and analysis on the transfers table. Tokens without Coinpaprika coverage will not have USD values populated.

For more details on Dune's pricing methodology and the differences between pricing sources, see the [Prices documentation](/data-catalog/curated/prices/overview).

## Table Schema

| Column             | Type            | Description                                                |
| ------------------ | --------------- | ---------------------------------------------------------- |
| `unique_key`       | `VARCHAR`       | Surrogate key to identify unique row                       |
| `blockchain`       | `VARCHAR`       | Blockchain of the transfer                                 |
| `block_month`      | `DATE`          | Block month (partition key)                                |
| `block_date`       | `DATE`          | Block date                                                 |
| `block_time`       | `TIMESTAMP`     | Block timestamp                                            |
| `block_number`     | `BIGINT`        | Block number                                               |
| `tx_hash`          | `VARBINARY`     | Transaction hash                                           |
| `evt_index`        | `BIGINT`        | Log event index of the transfer                            |
| `trace_address`    | `ARRAY(BIGINT)` | Trace address of the transfer                              |
| `token_standard`   | `VARCHAR`       | Token standard (ERC20, native)                             |
| `tx_from`          | `VARBINARY`     | Transaction sender                                         |
| `tx_to`            | `VARBINARY`     | Transaction receiver                                       |
| `tx_index`         | `BIGINT`        | Transaction index within the block                         |
| `from`             | `VARBINARY`     | Sender of the transfer                                     |
| `to`               | `VARBINARY`     | Receiver of the transfer                                   |
| `contract_address` | `VARBINARY`     | Token contract address                                     |
| `symbol`           | `VARCHAR`       | Token symbol                                               |
| `amount_raw`       | `UINT256`       | Raw transfer amount before decimal adjustment              |
| `amount`           | `DOUBLE`        | Transfer amount in display units                           |
| `price_usd`        | `DOUBLE`        | USD price used to calculate amount\_usd (from Coinpaprika) |
| `amount_usd`       | `DOUBLE`        | USD value of the transfer                                  |

<TableSample tableSchema="tokens" tableName="transfers" />

### Network Coverage

Transfer data is available for the following EVM-compatible networks:

<div>
  <DuneEmbed height="1200" qID="3695907" vID="6218008" />
</div>

## Sample Queries

**Query recent token transfers for a specific address**

This query returns the most recent token transfers (both incoming and outgoing) for a specified address:

```sql theme={null}
SELECT
    block_time,
    symbol,
    CASE 
        WHEN "from" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77 THEN 'Outgoing'
        WHEN "to" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77 THEN 'Incoming'
    END AS direction,
    amount,
    amount_usd
FROM tokens.transfers
WHERE ("from" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77 OR "to" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77)
    AND block_time > now() - interval '30' day
ORDER BY block_time DESC
LIMIT 100
```

<div>
  <DuneEmbed height="300" qID="3999506" vID="6732340" />
</div>

**Calculate daily transfer volume for a specific token**

This query calculates the daily transfer volume for a specific ERC20 token.

Please be aware that token volumes are not necessarily indicative of anything. These metrics can be misleading if the token is not well-known or if there are a lot of small transfers. Token transfers can be mints, burns, transfers, flash loans and anything in between, trying to read into the data can lead to misleading results.

Note: The `amount_usd` values are calculated using Coinpaprika pricing data (`prices_external.hour`) for stable, exchange-validated pricing.

```sql theme={null}
SELECT
    block_date,
    COUNT(*) AS num_transfers,
    SUM(amount) AS total_amount,
    SUM(amount_usd) AS total_amount_usd
FROM tokens.transfers
WHERE contract_address = 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984
    AND block_time > now() - interval '30' day
    and blockchain = 'ethereum'
GROUP BY 1
ORDER BY 1 DESC
```

<div>
  <DuneEmbed height="300" qID="3999595" vID="6732454" />
</div>

**Identify largest transfers in the last 24 hours**

This query finds the largest token transfers by USD value in the last 24 hours:

Note: USD values are sourced from Coinpaprika pricing data for reliable valuation.

```sql theme={null}
SELECT
    block_time,
    token_symbol,
    "from",
    "to",
    amount,
    amount_usd
FROM tokens.transfers
WHERE block_time > now() - interval '1' day
    AND amount_usd IS NOT NULL
ORDER BY amount_usd DESC
LIMIT 50
```

**Find the circulating supply of a token over time**

This query calculates the circulating supply of a token over time by summing the amount of tokens in circulation at each time interval.
Please be aware that this won't work for all tokens with non-standard transfer or minting/burning mechanisms. `tokens.transfers` includes fallback ERC4626 share mint and burn rows for supported vaults, but other custom token mechanics may still require token-specific logic.

```sql theme={null}
WITH tx AS (
    SELECT
        DATE_TRUNC('hour', evt_block_time) AS event_hour,
        value / 1e18 AS tokens_delta
    FROM erc20_ethereum.evt_transfer
    WHERE contract_address = 0x5bae9a5d67d1ca5b09b14c91935f635cfbf3b685
      AND "from" = 0x0000000000000000000000000000000000000000

    UNION ALL

    SELECT
        DATE_TRUNC('hour', evt_block_time) AS event_hour,
        -value / 1e18 AS tokens_delta
    FROM erc20_ethereum.evt_transfer
    WHERE contract_address = 0x5bae9a5d67d1ca5b09b14c91935f635cfbf3b685
      AND "to" = 0x0000000000000000000000000000000000000000
),
tx_hourly AS (
    SELECT
        event_hour,
        SUM(tokens_delta) AS net_tokens
    FROM tx
    GROUP BY event_hour
    ORDER BY event_hour DESC
)
SELECT
    event_hour,
    SUM(net_tokens) OVER (ORDER BY event_hour) AS circulating_supply
FROM tx_hourly
ORDER BY event_hour DESC;
```
