For the complete documentation index, see llms.txt. This page is also available as Markdown.

Maths for position safety

This section explains how the Fathom's FXD stablecoin position's safety is calculated.

For a position to be considered safe, below should hold true.

lockedCollateralAmountPriceWithSafetyMargin>DebtSharedebtAccumulateRate,lockedCollateralAmount * PriceWithSafetyMargin > DebtShare * debtAccumulateRate,

where

PriceWithSafetyMargin=RawPriceLTVPrice WithSafetyMargin = RawPrice * LTV

When RawPrice is the price of collateral from PriceFeed and LTV is Loan To Ratio.

In other words

lockedCollateralVaule>debtVaultlockedCollateralVaule > debtVault
debtVault=debtSharedebtAccumulateRatedebtVault = debtShare * debtAccumulateRate

And debtAccumulatedRate is calculated as

debtAccumulatedRate=(1+interestRate)1/31,536,000debtAccumulatedRate = (1 + interestRate)^{1 / 31,536,000}

since debtAccumulatedRate is a second pounding interestRate.

Position safety calculation model

Please refer to below position safety calculation model.

https://docs.google.com/spreadsheets/d/1--XSZWeKq2HudwH6Btlg8hSpUuEOFStGYXXUDoOW7Es/edit?usp=sharing

Last updated