The InheritanceManager::inherit()
flips the isInherited
boolean value if there are > 2 beneficiaries
in the array. At this point, funds can be distributed between the beneficiaries. Logically, any change in funds or assets at this point should be agreed upon by all beneficiaries. However, the owner still maintains full access and can change contract balances, change beneficiaries, create NFTs and access any onlyOwner functions they like. This should not be possible. This case in inherit()
should reset the owner variable back to address(0).
Owner access to functions is not locked after inheritance and this interferes with fund allocation for beneficiaries and also allows for changes in beneficiaries.
Add the following to InheritanceManager.t.sol
and run the test:
Expected result:
Remove owner privileges after inheritance and set owner
variable to address(0).
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.