Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.22 KB

System always assumes USDC is equivalent to USD.md

File metadata and controls

27 lines (23 loc) · 1.22 KB

Throughout the system, assimilators are used to facilitate the processing of various stablecoins.

However, the UsdcToUsdAssimilator’s implementation of the getRate method does not use the USDC-USD oracle provided by Chainlink; instead, it assumes 1 USDC is always worth 1 USD. A deviation in the exchange rate of 1 USDC = 1 USD could result in exchange errors.

Recommendation:

Short term, replace the hard-coded integer literal in the UsdcToUsdAssimilator_’s getRate` method with a call to the relevant Chainlink oracle, as is done in other assimilator contracts. Long term, ensure that the system is robust against a decrease in the price of any stablecoin.


Slide Screenshot

057.jpg


Slide Text

  • ToB Audit DFX Finding 13
  • Data Validation
  • Medium Severity
  • Incorrect Assumption
  • 1 USDC == 1 USD
  • Avoide Hardcoding
  • Use Price Oracle

References


Tags