Liquidity Snapshots
Availability
This collection is available for the Ethereum, Polygon, Arbitrum, and Base.
eu-west-1
defi_liquidity_snapshots_ethereum_mainnet_v1
defi_liquidity_snapshots_polygon_mainnet_v1
defi_liquidity_snapshots_arbitrum_mainnet_v1
defi_liquidity_snapshots_base_mainnet_v1
Methodology
The table is built by the following process:
Identify all liquidity events emitted by supported DEX pools in a block
Call the
balanceOf
method for each pair of (pool, ERC-20)
We currently support the following DEXes:
Uniswap V2
Uniswap V3
Curve
We extract data from any contract compatible with one of the above DEXes ABI.
It means that any DEXes that forked or tried to be compatible at the ABI level with these contracts will be indexed automatically.
Table Schema
chain_name
string
Name of the chain (ethereum
, arbitrum
, polygon
, ...).
chain_network_name
string
name of the network (mainnet
).
block_hash
string
Block hash encoded as binary string
block_number
uint64
Block height
transaction_index
uint64
The index of the transaction in the block
timestamp
datetime
UNIX timestamp for when the block was collated
decoder_name
string
The internal name of the decoder used to decode this trade (uniswap_v2_liquidity_event, curve_liquidity_event)
factory
string
The address of the DEX factory contract (if any)
contract
string
The address of the DEX pair/pool
raw_amounts
map(string, uint256)
A map of token amounts held by the pool
amounts
map(string, float64)
A map of token amounts held by the pool. The amount of tokens are divided by pow(10,
decimals
)
where decimals is the number of decimals declared by the token (USDT has 6 decimals)
Usage
The query below makes use of the defi_liquidity_snapshots_ethereum_mainnet_v1
to chart the daily average of liquidity for each token of the famous Curve 3Pool (0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7).
Last updated