Omniscia SaucerSwap Labs Audit
Bits Code Style Findings
Bits Code Style Findings
BST-01C: Implied Order of Operations
Type | Severity | Location |
---|---|---|
Code Style | Bits.sol:L11 |
Description:
The referenced statement contains an implied rather than explicit order of precedence for the bitwise OR (|
) and bitwise shift (<<
) it performs.
Example:
contracts/libraries/Bits.sol
11return self | ONE << index;
Recommendation:
We advise the bitwise shift operation to be wrapped in parenthesis, clearly indicating it is meant to be performed before the bitwise OR (|
) operation.
Alleviation (a2c5a0b913a7ddc21ff96f97fa51f2820a5da7ec):
The SaucerSwap has evaluated this exhibit but has opted to retain the current behaviour of the codebase thus acknowledging the exhibit.