AdminInceptionVault
Last updated
Last updated
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.
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 |
---|---|---|
depositETH()
Calls VaultsCore
depositETH()
.
depositETHAndBorrow(uint256 borrowAmount)
Calls VaultsCore
depositETHAndBorrow()
.
depositAndBorrow(address _collateralType, uint256 _depositAmount, uint256 _borrowAmount)
Calls VaultsCore
depositAndBorrow()
.
withdraw(uint256 vaultId, uint256 amount)
Calls VaultsCore
withdraw()
.
withdrawETH(uint256 vaultId, uint256 amount)
Calls VaultsCore
withdrawETH()
.
claimMimo()
Releases the outstanding MIMO
balance.
lendPAR(uint256 _amount, address _to)
Lends PAR to an InceptionVault
user.
transferMimo(uint256 _amount, address _to)
Transfers MIMO from the AdminInceptionVault
to the _to
address.
transferPar(uint256 _amount, address _to)
Transfers PAR from the AdminInceptionVault
to the _to
address.
function deposit(IERC20 collateral, uint256 amount)
Calls VaultsCore
deposit()
.
borrow(uint256 vaultId, uint256 amount)
Calls VaultsCore
borrow()
.
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
Return Values
getCollateralId(address _collateral)
Returns a collateral id for a specific collateral address.
Call Params
Return Values
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Param Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
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
borrowAmount
uint256
The amount of borrowed StableX tokens in WEI
_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
vaultId
uint256
The id of the vault from which to withdraw the collateral
amount
uint256
The amount of ERC20 tokens to be withdrawn
vaultId
uint256
The id of the vault from which to withdraw the collateral
amount
uint256
The amount of ETH to be withdrawn
_amount
uint256
The amount of PAR to be lent
_to
address
The address of the InceptionVault
user
_amount
uint256
Amount of MIMO to transfer
_to
address
Address to transfer MIMOs to
_amount
uint256
Amount of PAR to transfer
_to
address
Address to transfer PARs to
collateral
IERC20
The address of the collateral type to be deposited
amount
uint256
The amount of tokens to be deposited
vaultId
uint256
The id of the vault from which to borrow
amount
uint256
The amount of stableX
to borrow
_id
uint256
Collateral id
NA
address
Collateral address
_collateral
address
Address of the collateral
NA
uint256
Collateral id