Flype-between

What are we trying to solve?
Let's say you have provided liquidity to the WBTC/ETH pool on Uniswap, and now you would like to move your funds to the DAI/USDC pool, today, you will have to go through the following steps:
- Approve Uniswap to expand your WBTC/ETH-LP Token 
- Withdraw the underlying pair of tokens (WBTC + ETH) 
- Approve Uniswap to expand your WBTC 
- Swap WBTC tokens to DAI 
- Swap ETH tokens to USDC 
- Deposit the DAI + USDC to the DAI/USDC pool 
Flype-between pools in a single swap
With Flype, you can seamlessly move your funds between different liquidity pools and protocols, simply by trading an LP token for another in a single transaction.
It is executed by the following behind-the-scenes actions:
On the WBTC/ETH-LP/ETH pool:
- Calculate the Oracle market value of WBTC/ETH-LP. 
- Fetch the Oracle market price of ETH. 
- Calculate the WBTC/ETH-LP/ETH exchange rate using Flype's IMM mechansim. 
- Add WBTC/ETH-LP tokens to the WBTC/ETH-LP/ETH Pool. 
- Remove the equivalent ETH value in US Dollar terms from the WBTC/ETH-LP/ETH Pool. 

On the DAI/USDC-LP/ETH pool:
- Calculate the Oracle market price of DAI/USDC-LP. 
- Calculate the DAI/USDC-LP/ETH exchange rate using Flype's IMM mechansim. 
- Add the ETH to the DAI/USDC-LP/ETH Pool. 
- Transfer equivalent DAI/USDC-LP tokens value in US Dollar terms from the DAI/USDC-LP/ETH Pool to your wallet. 
Last updated
Was this helpful?
