Note that this is actually a low level severity issue.
The check in MainHelper.sol on the number of tokens deposited is off by one, meaning that instead of allowing to deposit MAX_TOTAL_TOKEN_NUMBER tokens, it allows MAX_TOTAL_TOKEN_NUMBER + 1 tokens.
Recommendation\
Consider the following change:
...
- if (userTokenData[_nftId].length > MAX_TOTAL_TOKEN_NUMBER) {
+ if (userTokenData[_nftId].length >= MAX_TOTAL_TOKEN_NUMBER) {
revert TooManyTokens();
}
...
Github username: @bahurum Twitter username: bahurum Submission hash (on-chain): 0xeb9b01b0239038e2046821da7520c0f0ce211ee751d1d0394967435e36c2d3ed Severity: medium
Description: Description
Note that this is actually a low level severity issue.
The check in
MainHelper.sol
on the number of tokens deposited is off by one, meaning that instead of allowing to depositMAX_TOTAL_TOKEN_NUMBER
tokens, it allowsMAX_TOTAL_TOKEN_NUMBER + 1
tokens.Recommendation\ Consider the following change: