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

# ERC20 Token Metadata

> Metadata like symbol, name, decimals, and contract address for ERC20 tokens across EVM networks.

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>
  </>;

The `tokens.erc20` table contains metadata for ERC20 tokens across all EVM-compatible networks indexed on Dune. This dataset provides essential information about ERC20 tokens, including:

* The blockchain on which the token exists
* The contract address of the token
* The token symbol
* The token name
* The number of decimals used by the token

### Coverage

This table covers tokens across all EVM chains on Dune. Tokens are automatically detected and included when they meet the following criteria:

* Have emitted ERC20 Transfer events
* Have at least 1 transfer recorded on-chain

New tokens meeting these criteria are added to the table within approximately 1 hour of detection.

### Data Sources

We use [Sim API](https://docs.sim.dune.com/evm/token-info) to retrieve token metadata for all qualifying contracts. For chains not supported on Sim API, we fall back to [DefinedFi](https://docs.defined.fi/reference/token) as our metadata provider.

Native tokens are also included in this dataset, using metadata information from `dune.blockchains`.

### Utility

The ERC20 metadata table offers valuable information for token analysis and integration, allowing you to:

* Identify tokens across different blockchains
* Retrieve essential token information for calculations and display

## Table Schema

| Column             | Type        | Description                                |
| ------------------ | ----------- | ------------------------------------------ |
| `blockchain`       | `VARCHAR`   | Blockchain on which the token exists       |
| `contract_address` | `VARBINARY` | Token contract address                     |
| `symbol`           | `VARCHAR`   | Token ticker symbol                        |
| `name`             | `VARCHAR`   | Full token name                            |
| `decimals`         | `INTEGER`   | Number of decimal places used by the token |
| `_updated_at`      | `TIMESTAMP` | When this record was last updated          |

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

## Sample Queries

**Query ERC20 tokens on a specific blockchain**

This query returns ERC20 tokens on the Ethereum blockchain:

```sql theme={null}
SELECT
    contract_address,
    symbol,
    decimals
FROM tokens.erc20
WHERE blockchain = 'ethereum'
LIMIT 100
```

**Find tokens with a specific symbol across blockchains**

This query finds all tokens with the symbol "USDC" across different blockchains:

```sql theme={null}
SELECT
    blockchain,
    contract_address,
    symbol,
    decimals
FROM tokens.erc20
WHERE symbol = 'USDC'
```

**List tokens with non-standard decimal places**

This query lists tokens that don't use the standard 18 decimal places:

```sql theme={null}
SELECT
    blockchain,
    contract_address,
    symbol,
    decimals
FROM tokens.erc20
WHERE decimals != 18
ORDER BY decimals DESC
LIMIT 50
```

**Count tokens by blockchain**

This query shows the distribution of tokens across different blockchains:

```sql theme={null}
SELECT
    blockchain,
    COUNT(*) as token_count
FROM tokens.erc20
GROUP BY blockchain
ORDER BY token_count DESC
```
