Skip to main content

PrimeSwap V3 DEX

PrimeSwap V3 is a concentrated liquidity DEX on Mersennet, built on the Uniswap V3 protocol. It enables capital-efficient liquidity positions with custom price ranges and multiple fee tiers—giving liquidity providers fine-grained control over where their capital is deployed.

Overview

FeaturePrimeSwap V3
ArchitectureUniswap V3 fork
LiquidityConcentrated (custom price ranges)
Fee Tiers0.05%, 0.3%, 1%
Position TypeNFT-based (ERC-721)
ChainMersennet Testnet (Chain ID 7919)
Frontendhttp://46.225.30.187:4002

V3 vs V2

FeaturePrimeSwap V2PrimeSwap V3
Liquidity ModelFull range (x × y = k)Concentrated (custom ranges)
Capital EfficiencyUp to 4000× for narrow ranges
Fee Tiers0.3% only0.05%, 0.3%, 1%
Position RepresentationFungible LP tokens (ERC-20)Non-fungible positions (ERC-721 NFT)
Best ForSimple swaps, passive LPsActive LPs, stablecoin pairs, advanced strategies

Key Concepts

Concentrated Liquidity

Unlike V2 where liquidity is spread across the entire price curve (0 to ∞), V3 lets LPs choose a specific price range. Liquidity is only active when the current price is within that range, resulting in higher fee earnings per unit of capital.

Fee Tiers

Each pool is created with one of three fee tiers, allowing the market to express different risk profiles:

Fee TierBest ForExample Pairs
0.05%Stable pairs with minimal price movementUSDC/USDT, USDC/DAI
0.3%Standard volatile pairsWPRIM/USDC, WPRIM/USDT
1%Exotic or high-volatility pairsNew tokens, low-liquidity assets

NFT Position Management

Each liquidity position is represented as an ERC-721 NFT, managed through the NonfungiblePositionManager contract. The NFT encodes the pool, price range (tick bounds), and liquidity amount.

Core Contracts

ContractPurpose
UniswapV3FactoryCreates and tracks V3 pools with fee tier configuration
SwapRouterUser-facing swap execution across V3 pools
NonfungiblePositionManagerMint, modify, and burn concentrated liquidity positions (NFTs)
QuoterOff-chain quote simulation for swap amounts
info

V3 contract addresses are listed on the Ecosystem Directory and Deployed Contracts pages.

Adding Concentrated Liquidity

To provide liquidity in V3, you select a token pair, fee tier, and price range:

INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager.MintParams({
token0: USDC,
token1: WPRIM,
fee: 3000, // 0.3% fee tier
tickLower: -887220, // lower bound of price range
tickUpper: 887220, // upper bound of price range
amount0Desired: 1000e6,
amount1Desired: 1000e18,
amount0Min: 0,
amount1Min: 0,
recipient: msg.sender,
deadline: block.timestamp + 1200
});

(uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1) =
nonfungiblePositionManager.mint(params);

Swapping on V3

Use the SwapRouter for exact-input or exact-output swaps:

ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({
tokenIn: USDC,
tokenOut: WPRIM,
fee: 3000,
recipient: msg.sender,
deadline: block.timestamp + 1200,
amountIn: 100e6,
amountOutMinimum: 0,
sqrtPriceLimitX96: 0
});

uint256 amountOut = swapRouter.exactInputSingle(params);