Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

The OWPIdentity contract needs to override the burnBatchMultiple function

Summary

The OWPIdentity contract does not override the burnBatchMultiple function

Vulnerability Details

The OWPIdentity contract overrides both burn and burnBatch functions.

The OWPIdentity contract overrides the burn function to reduces the erc1155 balance of the specified account for the given id by the specified amount, and also updates the internal state to reflect the burned erc1155 tokens.

function burn(address account, uint256 id, uint256 amount)
public override
onlyRole(MINTER_ROLE)
{
_burn(account, id, amount);
}

The OWPIdentity contract overrides the burnBatch function to burn erc1155 tokens in batch in a single transaction and also updates the internal state to reflect the burned erc1155 tokens.

function burnBatch(address to, uint256[] memory ids, uint256[] memory amounts)
public override
onlyRole(MINTER_ROLE)
{
_burnBatch(to, ids, amounts);

But the OWPIdentity contract does not override the burnBatchMultiple function.

function burnBatchMultiple(address[] memory tos, uint256[] memory ids, uint256[] memory amounts)
public
onlyRole(MINTER_ROLE)
{
require(tos.length == ids.length, "Invalid input");
require(amounts.length == ids.length, "Invalid input");
for(uint256 i = 0; i < tos.length; i++){
_burn(tos[i], ids[i], amounts[i]);
}
}

Impact

leaving burnBatchMultiple non-overridden can lead to inconsistencies in functionality.

Tools Used

manual

Recommendations

override burnBatchMultiple.

function burnBatchMultiple(address[] memory tos, uint256[] memory ids, uint256[] memory amounts)
public override
onlyRole(MINTER_ROLE)
{
require(tos.length == ids.length, "Invalid input");
require(amounts.length == ids.length, "Invalid input");
for(uint256 i = 0; i < tos.length; i++){
_burn(tos[i], ids[i], amounts[i]);
}
}
Updates

Lead Judging Commences

0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!