Price Oracles
Last updated
Last updated
All Mirage AI Vaults have a concept of a price oracle
set by vault owners on the MirageAIStandardManager. These price oracles are used as a third-party check on executor
management calls to a vault.
We use our own standard interface for oracle reads and thus we can seamlessly integrate any type of onchain oracle price feed no matter the interfaces/patterns (RedStone, Chainlink, Uni V3 TWAP, etc) -- just by defining a simple Oracle Wrapper smart contract.
To accelerate the integration of safe public and private Meta Vaults for newer tokens that may not already have performant oracle feeds onchain, we refer clients to our oracle partner .
Mirage AI implements a standard oracle interface that must be followed:
Any smart contract that utilizes this interface can function as an oracle on the Mirage AI standard manager. This interface is consumed during MirageAIStandardManager.rebalance here:
we store vaultInToken1BeforeRebalance
and then compare it to the value after rebalance. Further checks can be implemented at the module level with oracle price feeds thanks to this call here: