Summary
Add a get_v4_pool_analytics action that queries Uniswap V4 pool data including liquidity depth, volume, fee revenue, and active hooks, potentially via The Graph or direct on-chain reads.
Motivation
Before swapping or providing liquidity, agents need to understand pool conditions. Currently, the V4 provider can get quotes but cannot answer questions like:
- "What pools exist for ETH/USDC on V4?"
- "What is the TVL in this pool?"
- "Are there any hooks attached to this pool?"
- "What is the 24h volume?"
This is also related to issue #319 (The Graph integration for Uniswap) which has been open for 11+ months.
Proposed Actions
| Action |
Description |
get_v4_pool_info |
Get pool details (liquidity, current price, tick, fee, hook address) |
list_v4_pools |
Discover available V4 pools for a token pair |
get_v4_pool_analytics |
Get pool analytics (volume, TVL, fee revenue) via subgraph |
Implementation Options
Option A: Direct On-Chain Reads
- Read pool state from PoolManager's
getSlot0 and getLiquidity functions
- No external dependencies, but limited to current state (no historical data)
Option B: The Graph / Subgraph
Option C: Hybrid
- Use on-chain reads for current state (price, liquidity, hook)
- Use subgraph for historical analytics (volume, fees)
References
Summary
Add a
get_v4_pool_analyticsaction that queries Uniswap V4 pool data including liquidity depth, volume, fee revenue, and active hooks, potentially via The Graph or direct on-chain reads.Motivation
Before swapping or providing liquidity, agents need to understand pool conditions. Currently, the V4 provider can get quotes but cannot answer questions like:
This is also related to issue #319 (The Graph integration for Uniswap) which has been open for 11+ months.
Proposed Actions
get_v4_pool_infolist_v4_poolsget_v4_pool_analyticsImplementation Options
Option A: Direct On-Chain Reads
getSlot0andgetLiquidityfunctionsOption B: The Graph / Subgraph
Option C: Hybrid
References