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

# Fees

### Table Details

| Property | Value |
| - | - |
| Table Name | `scroll.dex.fees` |
| Table Status | Production-Ready |
| Unique Key | `block_timestamp`, `unique_id` |
| Clustering Key(s) | `block_timestamp::date` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| sector | VARCHAR(16777216) | The fee sector this row belongs to (`dex`, `lending`, `chain`, `liquid_staking`, ...). Every sector shares the same three fee layers; only the atomic grain and where fee info comes from change. |
| chain | VARCHAR(16777216) | Slug identifying the blockchain this record belongs to (e.g. `ethereum`, `base`, `avalanche`). In per-chain tables this is always the same value; in cross-chain tables it identifies the source chain. |
| project | VARCHAR(16777216) | Business name of the protocol being used (e.g. `uniswap`, `aave`, `lido`, `paraswap`). Consistent across verticals — every table with a `project` column uses this field for the top-level brand. |
| protocol | VARCHAR(16777216) | Specific version or variant of the protocol (e.g. `uniswap_v3`, `aave_v2`, `stargate_v2`). Qualifies the `project` field with version information. |
| liquidity\_pool\_address | VARCHAR(42) | Contract address of the liquidity pool where this trade was executed. Null when the routing path is not emitted by the event (common for aggregator trades). |
| factory\_address | VARCHAR(42) | Address of the factory contract that deployed this liquidity pool. Factory contracts create and track pool instances for a given protocol version. |
| token\_sold\_address | VARCHAR(42) | Contract address of the token sold (given) in this swap. |
| token\_sold\_symbol | VARCHAR(16777216) | Ticker symbol of the token sold in this swap. |
| token\_bought\_address | VARCHAR(42) | Contract address of the token bought (received) in this swap. |
| token\_bought\_symbol | VARCHAR(16777216) | Ticker symbol of the token bought in this swap. |
| usd\_amount | FLOAT | USD value of the token amount at the time of the event, computed using the hourly USD exchange rate. |
| pool\_fee | NUMBER(38,0) | The pool's fee parameter in raw pool-creation-event units. Divide by the registry's per-factory `fee_scale` for the fraction — units vary by fork (1e6 vs 1e4), so the raw value needs its factory. |
| fee\_rate | FLOAT | The pool's fee tier as a fraction (raw pool fee / registry `fee_scale`), e.g. 0.003 for a 0.3% pool. |
| fee\_usd | FLOAT | Fee paid on this swap in USD: `usd_amount` x `fee_rate`. What users pay, not what the protocol keeps. NULL when the pool is missing from the registry-pinned factories or the swap has no USD value. |
| take\_rate | FLOAT | Fraction of the fee accruing to the protocol, from the revenue registry. 0 is a confirmed zero protocol share (fee switch verified off), distinct from NULL, which means unconfirmed. |
| revenue\_usd | FLOAT | Protocol revenue accrued on this row in USD: `fee_usd` x `take_rate`. NULL when the take rate is unconfirmed, never silently 0. |
| supply\_side\_usd | FLOAT | The supply side's share of the fee in USD (liquidity providers for DEX): `fee_usd` minus `revenue_usd`. Most of the gap between fees and revenue lands here. |
| methodology | VARCHAR(16777216) | Slug of the fee derivation methodology, resolvable in `crosschain.metrics.fees_coverage_and_methodology` where the derivation and its citation are published. |
| sender\_address | VARCHAR(42) | Address that initiated the swap. |
| to\_address | VARCHAR(42) | Address that received in this event. For token transfers, the account whose balance increased. For transactions, the destination address (may be a smart contract). |
| transaction\_from\_address | VARCHAR(42) | Address of the externally-owned account (EOA) that signed and submitted the transaction. This is the wallet that paid gas, which may differ from the individual transfer's `from_address`. |
| transaction\_hash | VARCHAR(66) | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain. |
| log\_index | NUMBER(38,0) | Zero-based position of this event log within its transaction. The first log emitted by a transaction has index 0. |
| transaction\_index | NUMBER(38,0) | Zero-based position of the transaction within its block. The first transaction in a block has index 0. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the block that contains this record. |
| block\_number | NUMBER(38,0) | Sequential number of the block that contains this record. Starts at 0 (genesis block) and increments by 1 for each new block. |
| unique\_id | VARCHAR(16777216) | Allium's deterministic unique identifier for this row. Passes through 1:1 from `dex.trades`, so rows join back to the trade that produced them. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database. |

### Related Docs

* [EVM DEX Fees](/historical-data/supported-blockchains/evm/core-schemas/dex/fees)
