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

# Avalanche

> Avalanche Schema Description and Methodology

This schema contains comprehensive datasets for tracking Avalanche fundamental data across multiple metrics categories, including network activity, fees, staking, stablecoin usage, bridge activity, developer engagement, and market data.

## Available Tables

Avalanche data is available in several tables:

* **ez\_metrics**: Main aggregated metrics for the Avalanche network
* **ez\_metrics\_by\_category\_v2**: Metrics broken down by transaction category
* **ez\_metrics\_by\_application\_v2**: Metrics broken down by application
* **ez\_metrics\_by\_subcategory**: Metrics broken down by subcategory
* **ez\_metrics\_by\_contract\_v2**: Metrics broken down by contract
* **ez\_metrics\_by\_chain**: Cross-chain flow metrics with inflow and outflow data

## Table Schema

### Network and Usage Metrics

| Table Name  | Column Name             | Description                                  |
| ----------- | ----------------------- | -------------------------------------------- |
| ez\_metrics | chain\_txns             | Daily transactions on the Avalanche network  |
| ez\_metrics | chain\_dau              | Daily unique users on Avalanche              |
| ez\_metrics | chain\_wau              | Weekly unique users on Avalanche             |
| ez\_metrics | chain\_mau              | Monthly unique users on Avalanche            |
| ez\_metrics | chain\_avg\_txn\_fee    | The average transaction fee on Avalanche     |
| ez\_metrics | chain\_median\_txn\_fee | The median transaction fee on Avalanche      |
| ez\_metrics | returning\_users        | The number of returning users on Avalanche   |
| ez\_metrics | new\_users              | The number of new users on Avalanche         |
| ez\_metrics | dau\_over\_100\_balance | The number of users with balances over \$100 |

### User Classification Metrics

| Table Name  | Column Name        | Description                                             |
| ----------- | ------------------ | ------------------------------------------------------- |
| ez\_metrics | sybil\_users       | The number of sybil users (suspected bots) on Avalanche |
| ez\_metrics | non\_sybil\_users  | The number of non-sybil users on Avalanche              |
| ez\_metrics | low\_sleep\_users  | Users with continuous activity (possible bots)          |
| ez\_metrics | high\_sleep\_users | Users with normal activity patterns (likely humans)     |

### Fee and Revenue Metrics

| Table Name  | Column Name                     | Description                                           |
| ----------- | ------------------------------- | ----------------------------------------------------- |
| ez\_metrics | chain\_fees                     | The total transaction fees paid on Avalanche (in USD) |
| ez\_metrics | fees                            | Total revenue generated (same as chain\_fees)         |
| ez\_metrics | fees\_native                    | The total native AVAX value from all user-paid fees   |
| ez\_metrics | burned\_fee\_allocation         | USD value of AVAX burned through transaction fees     |
| ez\_metrics | burned\_fee\_allocation\_native | Amount of native AVAX burned through transaction fees |
| ez\_metrics | fees                            | Legacy naming for chain\_fees                         |
| ez\_metrics | fees\_native                    | Transaction fees in native AVAX tokens                |
| ez\_metrics | revenue                         | Legacy naming for burned\_fee\_allocation             |
| ez\_metrics | revenue\_native                 | Legacy naming for burned\_fee\_allocation\_native     |

### Volume and Trading Metrics

| Table Name  | Column Name                 | Description                                   |
| ----------- | --------------------------- | --------------------------------------------- |
| ez\_metrics | chain\_spot\_volume         | Total spot DEX volume on Avalanche            |
| ez\_metrics | chain\_nft\_trading\_volume | The total volume of NFT trading on Avalanche  |
| ez\_metrics | settlement\_volume          | Total volume of DEX + NFT + P2P transfers     |
| ez\_metrics | dex\_volumes                | Legacy naming for chain\_spot\_volume         |
| ez\_metrics | nft\_trading\_volume        | Legacy naming for chain\_nft\_trading\_volume |

### P2P Transfer Metrics

| Table Name  | Column Name                   | Description                                       |
| ----------- | ----------------------------- | ------------------------------------------------- |
| ez\_metrics | p2p\_native\_transfer\_volume | Volume of AVAX transfers directly between wallets |
| ez\_metrics | p2p\_token\_transfer\_volume  | Volume of ERC-20 token transfers between wallets  |
| ez\_metrics | p2p\_transfer\_volume         | Total volume of all P2P transfers                 |

### Staking Metrics

| Table Name  | Column Name           | Description                             |
| ----------- | --------------------- | --------------------------------------- |
| ez\_metrics | total\_staked         | The total USD value staked on Avalanche |
| ez\_metrics | total\_staked\_native | The total amount of native AVAX staked  |
| ez\_metrics | total\_staked\_usd    | Legacy naming for total\_staked         |

### Stablecoin Metrics

| Table Name  | Column Name                            | Description                                                    |
| ----------- | -------------------------------------- | -------------------------------------------------------------- |
| ez\_metrics | stablecoin\_total\_supply              | The total supply of stablecoins on Avalanche                   |
| ez\_metrics | stablecoin\_txns                       | The number of stablecoin transactions                          |
| ez\_metrics | stablecoin\_dau                        | Daily active users of stablecoins                              |
| ez\_metrics | stablecoin\_mau                        | Monthly active users of stablecoins                            |
| ez\_metrics | stablecoin\_transfer\_volume           | The total volume of stablecoin transfers                       |
| ez\_metrics | stablecoin\_tokenholder\_count         | The number of unique stablecoin tokenholders                   |
| ez\_metrics | artemis\_stablecoin\_txns              | Stablecoin transactions excluding MEV transactions             |
| ez\_metrics | artemis\_stablecoin\_dau               | Daily users excluding MEV addresses                            |
| ez\_metrics | artemis\_stablecoin\_mau               | Monthly users excluding MEV addresses                          |
| ez\_metrics | artemis\_stablecoin\_transfer\_volume  | Stablecoin volume excluding MEV transactions                   |
| ez\_metrics | p2p\_stablecoin\_txns                  | P2P stablecoin transactions (wallet-to-wallet)                 |
| ez\_metrics | p2p\_stablecoin\_dau                   | Daily users of P2P stablecoin transfers                        |
| ez\_metrics | p2p\_stablecoin\_mau                   | Monthly users of P2P stablecoin transfers                      |
| ez\_metrics | p2p\_stablecoin\_transfer\_volume      | Volume of P2P stablecoin transfers                             |
| ez\_metrics | p2p\_stablecoin\_tokenholder\_count    | Unique holders conducting P2P transfers                        |
| ez\_metrics | non\_p2p\_stablecoin\_transfer\_volume | Volume of non-P2P stablecoin transfers (contract interactions) |

### Bridge Metrics

| Table Name  | Column Name    | Description                                |
| ----------- | -------------- | ------------------------------------------ |
| ez\_metrics | bridge\_volume | The total volume bridged to/from Avalanche |
| ez\_metrics | bridge\_daa    | Daily active users of Avalanche bridges    |

### Tokenomics Metrics

| Table Name  | Column Name       | Description                           |
| ----------- | ----------------- | ------------------------------------- |
| ez\_metrics | emissions\_native | The amount of new AVAX tokens emitted |
| ez\_metrics | issuance          | Legacy naming for emissions\_native   |

### Developer Activity Metrics

| Table Name  | Column Name                         | Description                                           |
| ----------- | ----------------------------------- | ----------------------------------------------------- |
| ez\_metrics | weekly\_commits\_core\_ecosystem    | Commits to the Avalanche core ecosystem repositories  |
| ez\_metrics | weekly\_commits\_sub\_ecosystem     | Commits to Avalanche sub-ecosystem repositories       |
| ez\_metrics | weekly\_developers\_core\_ecosystem | Developers contributing to core repositories          |
| ez\_metrics | weekly\_developers\_sub\_ecosystem  | Developers contributing to sub-ecosystem repositories |
| ez\_metrics | weekly\_contracts\_deployed         | The number of new contracts deployed on Avalanche     |
| ez\_metrics | weekly\_contract\_deployers         | The number of addresses deploying contracts           |

### Market and Token Metrics

| Table Name  | Column Name | Description                                       |
| ----------- | ----------- | ------------------------------------------------- |
| ez\_metrics | price       | The price of AVAX token in USD                    |
| ez\_metrics | market\_cap | The market cap of AVAX token in USD               |
| ez\_metrics | fdmc        | The fully diluted market cap of AVAX token in USD |
| ez\_metrics | tvl         | The total value locked in Avalanche protocols     |

## Sample Queries

### Basic Network Activity Query

```sql theme={null}
-- Pull fundamental network activity data for Avalanche
SELECT
    date,
    chain_txns,
    chain_dau,
    chain_fees,
    chain_avg_txn_fee,
    chain_median_txn_fee,
    price
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC
```

### Fee and Revenue Analysis

```sql theme={null}
-- Analyze Avalanche fee metrics
SELECT
    date,
    chain_fees,
    fees,
    burned_fee_allocation,
    chain_txns,
    chain_fees / chain_txns as fee_per_transaction,
    chain_avg_txn_fee,
    chain_median_txn_fee
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC
```

### Staking Analysis

```sql theme={null}
-- Analyze Avalanche staking metrics
SELECT
    date,
    total_staked,
    total_staked_native,
    price,
    market_cap,
    total_staked / market_cap * 100 as staking_ratio,
    emissions_native,
    emissions_native / total_staked_native * 365 * 100 as annualized_yield
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC
```

### User Analysis

```sql theme={null}
-- Analyze different user types on Avalanche
SELECT
    date,
    chain_dau,
    new_users,
    returning_users,
    sybil_users,
    non_sybil_users,
    low_sleep_users,
    high_sleep_users,
    dau_over_100_balance,
    non_sybil_users / NULLIF(chain_dau, 0) * 100 as non_sybil_percentage
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -2, CURRENT_DATE())
ORDER BY
    date ASC
```

### Volume Analysis

```sql theme={null}
-- Analyze different volume sources on Avalanche
SELECT
    date,
    settlement_volume,
    chain_spot_volume,
    chain_nft_trading_volume,
    p2p_transfer_volume,
    p2p_native_transfer_volume,
    p2p_token_transfer_volume,
    stablecoin_transfer_volume,
    chain_spot_volume / NULLIF(settlement_volume, 0) * 100 as dex_percentage
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -1, CURRENT_DATE())
ORDER BY
    date ASC
```

### Stablecoin Analysis

```sql theme={null}
-- Track stablecoin usage on Avalanche
SELECT
    date,
    stablecoin_total_supply,
    stablecoin_dau,
    artemis_stablecoin_dau,
    p2p_stablecoin_dau,
    stablecoin_transfer_volume,
    p2p_stablecoin_transfer_volume,
    non_p2p_stablecoin_transfer_volume,
    p2p_stablecoin_transfer_volume / NULLIF(stablecoin_transfer_volume, 0) * 100 as p2p_percentage
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -2, CURRENT_DATE())
ORDER BY
    date ASC
```

### Bridge Activity Analysis

```sql theme={null}
-- Track bridge activity on Avalanche
SELECT
    date,
    bridge_volume,
    bridge_daa as bridge_dau,
    bridge_volume / NULLIF(bridge_daa, 0) as avg_bridge_volume_per_user,
    chain_dau,
    bridge_daa / NULLIF(chain_dau, 0) * 100 as bridging_user_percentage
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC
```

### Developer Activity Monitoring

```sql theme={null}
-- Track developer activity on Avalanche
SELECT
    date,
    weekly_contracts_deployed,
    weekly_contract_deployers,
    weekly_commits_core_ecosystem,
    weekly_commits_sub_ecosystem,
    weekly_developers_core_ecosystem,
    weekly_developers_sub_ecosystem,
    weekly_contracts_deployed / NULLIF(weekly_contract_deployers, 0) as avg_contracts_per_deployer
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -6, CURRENT_DATE())
ORDER BY
    date ASC
```

### Tokenomics Analysis

```sql theme={null}
-- Analyze Avalanche tokenomics
SELECT
    date,
    emissions_native,
    burned_fee_allocation_native,
    emissions_native - burned_fee_allocation_native as net_daily_supply_change,
    price,
    (emissions_native - burned_fee_allocation_native) * price as net_daily_supply_change_usd,
    emissions_native / NULLIF(total_staked_native, 0) * 365 * 100 as annualized_emission_rate
FROM
    art_share.avalanche.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC
```

### Application-specific Analysis

```sql theme={null}
-- Analyze metrics for specific applications on Avalanche
SELECT
    date,
    app,
    friendly_name,
    category,
    txns,
    dau,
    returning_users,
    new_users
FROM
    art_share.avalanche.ez_metrics_by_application_v2
WHERE
    date >= DATEADD(month, -2, CURRENT_DATE())
    AND app IN ('trader-joe', 'aave-v3', 'gmx')
ORDER BY
    app, date ASC
```

### Cross-chain Flow Analysis

```sql theme={null}
-- Analyze cross-chain flows to and from Avalanche
SELECT
    date,
    inflow,
    outflow,
    inflow - outflow as net_flow,
    SUM(inflow - outflow) OVER (ORDER BY date) as cumulative_net_flow
FROM
    art_share.avalanche.ez_metrics_by_chain
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC
```
