# EmptyVault

The `emptyVault` feature can be used to once we are done using a vault for a specific collateral and we wish to repay all debts for the collateral and withdraw our collateral balance without any additional capital.

Note: You should use `withdraw` instead if the vault you wish to close does not have any outstanding debt.

The `EmptyVault` call does the following:

1. Flash loan some collateral
2. Use an aggregator to swap loaned collateral for PAR
3. Use swapped PAR to repay any outstanding vault debt
4. Withdraw collateral from vault

Note: There will likely be some leftover PAR from repaying the vault debt since we don't know exactly how much PAR we will get from a swap. The vault will still technically exist after calling `emptyVault`; it will just have zero collateral balance and zero vault debt.


---

# 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.parallel.best/products/parallel-v2/how-it-works/super-vaults-sv/emptyvault.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.
