Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Valid

eachTradeMax error

Summary

The rate must be less or same due to the architecture of the protocol, but the checker reverts when the value is same.

Vulnerability Details

// source: ./src/core/PreMarkets.sol::createOffer(CreateOfferParams calldata params)
if (params.eachTradeTax > Constants.EACH_TRADE_TAX_DECIMAL_SCALER) {
revert InvalidEachTradeTaxRate();
//the rate must be less or same, but in the if checker reverts when the value is same.
}

Impact

the information of the architect and the actual rate is different. but no other severe issues.

Tools Used

VScode, foundry

Recommendations

short term: set the phrase to

params.eachTradeTax >= Constants.EACH_TRADE_TAX_DECIMAL_SCALER

in the if checker.

long term: adjust the other if-logic codes if there is additional issues.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-PreMarkets-off-by-one-Trade-TAX-100%

Similar to issue #1323, Despite this off-by-one error of the intended check, the difference between 99% and 100% is minimal, so I believe whether or not 100% is allowed has minimal impact. Ultimately, takers should not be realistically creating offer with such tradeTax

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!