The createOffer
function in the PreMarkets contract lacks comprehensive input validation. While it checks for non-zero values of params.points
and params.amount
, it doesn't implement upper bound checks, potentially allowing extremely large values to be accepted.
Acceptance of extremely large values could lead to unexpected behavior, including potential overflow in subsequent calculations, excessive gas consumption, or economic imbalances in the system.
Manual Review
Implement upper bound checks for params.points
and params.amount
:
Consider implementing reasonability checks based on the expected use case of the contract.
Add checks for other parameters in the CreateOfferParams
struct to ensure they are within acceptable ranges.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.