The InheritanceManager contract is expected to reset the deadline to 90 days from the last interaction time. However, this functionality is missing in the InheritanceManager.sol::contractInteractions, InheritanceManager.sol::createEstateNFT, and InheritanceManager.sol::removeBeneficiary functions. This omission allows beneficiaries to take over the contract, even when the owner has recently interacted with it. This defeats the purpose of the lock time, which is intended to safeguard against premature inheritance while the owner remains active.
The following test case demonstrates the issue and can be added to InheritanceManagerTest.t.sol.
Premature contract takeover, compromising the owner's control despite recent activity.
Foundry Test
Ensure that the deadline is reset each time these critical functions are invoked. Below is a proposed fix:
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.