The sendProfit
function does not validate whether amount
is positive or enforce a minimum value. This could allow an attacker to trigger unnecessary profit distribution calls, resulting in redundant gas usage or accidental zero-value distributions.
File: MembershipERC1155.sol
Function: sendProfit
An attacker could call sendProfit
with an amount
of zero, causing the Profit
event to trigger without adding any actual profit, generating misleading logs.
While this vulnerability does not have a severe financial impact, it allows attackers to spam the logs and incur unnecessary gas costs for both the contract and the user, potentially leading to log flooding or confusion about actual profits.
Manual review.
Add a validation to check for a non-zero amount
at the start of the function:
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.