LogoLogo
Start hereWhy Flype?Less divergence LossIMMath
  • Vaults
    • UNI-V3 Vaults
    • Strategies
    • Strategy manager
    • Security audit
    • Deployment Addresses
  • Liquidity Exchange
    • Flype Liquidity Exchange
    • Flype-between
    • Flype-in
    • Flype-out
    • Pools
    • Multiple Yields
    • Advantages
  • IMM
    • Background
    • Pools & Oracle Market Price
    • Execution of Trades
    • Three Possible States in IMM
    • The Math Behind IMM
      • IMM Notation
      • IMM Functions
      • IMM Balancing Indicator
      • IMM - Arbitrage Trades
      • Transaction fee
      • Adding Liquidity
      • Removing Liquidity
      • IMM Advantages
      • Simulations and performances
  • Resources
    • FAQ
    • Roadmap
    • References
    • Official Links
Powered by GitBook
On this page
  • What are we trying to solve?
  • Flype-between pools in a single swap

Was this helpful?

  1. Liquidity Exchange

Flype-between

PreviousFlype Liquidity ExchangeNextFlype-in

Last updated 2 years ago

Was this helpful?

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.

WBTC/ETH-LP/ETH POOL (ON THE LEFT) ; DAI/USDC-LP/ETH POOL (ON THE RIGHT)