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.

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.

Last updated