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.
_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()
depositETH()
Calls VaultsCore
depositETH()
.
depositETHAndBorrow(uint256 borrowAmount)
depositETHAndBorrow(uint256 borrowAmount)
Calls VaultsCore
depositETHAndBorrow()
.
borrowAmount
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()
.
_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)
withdraw(uint256 vaultId, uint256 amount)
Calls VaultsCore
withdraw()
.
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)
withdrawETH(uint256 vaultId, uint256 amount)
Calls VaultsCore
withdrawETH()
.
vaultId
uint256
The id of the vault from which to withdraw the collateral
amount
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.
_amount
uint256
The amount of PAR to be lent
_to
address
The address of the InceptionVault
user
transferMimo(uint256 _amount, address _to)
transferMimo(uint256 _amount, address _to)
Transfers MIMO from the AdminInceptionVault
to the _to
address.
_amount
uint256
Amount of MIMO to transfer
_to
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.
_amount
uint256
Amount of PAR to transfer
_to
address
Address to transfer PARs to
function deposit(IERC20 collateral, uint256 amount)
function deposit(IERC20 collateral, uint256 amount)
Calls VaultsCore
deposit()
.
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)
borrow(uint256 vaultId, uint256 amount)
Calls VaultsCore
borrow()
.
vaultId
uint256
The id of the vault from which to borrow
amount
uint256
The amount of stableX
to borrow
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
_id
uint256
Collateral id
Return Values
NA
address
Collateral address
getCollateralId(address _collateral)
getCollateralId(address _collateral)
Returns a collateral id for a specific collateral address.
Call Params
_collateral
address
Address of the collateral
Return Values
NA
uint256
Collateral id
Last updated