L

LP Migration

Migrate your liquidity from one protocol to another in a single transaction.

L

LP Migration

Migrate your liquidity from one protocol to another in a single transaction.

The problem LP Migration solves

Migrate DEX liquidity in Single Click

In a general DeFi setup, if a user has to migrate their liquidity from one protocol (say: Uniswap) to another protocol (say: Pancakeswap) because pancakeswap is giving a higher APR to the specific liquidity pool, a user has to go through upto 5 steps on the same chain and upto 10 steps in a cross-chain setup. This is a time consuming and lengthy process. The users can use LP swap to do the same migration in a single transaction.

Explanation
Different protocols provide different APRs on LP pairs. So if a DEX is providing more APR than users current DEX then user would like to migrate the LP to the DEX providing higher APR. This migration process usually takes 6-10 steps (unstaking, removing liq, swaps, approvals, bridging, approval, swaps, approval, adding liq, approval, staking, etc).
Using LP migration user can migrate the liquidity from one protocol to another in just a single click(transaction). We internally do all these transactions on users behalf. So user just have to approve the LP token and thencall the migrate function of the contract. User can provide different price points(ticks) if its uniswap v3 based concentrated liquidity DEX.
It saves up to 95% of users time and effort.

Future development

  1. Migrate liquidity from non uniswap based protocols
  2. Using dex aggregator to provide best swap output for LP tokens
  3. Using LiFi/Socket for cross chain transfer for funds for adding liq on different chain
  4. Migrate multiple LP tokens to multiple LP tokens or single LP token
  5. Swap LP tokens directly into a single token
  6. Swap multiple LP tokens in a single token

Challenges we ran into

1.) As we are working with different DEXes so it was difficult to handle different SDK's in the same project as most of the SDKs are clones of Uniswap v2 and v3 so there were conflicts.
2.) Calculating the ticks and prices from ticks was the most complex thing in this contract as the maths is complex for uniswap v3 ticks.
3.) Completion of frontend to handle all DEXes and usecases.
4.) Adding support for multiple chains and DEXes.

Tracks Applied (5)

Arbitrum Track

Helps to migrate liquidity from one protocol to another on Arbitrum

Arbitrum

Polygon Track

Helps to migrate liquidity from one protocol to another on polygonZKEVM

Polygon

Celo Track

Helps to migrate liquidity from one protocol to another on Celo

Celo

Base Track

Helps to migrate liquidity from one protocol to another on Base

Base

Scroll Track

Helps to migrate liquidity from one protocol to another on Scroll

Scroll

Technologies used

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion