AdminInceptionVault

This contract acts as an intermediary between the inception vault owner and the Parallel protocol. It allows the owner to perform the following operations on VaultsCore :

  • Depositing

  • Borrowing

  • Repaying

  • Withdrawing

The contract also stores and lends out the minted PAR from the MIMO protocol.

There is also a claimMimo() function enabling the contract to claim earned MIMO through PAR minting.

Write Methods

initialize(address _owner, IAddressProvider addressProvider, IDebtNotifier debtNotifier, IWETH weth, IERC20 mimo, IInceptionVaultsCore inceptionVaultsCore)

Initializer function to set state variables upon cloning.

Param Name
Type
Description

_owner

address

AdminInceptionVault owner address

addressProvider

IAddressProvider

AddressProvider address

debtNotifier

IDebtNotifier

DebtNotifier address

weth

IWETH

WETH address

mimo

IERC20

MIMO address

inceptionVaultsCore

IInceptionVaultsCore

InceptionVaultsCore address

depositETH()

Calls VaultsCore depositETH().

depositETHAndBorrow(uint256 borrowAmount)

Calls VaultsCore depositETHAndBorrow().

Param Name
Type
Description

borrowAmount

uint256

The amount of borrowed StableX tokens in WEI

depositAndBorrow(address _collateralType, uint256 _depositAmount, uint256 _borrowAmount)

Calls VaultsCore depositAndBorrow().

Param Name
Type
Description

_collateralType

address

The address of the collateral type to be deposited

_depositAmount

uint256

The amount of tokens to be deposited in WEI

_borrowAmount

uint256

The amount of borrowed StableX tokens in WEI

withdraw(uint256 vaultId, uint256 amount)

Calls VaultsCore withdraw().

Param Name
Type
Description

vaultId

uint256

The id of the vault from which to withdraw the collateral

amount

uint256

The amount of ERC20 tokens to be withdrawn

withdrawETH(uint256 vaultId, uint256 amount)

Calls VaultsCore withdrawETH().

Param Name
Type
Description

vaultId

uint256

The id of the vault from which to withdraw the collateral

amount

uint256

The amount of ETH to be withdrawn

claimMimo()

Releases the outstanding MIMO balance.

lendPAR(uint256 _amount, address _to)

Lends PAR to an InceptionVault user.

Param Name
Type
Description

_amount

uint256

The amount of PAR to be lent

_to

address

The address of the InceptionVault user

transferMimo(uint256 _amount, address _to)

Transfers MIMO from the AdminInceptionVault to the _to address.

Param Name
Type
Description

_amount

uint256

Amount of MIMO to transfer

_to

address

Address to transfer MIMOs to

transferPar(uint256 _amount, address _to)

Transfers PAR from the AdminInceptionVault to the _to address.

Param Name
Type
Description

_amount

uint256

Amount of PAR to transfer

_to

address

Address to transfer PARs to

function deposit(IERC20 collateral, uint256 amount)

Calls VaultsCore deposit().

Param Name
Type
Description

collateral

IERC20

The address of the collateral type to be deposited

amount

uint256

The amount of tokens to be deposited

borrow(uint256 vaultId, uint256 amount)

Calls VaultsCore borrow().

Param Name
Type
Description

vaultId

uint256

The id of the vault from which to borrow

amount

uint256

The amount of stableX to borrow

View Methods

getA()

Returns the AddressProvider address.

getDebtNotifier()

Returns the DebtNotifier address.

getWeth()

Returns the WETH address.

getMimo()

Returns the MIMO address.

getInceptionCore()

Returns the InceptionVaultsCore address.

getCollateralCount()

Returns the number of collaterals used to borrow PAR.

getCollateral(uint256 _id)

Returns the address of a collateral for a specific id.

Call Params

Name
Type
Description

_id

uint256

Collateral id

Return Values

Name
Type
Description

NA

address

Collateral address

getCollateralId(address _collateral)

Returns a collateral id for a specific collateral address.

Call Params

Name
Type
Description

_collateral

address

Address of the collateral

Return Values

Name
Type
Description

NA

uint256

Collateral id

Last updated