# Debt

## Global Debt

Minting ***zTokens*** will cause the protocol's users to incur debt. Each user will owe a share of the ***Global Debt***. This is quoted in US Dollars, and is derived by the sum product of the circulating supply of each ***zTokens*** multiplied by the exchange rate used by the protocol.&#x20;

The value of the debt can fluctuate depending on the FX rates reducing if currencies weaken against the dollar and increasing when they strengthen. The collateralization rate above 100% allows for a buffer, ensuring that all ***zTokens*** remain pegged.&#x20;

For example, assume the exchange rates are 400 Naira per USD, 600 CFA per USD, and 15 ZAR per USD and the circulating supplies are 50,000 zUSD, 100,000,000 zNGN, 6,000,000 zCFA, 1,500,000 zZAR.

The global debt would be calculated as: 50,000 + 100,000,000 / 400 + 6,000,000 / 600 + 1,500,000 / 15 = $410,000

If the exchange rate of Naira to USD increases to 800 Naira per USD the global debt would change to $285,000.

## User Debt

The global debt will be apportioned to each user based on the ***Net Mint*** ***Ratio*** to calculate the user debt. The user debt will be used in subsequent collateralization calculations to determine if a position is collateralized. Users will have to manage their own collateralization ratio to ensure that their position is not liquidated.

## Net Mint Ratio

The ***Net Mint Ratio*** will determine the allocation of the global debt to each user. This will be adjusted every time the user mints or burns ***zUSD**,* to reflect the user's apportionment of the global debt.

$$
Net\ Mint\ Ratio = \frac{Mint\_{user}

* Redemptions\_{user}}{Mint\_{global} - Redemption\_{global}} = \frac{Net\ Mint\_{user}}{Net\ Mint\_{global}}
  $$

Each time a user mints ***zUSD***, the Net Mint increases by the amount minted multiplied by the Net Mint global divided by the Global Debt, ensuring that the additional debt the user and the protocol incurs is equal to the additional zUSD minted.

$$
Net\ Mint\_{user} = Net\ Mint\_{user} + zUSD\ Minted \* \frac{Net\  Mint\_{global}}{Debt\_{global}}
$$

$$
Net\ Mint\_{global} = Net\ Mint\_{global} + zUSD\ Minted\* \frac{Net\  Mint\_{global}}{Debt\_{global}}
$$

Each time the user burns (i.e. redeems) ***zUSD*** their Net Mint is reduced based on a percentage of the outstanding debt they are burning.

$$
Net\ Mint\_{user} = Net\ Mint\_{user} \* (1 -  \frac{{zUSD\ to\ Burn}}{Outstanding\ Debt\_{user}})
$$

$$
Net\ Mint\_{global} = Net\ Mint\_{global} \* (1 -  \frac{{zUSD\ to\ Burn}}{Outstanding\ Debt\_{user}})
$$

## Collateralization Ratio

The collateralization ratio shows the relationship between the collateral deposited and outstanding debt for each user. This is calculated as the deposited collateral divided by the outstanding debt.

$$
Collateralization\ Ratio\_{user} = \frac{Collateral\ Balance\_{user}}{Debt\_{user}}
$$

### Increasing the Collateralization Ratio

If a user's collateralization needs to be increased, they can either add collateral or burn ***zUSD*** to increase their ratio. A user needs to remain mindful to keep their collateralization ratio above the minimum threshold of 150.00% to avoid liquidation.

### Decreasing the Collateralization Ratio

If a user has a collateralization above 150.00%, they have the option to decrease it to the minimum threshold. The user has the choice to either mint more ***zUSD*** or remove collateral from the protocol.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.baki.exchange/features/debt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
