Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

The `Godfather` can’t withdraw money.

Summary

Godfather is not able to withdraw USDC because does not have the gangmember role.

Vulnerability Details

function withdrawMoney(
address account,
address to,
uint256 amount
)
external
onlyRole("gangmember")
isAuthorizedOrRevert(account)
{
moneyShelf.withdrawUSDC(account, to, amount);
}

Impact

Godfather can’t withdraw money. (USDC from the Moneyshelf module)

Tools Used

Manual review

Recommendations

Write a modifier that comprehends both gang members and Godfather and add it to the function as access control.

Make this change to the code:

function withdrawMoney(
address account,
address to,
uint256 amount
)
external
- onlyRole("gangmember")
+ onlyRole(“gangmember or Godfather”);
isAuthorizedOrRevert(account)
{
moneyShelf.withdrawUSDC(account, to, amount);
}
Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

GodFather is not a gang member

Support

FAQs

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