Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

`InheritanceManager::setDeadline` is not initialised in the constructor which means the inactivity timer does not start.

Description

_setDeadline is not initialised in the constructor of the contract, meaning deadline is 0 until an action with _setDeadline is called by the owner, which would set it to block.timestamp + TIMELOCK.

Impact

The protocol will not function as expected or as intended.

Proof of Concept

Add the following code to InheritanceManagerTest.t.sol:

function test_deadlineNotSet() public {
assertEq(0, im.getDeadline());
}

The result should be a number along the lines of block.timestamp + 7776000, however the assertion above passes.

Tools Used

Manual review, Foundry

Recommended Mitigation

Add the following line to the constructor to ensure the deadline is set correctly.

constructor() {
owner = msg.sender;
nft = new NFTFactory(address(this));
+ _setDeadline();
}
Updates

Lead Judging Commences

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

constructor does not initialize deadline

Appeal created

0xnick Auditor
6 months ago
0xtimefliez Lead Judge
6 months ago
0xtimefliez Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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