project screenshot 1
project screenshot 2
project screenshot 3

Leverage

On click margin trading built on existing DeFi infrastructure

Leverage

Created At

ETHOnline 2021

Winner of

trophy

Uniswap Grants Program - Honorable Mention

Project Description

Our project comprises of two component: 1) A permissionless lending pool. 2) The position contract that helps create long/short positions with margin, with capital from the lending pool. Liquidity providers can deposit fund to the lending pool to earn interest. Traders can use our contract to create long/short positions with collateral. For the demo purpose, we used Uniswap V2 AMM on kovan for execution of swaps and liquidation. In the future we plan to give users options to choose from Sushi, Uniswap V2 or V3 as the underlying AMM.

How it's Made

We are inspired by the design of Alpha Finance and implement our margin trading based on the general flow similar to Alpha. First the lending pool uses a multi-segmented interest rate model that scales with the utilization rate. When utilization rate of the lending pool hits 80% or above we will see a sharp increase of interest rate, which reflects a market value of the lendable assets. Second, the margin long/short positions are managed by the worker contract, and when a liquidation opportunity occurs, anyone can call liquidate() function to liquidate the position and receive a reward by doing so. Third, the price oracle can be potentially improved by using an aggregated price oracle such as Chainlink, but we will be start with some major token pool with quite significant depth of liquidity on Uniswap, thus we believe using uniswap AMM alone for price oracle shouldn't be a issue for now. As we add more trading pair later, we plan to implement a multi-sourced price oracle implemented by Chainlink of Alpha Finance.

background image mobile

Join the mailing list

Get the latest news and updates