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

# Perpetual Vault

<figure><img src="/files/xuoNIN7eWytvG6MP1J1i" alt=""><figcaption></figcaption></figure>

The vault serves as the counterparty to all trades made on the platform:

* When traders win (positive PnL), their winnings are received from the vault.
* When traders lose (negative PnL), their losses are sent to the vault.

### **Insurance Fund**

<figure><img src="/files/0lToJxMfSgTNALZ1XOdE" alt=""><figcaption></figcaption></figure>

* The **Insurance Fund** acts as a protective layer for the vault in case of positive PnL, aiming to minimize the downward price trend of apUSDC.
* This fund is managed by an administrator, allowing them to withdraw from and deposit into the vault at any time. Withdrawals from the **Insurance Fund** can be flexibly used for beneficial strategies, such as buying back ASH, sending to the treasury, and allocating for product R\&D.

### Value of apUSDC

$$
apUSDC = 1+ \frac{(PnL - insurance + fee)}{VaultTotalSupply}
$$

$$
APR(30D) = \frac{(\frac{apUSDC\_{CurrentPrice}}{apUSDC\_{LastMonthPrice}}-1)}{30}*365*100%
$$

$$
APR(7D) = \frac{(\frac{apUSDC\_{CurrentPrice}}{apUSDC\_{LastWeekPrice}}-1)}{7}*365*100%
$$

$$
APR(1D) =(\frac{apUSDC\_{CurrentPrice}}{apUSDC\_{YesterdayPrice}}-1)*365*100%
$$

**According to the formula:**

* **If PnL > 0**: The vault records a loss, and 100% of this loss is allocated to the reserve, with a priority to use funds from the insurance fund first.
* **If PnL < 0**: The vault records a profit, and 100% minus a certain percentage (x%) is allocated to the reserve, where x% is distributed to the insurance fund. The administrator can deposit or withdraw from the insurance fund at any time.
* **Fees:** Trading fees that are allocated to the Vault (if any) will be reflected in the apUSDC price as per the outlined formula.
* **Order Execution**: Every order that is opened or closed, involving money being received or transferred from the vault, directly reflects on the apUSDC price through PnL and fees (if any)

#### **Withdrawing from the Vault:**

* To initiate a withdrawal, a request must be made, followed by a 7-day cooldown period and a 2-day redemption window after the cooldown ends. This timeframe can be subject to changes.
* The apUSDC price will fluctuate according to market conditions throughout the cooldown period, and the withdrawal exchange rate is fixed at the moment of redemption (during the 2-day window).
* Users can still trade apUSDC on DEXs to avoid the cooldown period. There will be an apUSDC/USDC pool created on AshSwap for this purpose.

{% content-ref url="/pages/OmcPE38nEW56REvEuxZV" %}
[Vault Guide](/ashperp/perpetual-vault/vault-guide.md)
{% endcontent-ref %}

### FAQ

<details>

<summary>Why is the APR 0%? Does that mean I'm not gaining money or even losing money?</summary>

During periods of high volatility, the price of apUSDC can experience significant short-term decreases, leading to a reduced APR. It's crucial to recognize that this reflects only a temporary measure of apUSDC's performance, analyzed on daily, weekly, and monthly intervals. Such fluctuations do not automatically equate to a financial loss. Instead, if the value of apUSDC at the point of withdrawal exceeds its value at the time of your initial deposit, you will realize a financial gain.

</details>

<details>

<summary>Why do I have to wait for several days to claim back my fund?</summary>

The primary objective is to mitigate the occurrence of front-running profit and loss fluctuations, while also guaranteeing sufficient liquidity for the exchange.

</details>

<details>

<summary>How can I check my profits for being an LP for the Perpetual Vault?</summary>

You can evaluate the price of apUSDC at the time of your deposit against its present value.

The real-time profit value will be available soon.

</details>
