Skip to main content

Documentation

This page describes liquidity management in the current FewToken + Uniswap v4 integration environment. It should be read as integration guidance, not as documentation for a separate native Ring v4 AMM.

Structured reference
TOC available

Setup

This page describes liquidity management in the current FewToken + Uniswap v4 integration environment. It should be read as integration guidance, not as documentation for a separate native Ring v4 AMM.

For users looking to interact with the canonical v4 PositionManager, v4-periphery is a required dependency.

Currently, developing against this v4 integration stack requires foundry.

Quickstart

Use v4-template, which has pre-configured dependencies and tests for the v4 integration stack.

Clone the repository made from v4-template

git clone https://github.com/<your_username>/<your_repo>

Install dependencies

forge install

Manual Setup

After cloning the repository and installing foundry, developers can manually set up their v4 integration environment:

  1. Initialize a foundry project

    forge init . --force
  2. Install dependencies

    forge install Uniswap/v4-core
    forge install RingProtocol/v4-periphery
  3. Set the remappings.txt to:

    @uniswap/v4-core/=lib/v4-core/
    forge-gas-snapshot/=lib/v4-core/lib/forge-gas-snapshot/src/
    forge-std/=lib/v4-core/lib/forge-std/src/
    permit2/=lib/v4-periphery/lib/permit2/
    solmate/=lib/v4-core/lib/solmate/
    v4-periphery/=lib/v4-periphery/