> For the complete documentation index, see [llms.txt](https://docs.affluent.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.affluent.org/market/calculating-account-risk-examples.md).

# Calculating Account Risk: Examples

### Case1) Borrow $40 USDT against $100 TON

* Parameter

  * \[Asset] Risk Factor : TON 40%, USDT 0%
  * \[Market] MaxRiskRatio : 80%, MaxLeverage : 300%

  | Asset                   | Supply | Borrow | <p>Net Asset<br>(Supply-Borrow)</p> | <p>Risk Value<br>(RiskFactor \* abs\[NetAsset]</p> |
  | ----------------------- | ------ | ------ | ----------------------------------- | -------------------------------------------------- |
  | **TON (A)**             | $100   | -      | $100                                | $40                                                |
  | **USDT (B)**            | -      | $40    | -$40                                | $0                                                 |
  | **Total Value (A + B)** | $100   | $40    | **$60**                             | **$40**                                            |
* Risk Assessment : Both risk metrics (Risk Ratio and Leverage) are within the market’s MaxRiskRatio and MaxLeverage limits

$$
RiskRatio = \frac{total \ risk \ value}{net \ asset} = \frac{$ 40}{$ 60} \approx 66.7%
$$

$$
Leverage = \frac{total \ supply \ value}{net \ asset} = \frac{$ 100}{$ 60} \approx 166.7%
$$

#### case1-1) Borrow +$20 USDT

<table><thead><tr><th width="168">Asset</th><th>Supply</th><th>Borrow</th><th>Net Asset</th><th>Risk Value</th></tr></thead><tbody><tr><td><strong>TON (A)</strong></td><td>$100</td><td>-</td><td>$100</td><td>$40</td></tr><tr><td><strong>USDT (B)</strong></td><td>-</td><td>$40+$20</td><td>-$60</td><td>$0</td></tr><tr><td><strong>Total Value (A + B)</strong></td><td>$100</td><td>$60</td><td><strong>$40</strong></td><td><strong>$40</strong></td></tr></tbody></table>

* Risk Assessment : This loan request is rejected because the resulting Risk Ratio would exceed MaxRiskRatio, even though the Leverage remains acceptable

$$
RiskRatio = \frac{$ 40}{\color{blue}{$ 40}} = \color{red}{100%}
$$

$$
Leverage = \frac{$ 100}{$ 40} = \color{blue}{250%}
$$

#### case1-2) Borrow +$20 TON

<table><thead><tr><th width="169">Asset</th><th>Supply</th><th>Borrow</th><th>Net Asset</th><th>Risk Value</th></tr></thead><tbody><tr><td><strong>TON (A)</strong></td><td>$100</td><td>+$20</td><td>$80</td><td>$32</td></tr><tr><td><strong>USDT (B)</strong></td><td>-</td><td>$40</td><td>-$40</td><td>$0</td></tr><tr><td><strong>Total Value (A + B)</strong></td><td>$100</td><td>$60</td><td><strong>$40</strong></td><td><strong>$32</strong></td></tr></tbody></table>

* Risk Assessment : Both risk metrics (Risk Ratio and Leverage) are within the market’s MaxRiskRatio and MaxLeverage limits

$$
RiskRatio = \frac{$ 32}{$ 40} = \color{blue}{80%}
$$

$$
Leverage = \frac{$ 100}{$ 40} = \color{blue}{250%}
$$

### Case2) Borrow $60 TON against $100 tsTON

* Parameter

  * \[Asset] Risk Factor : TON 40%, USDT 0%, tsTON 5%
  * \[Market] MaxRiskRatio : 80%, MaxLeverage : 300%

  | Asset                   | Supply | Borrow | <p>Net Asset<br>(Supply-Borrow)</p> | <p>Risk Value<br>(RiskFactor \* abs\[NetAsset]</p> |
  | ----------------------- | ------ | ------ | ----------------------------------- | -------------------------------------------------- |
  | **TON (A = a1 + a2)**   | $100   | $60    | $40                                 | $16                                                |
  | TON (a1)                | -      | $60    | -                                   | -                                                  |
  | tsTON (a2)              | $100   | -      | -                                   | $5\*                                               |
  | **USDT (B)**            | -      | -      | -                                   | -                                                  |
  | **Total Value (A + B)** | $100   | $60    | **$40**                             | **$21**                                            |

  * tsTON introduces an additional DeFi-specific risk layer beyond TON’s underlying asset risk, increasing the account’s overall risk values
* Risk Assessment : Both risk metrics (Risk Ratio and Leverage) are within the market’s MaxRiskRatio and MaxLeverage limits

$$
RiskRatio = \frac{total \ risk \ value}{net \ asset} = \frac{$ 21}{$ 40} = 52.5%
$$

$$
Leverage = \frac{total \ supply \ value}{net \ asset} = \frac{$ 100}{$ 40}= 250%
$$

#### case2-1) Borrow +$10 TON

| Asset                   | Supply | Borrow  | <p>Net Asset<br>(Supply-Borrow)</p> | <p>Risk Value<br>(RiskFactor \* abs\[NetAsset]</p> |
| ----------------------- | ------ | ------- | ----------------------------------- | -------------------------------------------------- |
| **TON (A = a1 + a2)**   | $100   | $70     | $30                                 | $12                                                |
| TON (a1)                | -      | $60+$10 | -                                   | -                                                  |
| tsTON (a2)              | $100   | -       | -                                   | $5                                                 |
| **USDT (B)**            | -      | -       | -                                   | -                                                  |
| **Total Value (A + B)** | $100   | $70     | **$30**                             | **$17**                                            |

* Risk Assessment : A further loan request is rejected because the resulting Leverage would exceed MaxLeverage, even though the Risk Ratio remains acceptable.

$$
RiskRatio = \frac{$ 17}{$ 30} \approx \color{blue}{56.7%}
$$

$$
Leverage = \frac{$ 100}{$ 30} \approx \color{red}{333%}
$$
