code-423n4 / 2023-09-asymmetry-findings

2 stars 1 forks source link

Oracle data feeds are insufficiently validated #17

Closed c4-submissions closed 12 months ago

c4-submissions commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-09-asymmetry/blob/main/contracts/strategies/votium/VotiumStrategyCore.sol#L156-L186

Vulnerability details

Vulnerability Details

Recommended Mitigation Steps

Assessed type

Oracle

elmutt commented 1 year ago

thanks.

my understanding is that answeredInRound is deprecated: https://docs.chain.link/data-feeds/api-reference

we will add the other change tho

elmutt commented 1 year ago

https://github.com/asymmetryfinance/afeth/pull/157

0xleastwood commented 1 year ago

I'm not sure if updating cl.answer >= 0 to cl.answer > 0 is deservedly a medium severity issue. When would this even be the case?

c4-judge commented 1 year ago

0xleastwood marked the issue as primary issue

Rassska commented 1 year ago

@0xleastwood, very unlikely that the price will drop to 0. Anyways, agreed on the decision being made regarding the severity, since it looks more like an assertion over the sanity check.

0xleastwood commented 1 year ago

@0xleastwood, very unlikely that the price will drop to 0. Anyways, agreed on the decision being made regarding the severity, since it looks more like an assertion over the sanity check.

IIRC, non-functional oracles may return a negative value which should be validated but I think any non-negative values are acceptable values. Downgrading to QA.

c4-judge commented 1 year ago

0xleastwood changed the severity to QA (Quality Assurance)

c4-judge commented 1 year ago

0xleastwood marked the issue as grade-b