The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

accessing price for assets on the forex markets outside of the forex market hours.

Summary

The chainlink best practices for ETF and Forex feeds stipulates that, for assets on the Forex ( Foreign Exchange) markets, we should not use Forex feeds outside market hours for the specific currency.

Vulnerability Details

The chainlink best practices for ETF and Forex feeds stipulates that, for assets on the Forex ( Foreign Exchange) markets, we should not use Forex feeds outside market hours for the specific currency. The protocol uses the EUR/USD price feed with a market hour of forex but we can notice that, it's possible to take out new loans or repay our debt every day of the week ( Saturday included ) and these functionalities query the EUR/USD feed for the exchange rate. In other words, the protocol is clearly accessing this price feed outside the forex market hours.

// PriceCalculator::tokenToEurAvg method
(, int256 eurUsdPrice,,,) = clEurUsd.latestRoundData();
return collateralUsd / uint256(eurUsdPrice);

Impact

The protocol is accessing the EUR/USD price feed outside the recommended market hours and there's no telling what the deviation might be between real world price and the on-chain price of this pair during such hours.

The impact depends on the usage of the price info.
when it is used as part of the collateral for lenders:

  • Users can get better borrows if the price is above the actual price

  • Users can avoid liquidations if the price is under the actual price

Tools Used

Manual review

Recommendations

query/use the EUR/USD price feed only during the recommended forex market hours.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

forex

ljj Auditor
over 1 year ago
dimulski Auditor
over 1 year ago
greatlake Auditor
over 1 year ago
00xSEV Auditor
over 1 year ago
oxtenma Auditor
over 1 year ago
hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

forex

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.