code-423n4 / 2021-08-notional-findings

3 stars 0 forks source link

`DateTime.isValidMarketMaturity` bounds should be tighter #81

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

cmichel

Vulnerability details

Vulnerability Details

DateTime.isValidMarketMaturity can be called with a maxMarketIndex < 10 but the inner DateTime.getTradedMarket(i) function will revert for any values i > 7.

Impact

"Valid" maxMarketIndex values above 7 will break and return with an error.

Recommended Mitigation Steps

The upper bound on maxMarketIndex should be set to 7.