LP Migration

LP Migration

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

5
LP Migration

LP Migration

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


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 Roadmap

  1. Migrate liquidity from non uniswap based protocols
  2. Using dex aggregator to provide the best swap output for LP tokens
  3. Using LiFi/Socket for cross chain transfer for funds for adding liq on a 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 I ran into

1.) As we are working with different DEXes so it was difficult to handle different SDK's in same project as post of the SDKs are clone 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.

Technologies used

Discussion