InceptionVaultPriceFeed

In order to give owners and users access to a maxmium of collateral types we cannot limit the inception vault to only one oracle such as chainlink. As price query logics differ from one oracle to another, the InceptionVaultPriceFeed contract acts as an intermediary contract to be able to integrate any oracle logic into a standard interface. This way owners will also be able to create their own oracle for their inception vault.

This increased flexibility for owners could lead to dishonest behaviours by either modifying the original InceptionVaultPriceFeed contract and using a custom InceptionVaultPriceFeed and/or using a custom oracle giving the owner access to price manipulation.

To address those risks, in order to be listed on the Mimo webapp, the deployed InceptionVaultPriceFeeds will have to meet 2 requirements :

  1. The deployed contract will have to have used an approved InceptionVaultPriceFeed

  2. The oracle set in the InceptionPriceFeed will have to be approved

The only way to use an approved InceptionVaultPriceFeed is to use the address of one of the base InceptionVaultPriceFeeds (Chainlink, UniV3...) deployed by the team as the _inceptionVaultPriceFeed argument and a non address(0) argument as the _assetOracle. By doing so the selected InceptionVaultPriceFeed will be cloned and the InceptionVault struct will have an isCustomPriceFeed of false.

The oracle verification will have to be done by the team directly with the current design.

Write Methods

initialize(IAddressProvider _addresses, address inceptionCollateral, address assetOracle, AggregatorV3Interface eurOracle)

Initializer function to set state variables upon cloning.

Requirements :

  • Can only be called once

View Methods

getAssetPrice()

Returns the asset price in EUR (PAR).

Requirements :

  • Inception collateral oracle must return a price greater than 0

  • Inception collateral oracle must return a price updated less than 24 hours ago

  • EUR/USD oracle must return a price updated less than 24 hours ago

  • EUR/USD collateral oracle must return a price greater than 0

convertTo(uint256 _amount)

Converts a stableX amount into an inception collateral amount at current price.

Call Params

Return Values

convertFrom(uint256 _amount)

Converts an inception collateral amount into an stableX amount at current price.

Call Params

Return Values

getA()

Returns the AddressProvider address.

getInceptionCollateral()

Returns the inception collateral address.

getAssetOracle()

Returns the inception collateral oracle address.

getEurOracle()

Returns the EUR/USD oracle address.

Last updated