# Analytics

Biscotti's **Info** pages surface live protocol data — volume, TVL, pairs and
tokens — all indexed from the chain by open-source subgraphs.

## Info pages

| Page | What it shows |
| --- | --- |
| **Info → Overview** | Protocol-wide TVL, 24h/7d volume, top pairs and tokens |
| **Info → Pairs** | Per-pair volume, liquidity, fee APR and price charts |
| **Info → Tokens** | Per-token price, volume, liquidity across all pools |

Fee APRs shown on [Farms](/farms) and pool pages are derived from the same
data:

```
feeAPR = 24h fees × 365 / TVL
```

## Subgraphs

Two subgraphs index the protocol:

### `exchange-analytics-arc`

Indexes both AMMs — V3 pools and stable pools — into a unified schema:

* swaps, mints, burns and collects per pool
* hourly/daily aggregates for volume, fees and TVL
* token-level derived prices

Used by the Info pages, farm APRs and the pair/token detail charts.

### `trading-battles-arc`

Indexes eligible swaps for [Trading Battles](/trading-battles):

* per-wallet volume within each season window
* powers the live leaderboard and season finalization

## Querying yourself

Both subgraphs expose public GraphQL endpoints on
[The Graph](https://thegraph.com), each with an interactive playground you
can query straight from the browser — endpoints, playground links, schemas
and a set of tested queries (protocol TVL, top pools, token prices,
leaderboards) are in the [Subgraphs reference](/developers/subgraphs).
Example — top pools by TVL
([run it ↗](https://api.studio.thegraph.com/query/1754761/subgraph-exchange-analytics-arc/version/latest/graphql?query=%7B%20pools%28first%3A%205%2C%20orderBy%3A%20totalValueLockedUSD%2C%20orderDirection%3A%20desc%29%20%7B%20poolType%20token0%20%7B%20symbol%20%7D%20token1%20%7B%20symbol%20%7D%20totalValueLockedUSD%20volumeUSD%20%7D%20%7D)):

```graphql
{
  pools(first: 5, orderBy: totalValueLockedUSD, orderDirection: desc) {
    poolType            # "v3" | "stable"
    token0 { symbol }
    token1 { symbol }
    totalValueLockedUSD
    volumeUSD
  }
}
```

## On-chain data sources

If you prefer reading state directly:

| Data | Source |
| --- | --- |
| V3 pool state (price, liquidity, ticks) | `UniswapV3Pool.slot0()`, `TickLens` |
| Stable pool state (balances, virtual price) | `StableSwapPool`, `InfoStableSwap` |
| Farm emissions & stakes | `MasterChefERC20`, `MasterChefV3` (see [ABIs](/developers/abis)) |
| Batch reads | `UniswapInterfaceMulticall` |
