Just-in-Time (JIT) Liquidity Events
Fetch Uniswap V3 JIT Liquidity events with 1 line of code.
The Just-in-Time (JIT) liquidity events table contains DEX events from Uniswap V3 protocol for each JIT event.
JIT liquidity refers to the practice where liquidity is added and removed within the same block to capture trading fees and/or exploit arbitrage opportunities.
Each JIT event includes the following sequence of event
User A Minting LP
User B Swapping
User A Burning LP
Sample Query
Finding the volume of swaps on Uniswap V3 that were caught in between JIT swaps by liquidity pools.
Methodology
We use the dex.uniswap_v3_events
table to construct this table. This table contains all log events emitted from UniswapV3 protocol liquidity pools.
We first identify the JIT events within the same block must meet the following criteria:
Minting and Burning of LP within the same block.
Occur within the same liquidity pool (
mint.liquidity_pool_address = burn.liquidity_pool_address
).Are initiated by the same user (
mint.transaction_from_address = burn.transaction_from_address
).Have the
burn
event occurring after themint
event (mint.transaction_index < burn.transaction_index
).
We then identify swaps that occur within the JIT mint + burn event with the following criteria:
The JIT swap event should be performed within the same block as the burn-mint event
Occur within the same liquidity pool
Occur between the mint and burn JIT
Exclusion of Outliers: This model excludes liquidity provision from rebalancing contracts by Popsicle Finance.
Table Columns
Column Name | Description | Example |
---|---|---|
block_number | Block number in which the JIT event occurred. | 16845762 |
block_timestamp | Timestamp of the block when the JIT event occurred. | 2023-03-17 06:29:47.000 |
project | UniswapV3 dex project | uniswap |
signer | Address of the user initiating the transaction. | 0xdd8ef55055e01d39cb87571bd38c43ab9b5903a5 |
liquidity_pool_address | Address of the liquidity pool involved in the JIT event. | 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 |
pool_name | Name of the pool. | Uniswap: USDC-WETH 500 |
jit_action | Description of the JIT action. | mint -> burn |
token0_address | Address of token0. | 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 |
token0_symbol | Symbol of token0. | USDC |
token0_amount_mint | Amount of token0 minted. | 2345520.462846 |
token0_amount_burn | Amount of token0 burned. | 2629536.315217 |
token0_delta | Net change in token0 amount. | 284015.852371 |
token0_delta_usd | Net change in token0 amount in USD. | 283192.206399124 |
token1_address | Address of token1. | 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 |
token1_symbol | Symbol of token1. | WETH |
token1_amount_mint | Amount of token1 minted. | 1234.538399303 |
token1_amount_burn | Amount of token1 burned. | 1068.503695417 |
token1_delta | Net change in token1 amount. | -166.034703886 |
token1_price_usd | Price of token1 in USD. | 1703.27 |
token1_delta_usd | Net change in token1 amount in USD. | -282801.930088262 |
jit_swaps | Details of swaps occurring between mint and burn events. | [{"event": "swap", "sqrt_price_x96": "1915582285665375426460731590612584", "swapper": "0x477ec82595da308c9d11a096766f391422c8a617", "tick": 201874, "transaction_hash": "0xb3506dba6b6f6a28c6b5e0f9d641ac8e20ff2d14784cf29fcd23921209b02c0e", "transaction_index": 1, "usd_amount": 306517.6173650786}] |
jit_swap_volume_usd | Total volume in USD of the swaps. | 306517.617365079 |
jit_swap_count | Number of swaps between mint and burn events. | 1 |
liquidity_mint | Liquidity provided during the mint event. | 215578968583683921381 |
tick_lower_mint | Lower tick boundary for the mint event. | 201870 |
tick_upper_mint | Upper tick boundary for the mint event. | 201880 |
liquidity_burn | Liquidity removed during the burn event. | 215578968583683921381 |
tick_lower_burn | Lower tick boundary for the burn event. | 201870 |
tick_upper_burn | Upper tick boundary for the burn event. | 201880 |
transaction_hash_mint | Transaction hash for the mint event. | 0x7a4cd6098168f3ada3e93b67c3ccee07f38c2f564b385d6ef00e8fa7a86eae64 |
transaction_index_mint | Transaction index for the mint event. | 0 |
log_index_mint | Log index for the mint event. | 4 |
txn_fees_mint | Transaction fees for the mint event. | 0.007637103865 |
txn_fees_usd_mint | Transaction fees in USD for the mint event. | 13.0080499 |
transaction_hash_burn | Transaction hash for the burn event. | 0x375394dc79f55b166041ccc0bb2560cfc58a1499a095bdce23470c21f7891de6 |
transaction_index_burn | Transaction index for the burn event. | 2 |
log_index_burn | Log index for the burn event. | 24 |
txn_fees_burn | Transaction fees for the burn event. | 0.003859862509 |
txn_fees_usd_burn | Transaction fees in USD for the burn event. | 6.574388015 |
Last updated