wise-foundation / lending-audit

5 stars 4 forks source link

[OHR-07C] Unclear Order of Operations #88

Open vm06007 opened 1 year ago

vm06007 commented 1 year ago

OHR-07C: Unclear Order of Operations

Type Severity Location
Code Style OracleHelper.sol:L219

Description:

The referenced statement contains operations that, while correct, have an unclear order of execution.

Example:

uint256(_phaseId) << 64 | _aggregatorRoundId

Recommendation:

We advise the code to wrap the bitwise shift operation (<<) in parenthesis (()), explicitly denoting its precedence over the bitwise OR (|) operator applied to the highlighted statement.

vm06007 commented 1 year ago

Resolved in: https://github.com/wise-foundation/lending-audit/pull/86