Overview
The avalanche.dex.events
table provides a clean, protocol-agnostic schema for DEX liquidity events on Avalanche. This unified approach allows you to analyze liquidity patterns across different DEX protocols using consistent semantics.
Purpose: One clean, protocol/chain agnostic schema for DEX liquidity events.Design:
- Protocol-agnostic core
- Event-agnostic semantics
- Ownership is normalized through LP unit
- Event-specific bits go in
event_details
(variant)
- Liquidity specific details goes in
liquidity_details
(variant)
Event set (v1): initialize_pool | add_liquidity | remove_liquidity | swap_tokens
This table is in active development and currently available for Avalanche only.
Table Columns
Column | Type | Example | Description |
---|
chain | STRING | avalanche | The blockchain name |
protocol | STRING | uniswap_v3 | The DEX protocol identifier |
project | STRING | uniswap | The project name |
event_name | STRING | add_liquidity | event verb_noun taxonomy |
transaction_hash | STRING | 0x… | Transaction hash |
log_index | NUMBER | 12 | Log index within transaction |
block_timestamp | TIMESTAMP_NTZ | 2025-09-12T12:34:56Z | Block timestamp |
block_number | NUMBER | 397… | Block number |
transaction_from_address | STRING | 0x… | Transaction sender |
transaction_to_address | STRING | 0x… | Transaction recipient |
Protocol Examples
Uniswap V2 Family
Protocols: Uniswap V2, Pangolin V2, Pharaoh, Blackhole
Event | unit_type | id (VARIANT) | liquidity_details (VARIANT) | event_details (VARIANT) | Source |
---|
initialize_pool | erc20 | {pair_address:"0x"} | {kind:"pool_wide", lp_unit:"erc20"} | {scope:"pool", lp_factory_address:"0x…", source_event:"PairCreated"} | Factory PairCreated or Pool first Sync |
add_liquidity | erc20 | {pair_address:"0x"} | {kind:"pool_wide", lp_unit:"erc20"} | {scope:"pool", lp_factory_address:"0x…", source_event:"Mint"} | Pool Mint |
remove_liquidity | erc20 | {pair_address:"0x"} | {kind:"pool_wide", lp_unit:"erc20"} | {scope:"pool", lp_factory_address:"0x…", source_event:"Burn"} | Pool Burn |
Uniswap V3 Family (CLMM)
Protocols: Uniswap V3, Pangolin V3
Event | unit_type | id (VARIANT) | liquidity_details (VARIANT) | event_details (VARIANT) | Source |
---|
initialize_pool | erc721 | — | {kind:"tick_range", tick_spacing:10} | {scope:"pool", lp_factory_address:"0x…", source_event:"Initialize", tick:-1, sqrt_price_x96:"…"} | Pool Initialize |
add_liquidity | erc721 | {position_manager:"0xPM", token_id:12345} | {kind:"tick_range", tick_spacing:10, tick_lower:-887220, tick_upper:-887110} | {scope:"position", lp_factory_address:"0x…", source_event:"Mint"} | Pool Mint |
remove_liquidity | erc721 | {position_manager:"0xPM", token_id:12345} | {kind:"tick_range", tick_spacing:10, tick_lower:-887220, tick_upper:-887110} | {scope:"position", lp_factory_address:"0x…", source_event:"Burn"} | Pool Burn |
swap_tokens | erc721 | {position_manager:"0xPM", token_id:12345} | {kind:"tick_range", tick_spacing:10 } | {scope:"pool", lp_factory_address:"0x…", source_event:"Swap", tick:-1, sqrt_price_x96:"…"} | Pool Swap |
Trader Joe Liquidity Book (LB)
Protocols: Trader Joe LB v2/2.1/2.2
Event | unit_type | id (VARIANT) | liquidity_details (VARIANT) | event_details (VARIANT) | Source |
---|
initialize_pool | erc1155 | — | {kind:"bin", bin_step_bps:25, bin_id:8389407} | {scope:"pool", lb_factory_address:"0x…", source_event:"LBPairCreated", interface_id:"0x…"} | Factory LBPairCreated |
add_liquidity | erc1155 | {pair_address:"0xLB", bin_id:8389407} | {kind:"bin", bin_step_bps:25, bin_id:8389407} | {scope:"position", lb_factory_address:"0x…", source_event:"DepositedToBins", interface_id:"0x…"} | LBPair DepositedToBins |
remove_liquidity | erc1155 | {pair_address:"0xLB", bin_id:8389407} | {kind:"bin", bin_step_bps:25, bin_id:8389407} | {scope:"position", lb_factory_address:"0x…", source_event:"WithdrawnFromBins", interface_id:"0x…"} | LBPair WithdrawnFromBins |
Notes
- Protocol Coverage: Currently supports Uniswap V2/V3, Blackhole, Pangolin V2/V3, Pharaoh, Trader Joe LB, and other major Avalanche DEX protocols
- USD Values: USD amounts are calculated using token prices at the time of the event
- Event Scope:
position
for individual positions, pool
for pool-wide events
Use Cases
- Track liquidity provision and removal patterns across protocols
- Monitor individual LP positions and their performance
- Compare liquidity patterns between different DEX protocols
- Analyze concentration and distribution of liquidity
- Build comprehensive DEX analytics dashboards