Use EnumerableSet instead for storing benefitancies to fix multiple problem.
removeBenefitancy is wrong if you called with address not in the benefitancies, as it will set the first address into address zero and not removing address.
Address inbenefitancies can be duplicated.
A address in later index of benefitancies will have a higher gas cost from interacting with the contract.
A first benefitancy will lose access to fund and split calculation will be wrong. Gas can be problematic with high amount of benefitancies.
Foundry
Use OpenZeppelin's EnumerableSet instead of having a benefitancies array. As it has O(1) for read for onlyBeneficiaryWithIsInherited and a function for add and remove benefitancies correctly
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.