Fizzswap
English
English
  • Introduction
  • Protocol Overview
  • Core Concept
  • Risk & Security
  • Privacy Policy
  • Audit
  • Fizz Token
    • Fizzswap Protocol
  • PRODUCT
    • SWAP
    • V2 Pool
    • V3 Pool
      • Supply Liquidity to V3 pool
        • V3 Supply Guide
        • V3 Supply Policy
      • V3 to V3 Migration
        • V3 to V3 Migration Guide
        • V3 to V3 Migration Policy
      • Remove Liquidity from V3 Pool
        • V3 Remove Guide
        • V3 Remove Policy
  • GET STARTED
    • Create a Wallet
    • How to Transfer ETH to the Silicon Network
  • DEVELOPERS
    • Contract
      • V2Factory
      • Exchange
      • VotingRewardToken
      • V2Treasury
      • Distribution
      • Governor
      • V2Router
      • V2Helper
      • V3Factory
      • V3Pool
      • NonfungiblePositionManager
      • NonfungibleTokenPositionDescriptor
      • V3SwapRouter
      • V3Migrator
      • V3Estimator
      • PositionMigrator
      • V3Treasury
      • UniversalRouter
      • V3AirdropOperator
  • Fizzswap
  • Silicon Bridge
  • Github (fork)
  • Audit report (fork)
Powered by GitBook
On this page
  • Code
  • Address
  • Events, Read-Only Functions, and State-Changing Functions
Export as PDF
  1. DEVELOPERS
  2. Contract

V3Migrator

PreviousV3SwapRouterNextV3Estimator

Last updated 8 months ago

This contract enables migration of liquidity from Fizzswap V2 pairs into Fizzswap V3 pools

Code

Github Link: (Will be updated after official launch)

Address

  • Silicon Mainnet :

Events, Read-Only Functions, and State-Changing Functions

Parameter Structs

MigrateParams

struct MigrateParams {
    address pair; // the Fizzswap v2 pair
    uint256 liquidityToMigrate; // expected to be balanceOf(msg.sender)
    uint8 percentageToMigrate; // represented as a numerator over 100
    address token0;
    address token1;
    uint24 fee;
    int24 tickLower;
    int24 tickUpper;
    uint256 amount0Min; // must be discounted by percentageToMigrate
    uint256 amount1Min; // must be discounted by percentageToMigrate
    address recipient;
    uint256 deadline;
    bool refundAsETH;
}

State-Changing Functions

migrate

function migrate(
    struct IV3Migrator.MigrateParams params
) external

Migrates liquidity to v3 by burning v2 liquidity and minting a new position for v3

Slippage protection is enforced via amount{0,1}Min, which should be a discount of the expected values of the maximum amount of v3 liquidity that the v2 liquidity can get. For the special case of migrating to an out-of-range position, amount{0,1}Min may be set to 0, enforcing that the position remains out of range

Parameters:

Name
Type
Description

params

struct IV3Migrator.MigrateParams

The params necessary to migrate v2 liquidity, encoded as MigrateParams in calldata

0x7C3ea90428BaF92a135E443ADA78F6170C349a78
​
​