Possibility of integer overflow and underflow in MembershipERC1155::mint
and MembershipERC1155::burn
. Missing emitted events.
Solidity does not handle floating-point arithmetic, and 2 ** -2
would imply 1 / (2 ** 2)
or 0.25
, which is not representable as an integer in Solidity. Therefore, if tokenId is 8 or any value greater than 6, the expression would revert due to an invalid exponent.
It is good practice events to be emited when performing burn
or mint
of tokens for better tokens tracking.
Function will revert.
Manual review
To prevent this, you should limit the range of tokenId using a require statement to ensure that tokenId stays within the intended range (e.g., 0 <= tokenId <= 6).
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.