> For the complete documentation index, see [llms.txt](https://docs.wandfi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wandfi.io/products/collateral-vault/vault/s-vault.md).

# S-Vault

The minting and redemption mechanism for the S-Vault is different because the price volatility of the stablecoin is low, so its mechanism is simpler compared to V-Vaults. Simply put, USB and xToken can mostly be minted and redeemed independently.&#x20;

Taking the USDB vault as an example:

***

## Deposit for minting

**When the contract is initially created or when the supply of USDBx is zero**, USB cannot be minted directly. The first time USDB assets are deposited into the contract to mint USDBx, we preset the initial minting amount with the formula:

$$\Delta USDBx = \Delta USDB$$

**After the initiation, when depositing into the USDB vault**, users can mint USB or USDBx independently. The formulas for calculating the minted amounts are as follows:

$$\Delta USB = \Delta USDB \times P\_{usdb}$$

$$\Delta USDBx = \frac{\Delta USDB \times P\_{usdb} \times M\_{USDBx}}{M\_{usdb} \times P\_{usdb} - M\_{USB-USDB}}$$

Where:

* $$\Delta USB$$: The amount of USB minted
* $$\Delta USDBx$$: The amount of USDBx minted
* $$\Delta USDB$$: The amount of USDB deposited
* $$P\_{usdb}$$: The price of USDB in terms of USD (assumed to be stable)
* $$M\_{usdb}$$: The total amount of USDB in the vault
* $$M\_{USDBx}$$: The total amount of USDBx minted
* $$M\_{USB-USDB}$$: The amount of USB minted from the USDB vault

**When the AAR falls below AARS**, USB can no longer be minted independently. If users need to mint USB, USDBx will be minted at the same time in proportion, according to the following formula:

$$\Delta USB = \Delta USDB \times \frac{M\_{USB-USDB}}{M\_{USDB}}$$

$$\Delta USDBx = \frac{\Delta USB \times M\_{USDBx}}{M\_{USB-USDB}}$$

**When AAR further drops below 101%**, the formula for minting USDBx alone will change to:

$$\Delta USDBx = \frac{\Delta USDB \times P\_{usdb} \times M\_{USDBx} \times 100}{M\_{USB-USDB}}$$

***

## Withdraw for redemption

**When redeeming USDB using USB**, the formulas based on the Asset Adequacy Ratio (AAR) are as follows:

$$\Delta USDB = \frac{\Delta USB}{P\_{usdb}}    \quad \text{if AAR} ≥ 100%%$$

$$\Delta USDB = \frac{\Delta USB \times M\_{USDB}}{M\_{USB-USDB}}\quad \text{if AAR} < 100%$$

Where:

* $$\Delta USB$$: The amount of USB being redeemed
* $$\Delta USDB$$: The amount of USDB to be received
* $$P\_{usdb}$$: The price of USDB
* $$AAR$$: The Asset Adequacy Ratio of the USDB vault
* $$M\_{USDB}$$: The total amount of USDB in the vault
* $$M\_{USB-USDB}$$: The amount of USB minted from the USDB vault

**When redeeming USDB using USDBx**, the calculation formula is as follows:

$$\Delta USDB =\frac{M\_{usdb} \times \Delta USDBx}{M\_{USDBx}}- \frac{M\_{USB-USDB} \times \Delta USDBx}{M\_{USDBx} \times P\_{usdb}}$$

**When the AAR falls below AARS**, USDBx assets can no longer be redeemed for USDB independently. Users will need a certain amount of USB to match the proportion of the two assets before they can redeem USDB. For example, if a user wishes to redeem a quantity of USDBx, denoted as ∆USDBx, they will need to pair it with a corresponding amount of USB, denoted as ∆USB. The calculation formula is as follows:

$$\Delta USB = \frac{\Delta USDBx \times M\_{USB-USDB}}{M\_{USDBx}}$$

The amount of USDB redeemed with the paired ( \Delta USDBx ) and ( \Delta USB ) is:

$$\Delta USDB = \frac{\Delta USDBx \times M\_{USDB}}{M\_{USDBx}}$$

{% hint style="warning" %}
The redemption fee is 0.5%
{% endhint %}
