Overview
- Dataset ID:
0303 - Table:
blockdb_evm.b0303_liquidity_pools_swap_fees_v1 - Description: Per-swap fee accounting: executed swap sizes plus computed fee amounts using the pool’s fee terms (
blockdb_evm.b0212_liquidity_pools_fee_terms_v1). - Primary Key:
id - API: POST /evm/swaps/fees
- Sample: Hugging Face Sample
Columns
| Column | Type | Description |
|---|---|---|
chain_id | BIGINT | EVM chain identifier; see Chain. |
id | BIGINT | Surrogate identity for the swap-fee record (auto-incremented). |
pool_uid | BYTEA | Pool identifier (internal). Join to pool metadata and fee terms. |
exchange_id | INTEGER | Exchange/DEX identifier. |
type_id | INTEGER | Pool type identifier (FK to liquidity_pool_types). |
block_number | BIGINT | Block height where the swap was observed. |
block_time | TIMESTAMPTZ | UTC timestamp of the block containing the swap event. |
tx_index | INTEGER | Transaction index within the block. |
log_index | INTEGER | Log index within the transaction. |
token_in | BYTEA | 20-byte address of the input token (direction of swap). |
token_out | BYTEA | 20-byte address of the output token (direction of swap). |
fee_token | BYTEA | 20-byte token address the fee is denominated in (must equal token_in or token_out). |
amount_in | NUMERIC(78,18) | Executed input amount (decimals-adjusted). |
amount_out | NUMERIC(78,18) | Executed output amount (decimals-adjusted). |
fee_amount_total | NUMERIC(78,18) | Total fee amount in fee_token units (decimals-adjusted). |
fee_amount_user | NUMERIC(78,18) | User/LP share of fees in fee_token units (nullable). |
fee_amount_protocol | NUMERIC(78,18) | Protocol share of fees in fee_token units (nullable). |
fee_amount_extra | NUMERIC(78,18) | Extra destination share of fees in fee_token units (nullable). |
_tracing_id | BYTEA | Deterministic BlockDB lineage identifier for the swap-fee record. |
_parent_tracing_ids | BYTEA[] | Tracing IDs for upstream derived records referenced during computation (e.g., fee terms). |
_created_at | TIMESTAMPTZ | Record creation timestamp. |
_updated_at | TIMESTAMPTZ | Record update timestamp. |
Use Cases
- Pool revenue attribution (LP vs protocol vs extra destinations)
- Backtesting fee-sensitive execution and routing strategies
- Inputs to pool yield/ROI modeling (feeds
blockdb_evm.b0411_liquidity_pools_yields_v1) - Monitoring fee regime changes and their downstream impacts
Related Datasets
Liquidity Pools
Pool registry for the fee-generating venues.
Liquidity Pools Yields
Yield windows computed from these swap fees.
Swap Prints
Per-swap price observations from the same events.