> For the complete documentation index, see [llms.txt](https://docs.parallel.best/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallel.best/developers-hub/parallel-v2/classic-vaults/vaultscore.md).

# VaultsCore

The **VaultsCore** contract is the main interface for the user to interact with the Parallel protocol’s collateralized debt system, such as depositing, borrowing, repaying, and liquidating debt. It stores the collateral, manages the safety reserve, and handles all debt calculations.&#x20;

The VaultsCore contract has the following interface:

```
interface IVaultsCore {

  function deposit ( address _collateralType , uint256 _amount ) external ;
  function depositByVaultId ( uint256 _vaultId , uint256 _amount ) external ;
  function depositAndBorrow ( address _collateralType , uint256 _depositAmount ,
uint256 _borrowAmount ) external ;
  function withdraw ( uint256 _vaultId , uint256 _amount ) external ;
  function withdrawAll ( uint256 _vaultId ) external ;
  function borrow ( uint256 _vaultId , uint256 _amount ) external ;
  function repayAll ( uint256 _vaultId ) external ;
  function repay ( uint256 _vaultId , uint256 _amount ) external ;
  function liquidate ( uint256 _vaultId ) external ;

  ...  
}
```

In addition to ERC20 collateral types, VaultsCore supports ETH directly through functions such as depositETH, withdrawETH and depositAndBorrowETH.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/developers-hub/parallel-v2/classic-vaults/vaultscore.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.
