Project

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

Incorrect assignment of function variable instead of storage variable in `updateDAOMembership`

Summary

The updateDAOMembershipfunction should be able to update the existing DAO's parameters but it updates the passed params of function instead of the original dao value.

Vulnerability Details

The function:

function updateDAOMembership(string calldata ensName, TierConfig[] memory tierConfigs)
...
// Preserve minted values and adjust the length of dao.tiers
for (uint256 i = 0; i < tierConfigs.length; i++) {
if (i < dao.tiers.length) {
@> tierConfigs[i].minted = dao.tiers[i].minted; //@audit - should be the opposite
}
}
...
}

Impact

mintedamount of DAO will never be able to be updated.

Tools Used

Manual review.

Recommendations

Flip the assignment:

dao.tiers[i].minted = tierConfigs[i].minted;
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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