Summary
Add liquidity management actions to the Uniswap V4 action provider, enabling agents to mint, increase, decrease, and collect fees from V4 liquidity positions via the PositionManager contract.
Motivation
The current V4 provider (PR #951) only supports swaps and quotes. Liquidity provision is a core DeFi primitive and the PositionManager address is already stored in our constants. Adding LP management would make the V4 provider feature-complete.
Proposed Actions
| Action |
Description |
add_v4_liquidity |
Mint a new liquidity position with specified price range and amounts |
increase_v4_liquidity |
Add more liquidity to an existing position |
decrease_v4_liquidity |
Remove liquidity from an existing position |
collect_v4_fees |
Collect accumulated swap fees from a position |
get_v4_position |
Query details of an existing position (liquidity, fees owed, price range) |
Implementation Notes
- Uses the PositionManager contract (already in constants)
- Positions are ERC721 NFTs (same as V3 but through new PositionManager)
- Need to handle tick math for price range specification
- Agent should help users select appropriate price ranges based on current pool price
- Support both native ETH and ERC20 token pairs
Dependencies
References
Summary
Add liquidity management actions to the Uniswap V4 action provider, enabling agents to mint, increase, decrease, and collect fees from V4 liquidity positions via the PositionManager contract.
Motivation
The current V4 provider (PR #951) only supports swaps and quotes. Liquidity provision is a core DeFi primitive and the PositionManager address is already stored in our constants. Adding LP management would make the V4 provider feature-complete.
Proposed Actions
add_v4_liquidityincrease_v4_liquiditydecrease_v4_liquiditycollect_v4_feesget_v4_positionImplementation Notes
Dependencies
References