Omniscia Boson Protocol Audit
OfferBase Code Style Findings
OfferBase Code Style Findings
OBE-01C: Invalid NatSpec Requirements
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | OfferBase.sol: • I-1: L33 • I-2: L100 |
Description:
The referenced requirements have been regressed based on PR#946, rendering them to be misleading as to the code's implementation.
Example:
contracts/protocol/bases/OfferBase.sol
89* Reverts if:90* - Valid from date is greater than valid until date91* - Valid until date is not in the future92* - Both fixed voucher expiration date and voucher redemption duration are defined93* - Neither of fixed voucher expiration date and voucher redemption duration are defined94* - Voucher redeemable period is fixed, but it ends before it starts95* - Voucher redeemable period is fixed, but it ends before offer expires96* - Dispute period is less than minimum dispute period97* - Resolution period is not between the minimum and the maximum resolution period98* - Voided is set to true99* - Available quantity is set to zero100* - Offer type is discovery and the price is not set to zeroRecommendation:
We advise them to be omitted, optimizing the code's documentation.
Alleviation:
The invalid comments have been removed as advised.
