At the time of writing, CompliFi only uses the latest proxied Chainlink price feeds (oracles), interacting with them through AggregatorV3Interface
In order for a vault to settle, it needs to receive the values for its derivative's underlying variable at two points in time - liveTime and settleTime. The algorithm for finding these values is specific to each oracle service. In case of Chainlink, redeeming users are required to submit underlyingStartRoundHints and underlyingEndRoundHints , which are then verified by the protocol as the oracle rounds closest toliveTime and settleTime .

Dealing with Price Feed Failure

CompliFi accepts external price feed data "as is", and its governance does not have the authority to modify the incoming data, nor to insert arbitrary price data points into Vaults. At the same time, Vaults rely on the availability of appropriate price data in order to achieve settlement. Should an external oracle malfunction and fail to provide the required data, Vaults that depend on it will remain in a state that prevents users from exchanging unequal quantities of primary and complement assets for collateral.
Protocol governance has to authority to extract collateral from a problematic Vault. Instead, in such cases the protocol relies on the feature that, at any point in the Vault's lifecycle, a user is able to call the refund function with equal amounts of primary and complement assets, and receive a fixed amount of the underlying collateral in return.
In a situation where fair settlement price is known to the market, but has simply not been delivered into the Vault, we expect this price to serve as a focal point in trading of the associated derivatives. In other words, users should be able to acquire primary or complement assets in the amount that makes their portfolios symmetric, and swap into collateral through the refund function with the symmetric quantities.
In situations where users cannot acquire the assets they are missing on the open market, a smart contract can be created that allows groups of users that agree on the fair settlement price to trustlessly pool their primary and complement assets and swap them for collateral, again using the symmetric refund.
Last modified 8mo ago