Borrowing

UNI-V3-POS Collateralized Borrowing

Themis is the first protocol to implement Uniswap V3 position lending. After the NFT is collateralized on Uniswap, the user can also still earn AMM fees.

Main Functions

Borrowing & Earnings

Themis’ agreement for collateralized borrowing calculates a variable interest rate based on the utilization of funds, with a prime rate of 2.5%. The user is provided with a quote from the oracle corresponding to the borrowed asset before granting the asset. Once the collateral rate is selected, the contract is executed and the NFT is staked to borrow the asset.

Repayments & Increasing Liquidity

Users can choose from 3 repayment options:
  • Repayment of full principal and interest and redemption of the collateral;
  • Partial repayment of principal and interest without redemption of the collateral;
  • Increasing the liquidity of the collateral without redeeming it

Algorithm Floating Rate

The borrower borrows assets from the LendingPool as ERC20 and the interest calculation is token-based. The interest rate is calculated by the utilization rate of the pool token.
  • To calculate the borrower's interest rate you need to get the capital utilization rate first:U_a=borrows_a/(cash_a+borrows_a)
  • The Borrow contract will agree to a real-time interest rate with the borrower:BorrowInterestRate_a=2.5%+0.2U_a
  • For each transaction that occurs, the interest rate index of the asset is updated to compound the interest rate since the previous index, denominated in tokens of debit and credit units, during the period of use, using the calculated interest rate for each block:Index_a,n=Index_a,(n-1) * (1+r*t)
  • Total market outstanding borrowings have been updated to include interest outstanding since the last index:TotalBorrowBalanced_a,n=totalBorrowBalanced_a,(n-1) * (1+r*t)
Borrow APR

Oracle

Themis protocol currently uses Uniswap V3's TWAPs Oracle. The 30min feed prices of the three flow pools are initialized at the time of encapsulation. This means that either 0.05%, 0.3%, or 1% UNI-V3-POS will automatically route the best price for borrowing and lending after the price is initialized.
This type of encapsulation ensures that:
  • Hackers cannot make flash loans by attacking the handicap price;
  • Liquidation can be delayed by 30 minutes, thus protecting the borrower's collateral;
Uniswap TWAPs Oracle

Avatar Collateral Rate

In the initial phase, Themis sets the collateralization rate at 0.65, meaning that when the collateral is quoted, up to 65% of the assets can be borrowed. This is a conservative design. Avatar's NFT Signature, on the other hand, has a whitelisting feature in the lending contract. It allows for a maximum collateral ratio of 0.75.
There are three states of whitelisting:
  • Signature: After signing, the address can call a contract method which allows you to borrow with a collateralization rate higher than 65%;
  • Address balance: When calling a higher collateralization rate, the contract will check the address balance, which will cost additional gasfee
  • Signature Follow-Up: Different collateralization rate for different NFT series signatures.

Liquidation

When the collateral triggers the liquidation factor, the collateral in the Borrow contract enters the liquidation queue. It will be cleared into the auction contract by the liquidator. The Collateral that triggers the liquidation factor takes 30 minutes and waits for users who have collateralized assets to adjust the liquidation factor.

UNI-V3-POS assets that allow borrowing and lending

Ethereum Mainnet
Arbitrum
Ropsten
Token 0
Token 1
Factory
Tier
USDC
WETH
0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640
500
USDC
WETH
0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8
3000
USDC
WETH
0x7BeA39867e4169DBe237d55C8242a8f2fcDcc387
10000
USDC
USDT
0x3416cF6C708Da44DB2624D63ea0AAef7113527C6
100
USDC
USDT
0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf
500
USDC
FRAX
0xc63B0708E2F7e69CB8A1df0e1389A98C35A76D52
500
USDC
FEI
0x8c54aA2A32a779e6f6fBea568aD85a19E0109C26
500
WETH
USDT
0x11b815efB8f581194ae79006d24E0d814B7697F6
500
WETH
USDT
0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36
3000
WETH
UST(wormhole)
0x7a5ae802895D5f90b6EdbaFC870FD348Fba2A3d2
3000
WETH
UNI
0x1d42064Fc4Beb5F8aAF85F4617AE8b3b5B8Bd801
3000
WETH
LINK
0xa6Cc3C2531FdaA6Ae1A3CA84c2855806728693e8
3000
USDT
FRAX
0xc2A856c3afF2110c1171B8f942256d40E980C726
500
USDT
MIM
0xe6E14be906c1F1b438DA2010B38bECa14b387231
500
PAX
WETH
0xD83D78108DD0d1dfffF11EA3F99871671a52488b
3000
PAX
DAI
0xB65fC555B0E970B16329a48e45cfa14Fce9A36a4
100
DAI
USDC
0x5777d92f208679DB4b9778590Fa3CAB3aC9e2168
100
DAI
USDC
0x6c6Bc977E13Df9b0de53b251522280BB72383700
500
DAI
USDT
0x6f48ECa74B38d2936B02ab603FF4e36A6C0E3A77
500
DAI
WETH
0x60594a405d53811d3BC4766596EFD80fd545A270
500
Not Connected
Pending

Interface Information

Interaction

  • The first time you link your wallet, the interface will display an overview of all current markets;
  • When Pricing is opened, it will read all UNI-V3-POS that the selected asset can access. The initial borrow requires the wallet to authorize that set of UNI-V3-POS to use;
  • Select the NFT you want to send and the contract will quote it;
  • Select collateral rate for borrowing and lending token;
Borrowing details
  • Borrowed assets are displayed at the top of the home page;
  • Click ‘Positions’ to make repayments or increase liquidity;
Borrowing complete
  • Select 'Repayment' for partial repayment or full repayment;
  • Selecting 'Increase Liquidity' will automatically calculate the asset that needs to be added at the other end after entering the price of one asset. Authorization is required before adding;
  • The page will automatically calculate the expected Liquidation Risk after the increase, the value is less than the liquidation factor (0.8) the loan will not be liquidated;
Increase collateral liquidity

Stats Information

All Markets
Position
Type
Description
Method
Asset
Types of tokens
Reading address/back-end stats
Total borrowed
Total dollar value of lending Value
CurBorrow*Target_value
Liquidity
Residual dollar value in the pool
CurSupply*Target_value
Borrow APR
Borrowing rate
LendingPool Contract calls
Yield APY
Reward annualized
Mining Contract calls
Delt balance
Unrepayable
principal and interest balance
Borrow Contract calls
Pairs
Trading-pair assets
Reading address token0/token1
Value
Corresponding lending asset pricing
Oracle Pricing
Collateral Factor
Collateral ratio
Contract calls
Liquidation Factor
Liquidation fator
Contract calls
Type
Description
Method
Liquidation Risk
Calculated post-clearing factor
Delt balance/value
Harvest of TMS
Rewards available
Mining contract calls
Borrow APR
Current borrowing rates
LendingPool contract calls