Skip to content

feat: Add Uniswap V4 liquidity management actions #955

@guglxni

Description

@guglxni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions