Unit Protocol Wiki

Unit protocol
4 min readNov 24, 2020

--

Introduction

The Unit protocol allows users to borrow stablecoin USDP based on various tokens value. For more details, check the first version of the whitepaper. https://github.com/unitprotocol/protocol_docs/raw/master/unit_wp.pdf.

Updated information will be provided below.

Main collateral

If a user would like to borrow stablecoin USDP, he has to deposit collateral first. In Unit Protocol, each Collateralized Debt Position(CDP) consists of 2 collateral — main collateral and COL. Each asset(main collateral) has its own restrictions on the minimum and maximum % of COL in CDP.

Every main asset has its own CDP, so with many different main assets, a user can create a few CDPs, and each of them may have different parameters.

Your Balances

This section represents ETH balance and non-zero balancers of assets in your wallet right now.

Deposit and Borrow

In this section, a user can deposit collaterals to the main asset CDP and borrow USDP.

Users can deposit an unlimited amount of main collateral and COL to CDP, but USDP borrowing ability will rely on min and max % of COL in position restrictions. The amount of USDP which can be borrowed can be found from the equation:

(mainUtilizedMax + col) ∗ minCol% = col

(main + colUtilizedMax) ∗ maxCol% = colUtilizedMax

Utilization means how much value of an asset we can use for minting USDP. Variables mainUtilizedMax and colUtilizedMax works as borders which constraint deposited value of col and main. So we can count the actual value of each asset we can utilize:

mainUtilize = min(main; mainUtilizedMax)

colUtilize = min(col; colUtilizeMax)

Total utilized collateral is a simple sum of separate collaterals:

totalUtilizeMax = mainUtilize + colUtilize

and after finding the total value which we actually use as collateral, we can count the maximum amount of USDP we can borrow depends on Initial Collaterization Ratio(ICR) — limit for initially opened position, represents proportion debt/collateral.

maxDebt = totalUtilizeMax*ICR

maxDebt is the total USDP a user can borrow based on collaterals amount and system risk parameters.

Buttons:

  • Max buttons for collaterals — set the maximum amount of collateral in your wallet.
  • Req button for COL — set minimum amount of COL you need to deposit to utilize 100% main collateral in the previous field.
  • 25\50\75\100% button — set % of maximum USDP you can borrow based on input fields.

Withdraw and repay

In this section, a person can withdraw collaterals and repay USDP for the selected main asset CDP. Withdraw function is limited with current ICR restrictions (the proportion of debt/collateral can’t be higher than this limit). The repay function is not limited, and the user can repay USDP anytime.

Buttons:

  • If you press Max for collaterals fields but the repay field will be 0, the app will set the maximum amount of collateral you can withdraw without repaying any USDP.
  • If the user presses Max for USDP repaying first, the system will allow him to withdraw all deposited collaterals with their relative Max button.

Your CDPs

This table shows all open CDPs and their essential parameters. Each CDP can be managed after the relative main collateral choice on the top of the page.

  • Asset — asset ticker and icon.
  • Asset amount — the main collateral amount in the CDP.
  • COL amount — $COL amount in the main collateral CDP.
  • Borrowed USDP — the amount of borrowed USDP for this main collateral CDP.
  • Utilization — borrowed USDP / max available USDP to borrow represented in %.
  • Health factor — a simple indication of liquidation safety for the CDP. If it goes below 1 — the position can be liquidated. The parameter can be found from the equation:

H = (TotalCollateral * LR)/(BorrowedUSDP+StabilityFee)

where

  • LR — liquidation ratio for the CDP(proportion of the main asset+COL) (debt/collateral rate below which position can be liquidated)
  • TotalCollateral — all deposited collateral for the CDP
  • BorrowedSUSDP — total debt for the CDP in USDP
  • StabilityFee — stability fee for the CDP. It capitalizes during every action, which reduces debt/collateral ration like withdrawing collateral and borrowing more USDP.
  • Liquidation fee — fee in % from the loan, which will be deducted from collateral if liquidation will occur.

Oracle price

In the section, you can see oracle prices of selected main asset and COL.

Right now, oracle represents 30 minutes window Uniswap time-weighted average price. More details here, https://uniswap.org/docs/v2/core-concepts/oracles/.

But soon it will be changed.

Parameters

Asset related parameters

  • Minimum % of COL, % — minimum % of COL in CDP utilized collateral (which will be used to count borrowing USDP limit).
  • Maximum % of COL, %- maximum % of COL in CDP utilized collateral (which will be used to count borrowing USDP limit).
  • Liquidation ratio(LR) — liquidation ratio for the CDP(proportion of the main asset+COL) (debt/collateral rate below which position can be liquidated)
  • Initial collateral ratio(ICR)-initial proportion debt/collateral available to open a CDP. LR>ICR to create some safety reserve to avoid fast liquidation.
  • StabilityFee, % — stability fee for the CDP. It capitalizes during every action, which reduces debt/collateral ration like withdrawing collateral and borrowing more USDP.
  • Liquidation fee, % — fee in % from the loan, which will be deducted from collateral if liquidation will occur.
  • USDP limit, USDP — the maximum amount of USDP which can be borrowed for the main collateral CDPs in total.
  • Devaluation period, blocks — the amount of block necessary for the full devaluation of the liquidated collateral. Represents the speed of value decreasing per block.

Liquidation

If for current CDP proportion debt/collateral overcome Liquidation ratio(LR), the position can be triggered for liquidation. The collateral will be sold for USDP. If Liquidator (any user) doesn’t want to buy out instantly, it triggers the auction with the linear per block price decreasing.

After realization, collateral for USDP, USDP, which is equal to debt, will be burned. Liquidation fees will be deducted, and the remaining part will be returned to the liquidated CDP owner’s address.

https://app.unit.xyz Unit Protocol DApp

https://twitter.com/unitprotocol

Photo: Yasin Gündogdu

--

--

Unit protocol

Unit protocol is a decentralized borrowing protocol that allows using a variety of tokens as collateral. $COL token. $USDP stable coin.