The createOffer
function within the PreMarkets
contract performs limited input validation. While it ensures that params.points
and params.amount
are non-zero, it does not impose upper limits on these values, potentially permitting extremely large values to be submitted.
Permitting excessively large values could trigger unintended behavior, such as overflows in subsequent calculations, excessive gas consumption, or even destabilization of the system’s economic model.
The following demonstrates how this issue might be exploited:
Link to code
Add upper bounds validation for params.points
and params.amount
:
Conduct reasonability checks based on the intended use of the contract to ensure inputs fall within practical ranges.
Extend validation to other parameters within the CreateOfferParams
struct to confirm they are within acceptable limits.
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.