Skip to content

MetaBUILD-III/MetaBUILD_III_contracts

Repository files navigation

Leverage trading over concentrated liquidity

Omomo leverage trading is a leverage trading protocol which utilizes feature of concentrated liquidty from ref.finance and lending borrowing feature of Omomo lending.

Demo

  • Faucet here
  • Omomo leverage trading here
  • Corresponding ref.finance V2 liqudity pool here

How it works

Buy/sell order

First step is Deposit

Diagramm

Omomo - Deposit flow

Once user have deposited Sell token it may borrow required assets, if it chooses to trade with leverage, and create limit order to buy exact amount of Buy token at current market price. That where we interact with ref.finance V2 concentrated liquidity feature. It allow us to provide liquidity to the pool at concrete range and wait until market croses that range so whole liquidity is converted from Sell token to Buy token without paying Swap fee and rely on Slippage tolerance. Furthermore any operations over our liquidity provides us with additional income equal to pool fee.

NOTE

Right now everything done in one call executed by open position

Once order is created you should see it listed under trading view

Diagramm

Omomo - Create order flow

Execute position & Close position

Once order is created it coud be automatically handled by Executor when the order is fulfilled. Once order is executed you now may either create Take profit order or Cancel the position.

  • [not yet implemented] Take profit order is counterpart action to opening position, Leverage trading will create limit order at desired price which will be fulfilled once market hit this price and proccessed by executor the same way as open position
  • Cancel position allows you to immediately swap your Sell token at the current market price and could by used to prevent loss or take profit once you satisfied with the PnL
Diagramm

Omomo - Execute order flow Omomo - Cancel order flow Omomo - Take profit order flow

Liquidate position

Diagramm

Omomo - Liquidate order flow

Roadmap