The InheritanceManager
contract is designed to facilitate secure asset inheritance, enforcing a 90-day inactivity period before beneficiaries can claim assets. A core assumption outlined in the project documentation is that "EVERY transaction the owner does with this contract must reset the 90 days timer." However, a flaw has been identified: when the owner calls the createEstateNFT
function to mint an NFT, the 90-day timer does not reset. This violates the contract’s stated invariant and could lead to premature inheritance claims, despite the owner’s active engagement with the contract.
The createEstateNFT
function allows the owner to mint NFTs representing real-world assets. According to the project’s core assumptions, any transaction initiated by the owner such as minting an NFT should reset the 90-day inactivity timer. However, the current implementation of createEstateNFT
does not trigger the _setDeadline()
function (or equivalent), which is responsible for updating the timer. As a result, the contract fails to recognize this owner activity, potentially allowing the timer to expire even when the owner is actively managing the contract.
Consider the following sequence of events:
Day 0: The owner interacts with the contract, resetting the timer to 90 days.
Day 89: The owner calls createEstateNFT
to mint a new NFT.
Day 91: Since the timer was not reset on day 89, the inheritance mechanism is triggered, allowing beneficiaries to claim assets.
In this case, the owner’s recent activity (minting an NFT) is not accounted for, leading to an incorrect assumption of inactivity and premature access to the contract’s assets by beneficiaries.
The failure to reset the timer when the owner calls createEstateNFT
has the following consequences:
Premature Inheritance Claims: Beneficiaries may gain access to the contract’s assets before the owner has truly been inactive for 90 days, violating the contract’s intended security mechanism.
Misalignment with Owner Intent: The owner’s active management of the contract (e.g., minting NFTs) is not reflected in the timer, potentially leading to unintended asset transfers.
Operational Risk: The flaw introduces uncertainty into the contract’s behavior, as the timer may not accurately represent the owner’s engagement, increasing the risk of disputes or operational errors.
Update the createEstateNFT
Function
Modify the createEstateNFT
function to call _setDeadline()
(or the equivalent function that resets the timer) after minting the NFT. This ensures that the timer is updated whenever the owner interacts with the contract, including when creating an NFT.
Updated Code Example:
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.