Dex Liquidity
The polygon.dex_liquidity table provides indexed views of all DEX liquidity for the chain. All DEX liquidity tables follows the same database schema presented below.
Columns
| Name | Type | Description |
|---|---|---|
| block_number | integer |
The block number at which the event occurred. |
| category | text |
The category of the event, one of (deposit, withdraw, or swap). |
| contract_address | text |
The contract address of the DEX pool. |
| contract_version | text |
The version of the exchange contract interacted with (e.g. v1 or v2). |
| exchange_name | text |
The name of the exchange that facilitated the event. |
| liquidity | numeric |
The total pool liquidity between the tick range post transaction (only Uniswap V3 and Kyber V3). |
| liquidity_delta | numeric |
The change in the liquidity in the tick range (only Uniswap V3 and Kyber V3). |
| log_index | integer |
The log index at which the event occurred. |
| lp_address | text |
The address of the liquidity provider (null for swap events). |
| pool_balance | numeric |
The DEX Pool's balance of token_address |
| position_id | integer |
Unique position NFT ID for the tick range (only Uniswap V3 and Kyber V3). |
| position_liquidity | numeric |
The total position liquidity for position_id post transaction (only Uniswap V3 and Kyber V3). |
| quantity | numeric |
The quantity of the token_address (negative for withdrawals, swaps out). |
| sender_address | text |
The address that initiated the event. |
| tick_lower | numeric |
The bottom of the tick range (only Uniswap V3 and Kyber V3). |
| tick_upper | numeric |
The top of the tick range (only Uniswap V3 and Kyber V3). |
| timestamp | timestamp without time zone |
The timestamp at which the event occurred. |
| token_address | text |
The token address whose pool balance was affected in the liquidity event. |
| transaction_hash | text |
The transaction hash at which the event occurred. |
| __block_number | integer |
The last block number in the batch that the data was updated in. |
| __confirmed | boolean |
Flag indicating whether the transfer has been confirmed. |
Supported Protocols
| Protocol | |||
|---|---|---|---|
| acy-v1 | apeswap-v2 | apeswap-v3 | balancer-v2 |
| balancer-v2-forks | boltr-v1 | cafeswap-v1 | cometh-v1 |
| cometh-v2 | curve-lending | curve-metapool | curve-v1 |
| curve-v2 | dfyn-v1 | dfyn-v2 | dodoswap-private |
| dodoswap-stable | dodoswap-v1 | dodoswap-v2 | elkswap-v1 |
| elkswap-v2 | fraxswap-v1 | fraxswap-v2 | gravis-v1 |
| gravity-v1 | gravity-v2 | honeyswap-v1 | honeyswap-v2 |
| idex-v1 | jetswap-v1 | jetswap-v2 | kakidex-v1 |
| kryptodex-v1 | kyber-elastic | kyber-v2 | kyber-v3 |
| magician-v1 | magician-v2 | meshswap-v1 | mmfinance-v1 |
| mmfinance-v2 | oboswap-v1 | pearzap-v1 | polycat-v1 |
| polycat-v2 | quickswap-v1 | quickswap-v2 | quickswap-v3 |
| radioshack-v1 | solidly-v1-forks | stableworld-v1 | sushiswap-v1 |
| sushiswap-v2 | sushiswap-v3 | synapse-v1 | tetuswap-v1 |
| unifi-v1 | uniswap-v2-forks | uniswap-v3 | uniswap-v3-forks |
| vulcanswap-v1 | wault-finance-v1 |
Indexes
| Index |
|---|
| contract_address, token_address, block_number, log_index |
| __indexer_id, __block_number |
| __indexer_id WHERE __confirmed = false |
| transaction_hash, log_index |
| timestamp, log_index |
| token_address, timestamp, log_index |
| contract_address, timestamp, log_index |
| token_address, contract_address, timestamp, log_index |
| lp_address, timestamp, log_index |
| lp_address, token_address, timestamp, log_index |
| lp_address, contract_address, timestamp, log_index |
| exchange_name, timestamp, log_index |
| exchange_name, contract_version, timestamp, log_index |
| contract_address, position_id, timestamp, log_index |
| position_id, timestamp, log_index |
Got questions? Join our Discord
Discord is the primary home of the Transpose developer community. Join us to ask questions, share your work, and get help.