Monitor Account Risk
Ways to monitor account risk on chain and off chain.
Off Chain
Monitoring risks off chain can be done using the Notional Typescript SDK which is used in the Notional Web Application to calculate user risk factors. Off Chain metrics are more expressive and give a more detailed picture of account risk compared to on chain metrics (where it only shows whether or not an account can be liquidated).
Key Concepts
Risk Adjusted Value: collateral (assets) and debts in Notional can have various adjustments applied to their valuations depending on the types of risk they face.
Haircuts: are adjustments applied to positively valued assets (i.e. collateral)
Exchange Rate Haircut: a percentage based discount to the value of collateral as it is converted to ETH denomination
fCash Haircut: an increase of the oracle interest rate (reduces the present value of fCash) applied to positive fCash
nToken Haircut: a percentage based discount to the value of nToken holdings
Liquidity Token Haircut: a percentage based discount to the claims on cash and fCash for liquidity token holdings (NOTE: liquidity token holdings are currently disabled in Notional V2).
Buffers: are adjustments applied to negatively valued debts
Exchange Rate Buffer: a percentage based increase to the value of debt as it is converted to ETH denomination
fCash Buffer: a decrease in the oracle interest rate (increases the present value of fCash debt)
Net Underlying Available: collateral held against debt within the same currency is applied prior to Exchange Rate buffers and haircuts. This figure is termed the net underlying available, it is the positive or negative amount of value that will be converted into ETH for the aggregate free collateral value.
Free Collateral: is a measure of the total amount of collateral an account has in excess of their debts. Calculated as the aggregate of the net underlying available figures converted to ETH with exchange rate haircuts and buffers applied.
Risk Ratios: ratios of collateral (assets) to debts are useful metrics for determining the relative health of an account.
Risk Thresholds: are useful for approximations of price levels where an account is eligible for liquidation.
Examples
All risk related methods are documented in Risk Metrics.
TODO: write example of how to do this in the SDK
On Chain
Liquidations use Free Collateral to determine whether or not an account can be liquidated. Free Collateral is an absolute number but does not give a sense of the ratio of debts to assets.
TODO: example of how to calculate the collateral ratio using FC view
Last updated