In the MembershipERC1155::burnBatchMultiple
function, while burning the tokens of multiple users can cause the function to run out of gas leading to a potential Denial of service.
This test was run using foundry.
=>POC
The gas usage for 100 people is significantly higher than the gas used for burning the tokens of 10 people.
As the number of addresses in the array increases, the gas consumed by burnBatchMultiple
could eventually exceed the block gas limit, making the transaction unprocessable.
If this function is needed for essential protocol operations, such as large-scale token burns in response to a governance vote or financial adjustment, then this vulnerability could disrupt or delay protocol operations.
manual review
Limit Address Count:
Enforce a maximum number of addresses in each burnBatchMultiple
call, ensuring that gas usage remains below the block limit.
eg:-
Iterative Batching:
Instead of burning for all addresses at once, consider a mechanism to process smaller batches iteratively across multiple transactions.
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.