Background:

PotatoSwap adopts a contract design compatible with Uniswap V3 / PancakeSwap V3 and keeps the standard V3 ABI unchanged. Therefore, third-party dApps, wallets, and aggregators that are already integrated with V3 usually only need to replace the router and factory addresses to complete the integration.

Network

Contract Addresses

Recommendation:

In third-party applications, prioritize using the Router to perform token swaps. All trades, liquidity changes, and price updates are emitted by the Pool (V3 pool contracts), not the Router. When monitoring market data and trades, you should subscribe to the Pool’s Swap / Mint / Burn / Collect / Sync events for all fee-tier pools (100 / 500 / 3000 / 10000) of the target token pair.


1 - Router Swap (V3)

1.1 - Swap Interface

function exactInputSingle(ExactInputSingleParams calldata params)
external
payable
returns (uint256 amountOut);
// amountOut: the final amount of tokenOut sent to the recipient.

ExactInputSingleParams struct:

struct ExactInputSingleParams {
    address tokenIn;            // address of the input token
    address tokenOut;           // address of the output token
    uint24  fee;                // pool fee tier (100 / 500 / 3000 / 10000)
    address recipient;          // address to receive the output tokens
    uint256 deadline;           // transaction deadline (Unix timestamp in seconds)
    uint256 amountIn;           // exact amount of tokenIn to swap
    uint256 amountOutMinimum;   // minimum acceptable amountOut (slippage protection)
    uint160 sqrtPriceLimitX96;  // price limit. If nonzero, the swap will stop at the limit price in one direction. Set to 0 for no limit.
}

This call swaps an exact amountIn of tokenIn for as much tokenOut as possible in the pool with the specified fee, and requires that

amountOut ≥ amountOutMinimum.