Several functions within the InheritanceManager contract, which should ideally reset the inactivity timer upon execution by the contract owner, lack calls to the _setDeadline()
function. This omission creates inconsistencies in the contract's intended behavior regarding the inactivity period and could lead to unexpected or premature inheritance claims by beneficiaries.
The contract relies on the deadline
state variable to determine if the owner has been inactive for a period (defined by TIMELOCK
). Every owner-controlled action should logically reset this timer. However, the following functions, which are owner-controlled and modify important contract data or perform asset operations, do not reset the deadline:
Description: Allows the owner to interact with other contracts, including sending Ether and calling functions.
Issue: This function represents a significant interaction with the contract and should reset the deadline, as it implies active management of the wallet.
Code:
Description: Creates an NFT representing an underlying asset (e.g., real estate) and associates it with a value.
Issue: This is an important action that should reset the deadline, as it represents the owner actively managing their assets.
Code:
Description: Removes a beneficiary from the beneficiaries
array.
Issue: Modifying the list of beneficiaries is a critical action that should reset the deadline.
Code:
If the owner actively uses these functions but does not trigger other functions that update the deadline, beneficiaries might be able to claim the inheritance prematurely because the deadline will have expired, even though the owner is technically active. The owner loses control over the inheritance logic, and it may be executed prematurely.
Manual Code Review
_setDeadline()
in Missing FunctionsModify the following functions to include a call to _setDeadline()
at the end of their execution:
contractInteractions()
createEstateNFT()
removeBeneficiary()
Create a modifier to verify the user is an owner and set the deadline.
Update the functions to use this modifier instead of onlyOwner
:
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.