In the PreMarkets contract, the offerId
is incremented without checking for potential overflow:
If offerId
reaches its maximum value (2^256 - 1 for uint256), it will wrap around to zero on the next increment.
An overflow of offerId
could lead to reuse of existing IDs, potentially causing conflicts in offer management, corrupting data structures, and compromising the integrity of the entire system.
Use OpenZeppelin's SafeMath library
Consider implementing a maximum limit for offerId
and handle the case when this limit is reached.
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.