Omniscia Boson Protocol Audit
BosonVoucher Code Style Findings
BosonVoucher Code Style Findings
BVR-01C: Potential Legibility Optimization
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | BosonVoucher.sol:L76 |
Description:
The voucher identification system of BosonVoucherBase::initializeVoucher has been updated to incorporate both the seller ID and the collection index, separating them with an underscore.
Example:
76string memory sellerId = string.concat(Strings.toString(_sellerId), "_", Strings.toString(_collectionIndex));Recommendation:
We advise an S prefix to be introduced to the _sellerId and a C prefix to be introduced to the _collectionIndex, increasing the legibility of the new identification system and allowing readers to immediately discern between the two numerical values without needing to memorize their order.
Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):
Our recommendation was applied properly, discerning between the seller ID and collection indexes with relevant capitalized-letter prefixes.
BVR-02C: Redundant Parenthesis Statements
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | BosonVoucher.sol:L113, L223, L279, L282, L317 |
Description:
The referenced statements are redundantly wrapped in parenthesis' (()).
Example:
113require((_tokenId < rangeStart) || (_tokenId >= rangeStart + range.length), EXCHANGE_ID_IN_RESERVED_RANGE);Recommendation:
We advise them to be safely omitted, increasing the legibility of the codebase.
Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):
All redundant parenthesis statements have been safely omitted.
