Documentation
Search…
⌃K
🏘

Lending pools

Each lending pool in Tethys Market is associated with a DEX and a token pair. The following high-level information is provided for each lending pool:
  • Total Supply — The total amount of tokens supplied to the lending pool
  • Total Borrowed — The total amount of tokens borrowed from the lending pool
  • Utilization — The ratio between Total Borrowed and Total Supply
  • Supply APR — The current effective APR earned by lenders for supplying tokens
  • Borrow APR — The current effective APR paid by borrowers for borrowing tokens
  • Leveraged LP APY — The estimated APY for a leveraged yield farming position, based on trading fees, vault rewards, and farming rewards (if applicable)

Mechanics

A lending pool consists of three (3) parts:
  • Borrowable0 — An interest-bearing contract for the first token (token0) in the token pair
  • Borrowable1 — An interest-bearing contract for the second token (token1) in the token pair
  • Collateral — A collateral contract for the LP token of the token pair

Lending

Lenders can deposit either token (token0 or token1) into its associated Borrowable contract for that token. In exchange, they receive an interest-bearing token, bTMARKET, representing the underlying token with accrued interest. Later, they can exchange their interest-bearing token for the original token, with accrued interest, provided there is sufficient liquidity in the Borrowable contract for that token.

Borrowing

Borrowers can deposit LP tokens as collateral into the Collateral contract. With this collateral, a borrower can create a loan, which requires a certain amount of the underlying tokens, provided there is sufficient liquidity in both Borrowable contracts to create the loan.
To enable leveraged yield farming, the Tethys Market Protocol uses tokens from Borrowable0 and Borrowable1 to add liquidity to the DEX for the token pair, adds the resulting LP tokens to the Collateral for the token pair, and sends the borrower cTMARKET tokens, which represent the borrower’s initial collateral and borrowed LP tokens.

Tethys Market Vaults

Any lending pool with Tethys Market Vaults enabled will earn and reinvest additional rewards. Rewards are accrued to anyone who deposits or leverages their collateral (LP tokens) in the lending pool, and periodically reinvested to buy more LP tokens on their behalf.

Liquidation

If, at any time, the collateral value for a borrower’s loan is less than the minimum collateral required, the loan can be liquidated. Anyone can liquidate a loan in a liquidatable state in a permissionless manner. The liquidator repays the loan and receives, in exchange, the value of the borrowed LP tokens multiplied by the liquidation incentive. The liquidation mechanics help to ensure the stability of the protocol.