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