Skip to content

Interest Protocol DEX & Lending contracts for the Sui Network

Notifications You must be signed in to change notification settings

ahab617/sui-defi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPX Lending and DEX modules on the Sui Network.

Quick start

Make sure you have the latest version of the Sui binaries installed on your machine

Instructions here

Run tests

To run the tests on the dex directory

  cd dex
  sui move test

Publish

  cd dex
  sui client publish --gas-budget 50000

Repo Structure

  • dex: It contains the logic for users to swap, add/remove liquidity and create pools
  • whirlpool: It contains the logic for users to borrow and lend coins
  • ipx: The governance token of Interest Protocol
  • sui-dollar: The stable coin of Interest Protocol
  • library: It contains utility functions that are used by other modules

Functionality

Whirlpool

The Interest Protocol Lending Protocol allows users to borrow and lend cryptocurrencies.

The lending protocol providers the following core functions

  • deposit: it allows users to put collateral to start earning interest rate + rewards
  • withdraw: it allows users to remove their collateral
  • borrow: it allows users to borrow crypto using their deposits as collateral. This allows them to open short/long positions
  • repay: it allows users to repay their loans

DEX

The Interest Protocol DEX allows users to create pools, add/remove liquidity and trade.

The DEX supports two types of pools denoted as:

  • Volatile: k = x * y popularized by Uniswap
  • Stable: k = yx^3 + xy^3 inspired by Curve's algorithm.

The DEX will route the trade to the most profitable pool (volatile vs stable).

  • Add/Remove Liquidity
  • Swap: Pool<BTC, Ether> | Ether -> BTC | BTC -> Ether
  • Create Pool: Users can only create volatile pools
  • One Hop Swap: Pool<BTC, Ether> & Pool<Ether, USDC> | BTC -> Ether -> USDC | USDC -> Ether -> BTC
  • Two Hop Swap: Pool<BTC, Ether> & Pool<Ether, USDC> & Pool<Sui, USDC> | BTC -> Ether -> USDC -> Sui | Sui -> USDC -> Ether -> BTC
  • Farms to deposit VLPCoins and SLPCoins to farm IPX tokens
  • Flash loans

Future Features

IPX Coin

It is the governance coin of the protocol and it is minted as rewards by the Masterchef and lending modules. This coin will power the DAO in the future.

SUID Coin

It is a stablecoin created by the lending module. It is pegged to he USD dollars. Users pay a constant interest rate to borrow it.

Live

Go to here (Sui Interest Protocol) and see what we have prepared for you

Contact Us

About

Interest Protocol DEX & Lending contracts for the Sui Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Move 100.0%