Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

Violation Of Protocol Invariant "EVERY transaction the owner does with this contract must reset the 90 days timer" In Multple FUnctions

Summary

The protocol invariant "EVERY transaction the owner does with this contract must reset the 90 days timer" is violated in multiple onlyOwner functions that do not update the deadline.

Vulnerability Details

There are multiple onlyOwner functions that do not update the deadline by not calling the InheritanceManager::_setDeadline() function.

function createEstateNFT(string memory _description, uint256 _value, address _asset) external onlyOwner {
uint256 nftID = nft.createEstate(_description);
nftValue[nftID] = _value;
assetToPay = _asset;
}
function removeBeneficiary(address _beneficiary) external onlyOwner {
uint256 indexToRemove = _getBeneficiaryIndex(_beneficiary);
delete beneficiaries[indexToRemove];
}
function contractInteractions(address _target, bytes calldata _payload, uint256 _value, bool _storeTarget)
external
nonReentrant
onlyOwner
{
(bool success, bytes memory data) = _target.call{value: _value}(_payload);
require(success, "interaction failed");
if (_storeTarget) {
interactions[_target] = data;
}
}

Impact

  1. Protocol invariant violation

Tools Used

  1. Manual review

Recommendations

  1. Ensure you update the InheritanceManager::deadlineby calling the InheritanceManager::_setDeadline()every time an onlyOwnerfunction is called.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 5 months ago
Submission Judgement Published
Validated
Assigned finding tags:

functions do not reset the deadline

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.