Oracles
Last updated
Last updated
defi.money has developed a custom Oracle solution that is designed for use in L2 and sidechain environments where gas costs are negligible. In short, it calculates an exponential moving average from a Chainlink feed.
The reason an EMA is calculated despite the high gas costs associated with that is that the price data from raw Chainlink feeds can be jittery, especially for less-liquid assets:
For loans in Collateral conversion, that kind of jittery-ness could lead to unnecessary losses as the Automated Loan Protection system would trigger more than necessary, trading the collateral back and forth to keep the loan backed while maintaining as much collateral as possible for the user. defi.money's custom EMA implementation ensures this is not a problem, by being smooth enough to prevent unnecessary trading while in Collateral conversion, while tracking the price reliably, to ensure no bad debt in the protocol.
The implementation can be found here:
The audit of the implementation can be found here:
For non-Chainlink supported chain defi.money uses RedStone Oracles as the source of price data. RedStone is a Modular Oracle that delivers frequently updated, reliable, and diverse data feeds in a few models. Defi.money utilizes the Push model which ensures that data is pushed into on-chain storage via a relayer with set conditions (with a heartbeat and deviation threshold).