DegenPrime
  • Introduction
    • DegenPrime
  • Protocol
    • Overview
    • Double D's
      • Diamond Hands 💎🙌🏽
      • Degenerates 📈🚀
  • Structure
  • Security
    • Liquidations
    • Solvency Checks
    • Degen Account separation
    • Asset whitelisting
    • Token exposure protection
    • Protocol gatekeeping
    • Withdrawal Guard
    • 24-hour Time-Locked Withdrawal
    • Oracle price data
    • Internal Security
    • Third-party security partners
    • Audits
  • TLDR
  • Degen Account
    • Degen Portfolio
    • The Degen Account
      • Zaps
      • Assets
      • Liquidity Pools
      • Stats
  • Leverage and health
    • Numbers for nerds
    • Health and intuition
  • Take Profits
  • Tutorials
  • Diamond Hands
    • HODL
    • Interest
      • Calculations
    • Tutorials
  • Tokenomics
    • Tokenomics
  • Community
    • Socials
  • Brand Assets
Powered by GitBook
On this page
  • Health calculations
  • Cross-margin Borrowing Power
  • Health of single asset (Ha)
  • Health of all assets (H)
  1. Leverage and health

Numbers for nerds

Health calculations

Borrowing Power ratio (Pr): The borrowing power ratio of an asset is a number between 0 and 1 and describes how much you can borrow against this certain asset. It is calculated as:

Pr=PP+1Pr = borrowing Power ratioP = borrowing Power Pr = {P \over P + 1} \\ \text{}\\ \begin{align} & \text{Pr = borrowing Power ratio} \\&\text{P = borrowing Power} \ \\ \end{align}Pr=P+1P​​Pr = borrowing Power ratioP = borrowing Power ​​
Borrowing Power
Formula
Borrowing Power ratio

1x

1 / (1+1)

0.5

3x

3 / (3+1)

0.75

5x

5 / (5+1)

0.8333

10x

10 / (10+1)

0.909

25x

25 / (25 + 1)

0.9615

Collateral (Ct & C): DegenPrime being fully cross-margin, means that "collateral" as such does not exist, but is either a token-derived collateral value (Ct):

Ct=At−BtCt = Collateral of tokenAt = Account’s token valueBt = token borrowed valueCt = {At-Bt} \\\text{}\\ \begin{align} &\text{Ct = Collateral of token} \\ &\text{At = Account's token value} \\ &\text{Bt = token borrowed value} \end{align}Ct=At−Bt​Ct = Collateral of tokenAt = Account’s token valueBt = token borrowed value​​

Or a portfolio-derived value (C):

C=Ta−TbC = CollateralTa = Total account valueTb = Total borrowed valueC = {Ta-Tb} \\\text{}\\ \begin{align} &\text{C = Collateral} \\ &\text{Ta = Total account value} \\ &\text{Tb = Total borrowed value} \end{align}C=Ta−Tb​C = CollateralTa = Total account valueTb = Total borrowed value​​

In words: The dollar value of your collateral is equal to the dollar value of your assets, minus the dollar value of your borrowed tokens, either for one token, or for the whole portfolio.

At launch all integrated tokens have either 0x or 5x Borrowing power. If they have 0, the Borrowing Power ratio is 0 as well.

Cross-margin Borrowing Power

Health of single asset (Ha)

Ha=Pr∗Ct+Pr∗Bt−BtPr∗Ct∗100%{Ha = }{Pr*Ct+Pr*Bt-Bt\over Pr*Ct} *100\% \\ Ha=Pr∗CtPr∗Ct+Pr∗Bt−Bt​∗100%

Examples

Borrowing Power, Collateral, Borrowed value
Formula
Asset Health

25x, $1000, $15000

(0.9615*1000 + 0.9615 * 15000 - 15000) / (0.9615*1000) *100%

40%

5x, $100, $250

(0.8333*100 + 0.8333 * 250 - 250) / (0.8333*100) *100%

50%

5x, $120, $250

(0.8333*120 + 0.8333*250 - 250) / (0.8333*120) * 100%

58.3%

3x, $100, $101

(0.75 * 100 + 0.75 * 101 - 101) / (0.75*100) * 100%

66.3%

Health of all assets (H)

Weights

In order to calculate a cross-margin portfolio, we need to take different borrowing powers and token prices into account. To do this we calculate the weighted collateral value of a token (Cw) and the weighted borrowed value (Bw) of a token. By multiplying either with both the token price and Borrowing Power ratio (Pr), we get a value that represents that token's weighted collateral/borrowing value.

Cw=CtPtPrBw=BtPtPrCt = Collateral of tokenBt = Borrows of tokenPt = Price of token{Cw = CtPtPr} \\ {Bw = BtPtPr} \\\text{} \\\begin{align} &\text{Ct = Collateral of token} \\&\text{Bt = Borrows of token}\\&\text{Pt = Price of token} \end{align}Cw=CtPtPrBw=BtPtPr​Ct = Collateral of tokenBt = Borrows of tokenPt = Price of token​​

Compounding the collateral weights of all tokens within one Prime Account, we get the portfolio's Total Collateral weight (ÎŁCw). Compounding the borrowed weights of all tokens within one Prime Account we get the portfolio's Total Borrowed weight (ÎŁBw).

By using the same formula we used with the single-asset health meter, but taking into account the different token prices and borrowing powers, we get:

H=ΣCw+ΣBw−BΣCw∗100%{H = }{ΣCw+ΣBw-B\over ΣCw} *100\% \\ H=ΣCwΣCw+ΣBw−B​∗100%
PreviousLeverage and healthNextHealth and intuition

Last updated 2 months ago

How much you can actually borrow against your deposit is not only dependent on the of the token provided, but also on the borrowing power of the token borrowed. This means that if you provide a token with 5x borrowing power, and borrow a token with 2x borrowing power, the exact ratio at which the health meter reaches zero is neither 2x nor 5x, but rather somewhere in between. This is due to DegenPrime being . Below are the calculations how the exact Health can be measured.

borrowing power
cross-margin