Documentation
  • ๐Ÿ’ฐGetting Started
    • Welcome to the new era of $MONEY
    • Audits
  • ๐Ÿ“–Tutorials
    • How to mint $MONEY
    • Manage loan
    • Close loan
    • Bridge
    • Leverage (v2)
  • ๐Ÿ”ฌHow does it work?
    • How is $MONEY made
    • Automated Loan Protection
    • Collateral conversion
    • Liquidation
    • Loan health
    • Bands
    • Borrow rate
  • ๐Ÿ’ฒMONEY
    • MONEY: a stablecoin
    • sMONEY: yield-bearing money
  • โš™๏ธProtocol components
    • Peg Keepers
    • Oracles
    • Market Hooks
    • Fee Module
  • ๐Ÿช™Points
    • Earn points
    • Referral Program
  • โœจDeployments
    • Contracts Addresses
  • ๐Ÿ—ฝGovernance
    • In development
  • ๐ŸŒ…Brand
    • Brand Assets
Powered by GitBook
On this page
  1. Protocol components

Oracles

PreviousPeg KeepersNextMarket Hooks

Last updated 7 months ago

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

For non-Chainlink supported chain defi.money uses RedStone Oracles as the source of price data. is a Modular Oracle that delivers frequently updated, reliable, and diverse data feeds in a few models. Defi.money utilizes the model which ensures that data is pushed into on-chain storage via a relayer with set conditions (with a heartbeat and deviation threshold).

RedStone
Push
โš™๏ธ
dfm-contracts/contracts/cdp/oracles/ChainlinkEMA.sol at main ยท defidotmoney/dfm-contractsGitHub
audits/audits/ChainlinkEMA - BailSec - June 2024.pdf at main ยท defidotmoney/auditsGitHub
Logo
Logo
Example of a raw Chainlink feed for the $OP token (red)
Page cover image