code-423n4 / 2023-09-delegate-findings

2 stars 1 forks source link

Condition will not revert when block.timestamp is == to the compared variable #287

Closed c4-submissions closed 11 months ago

c4-submissions commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-09-delegate/blob/main/src/libraries/CreateOffererLib.sol#L328 https://github.com/code-423n4/2023-09-delegate/blob/main/src/libraries/DelegateTokenStorageHelpers.sol#L162

Vulnerability details

Condition will not revert when block.timestamp is == to the compared variable The condition does not revert when block.timestamp is equal to the compared > or < variable. For example, if there is a check for block.timestamp > proposerSignature.expirationTimestamp then there should be a check for cases where block.timestamp is == to proposerSignature.expirationTimestamp

Instances (2):

https://github.com/code-423n4/2023-09-delegate/blob/main/src/libraries/CreateOffererLib.sol#L328

File: example/CreateOffererLib.sol

328:             return block.timestamp + expiryLength;

https://github.com/code-423n4/2023-09-delegate/blob/main/src/libraries/DelegateTokenStorageHelpers.sol#L162

File: example/DelegateTokenStorageHelpers.sol

162:         if (block.timestamp < readExpiry(delegateTokenInfo, delegateTokenId)) {

Assessed type

Other

c4-judge commented 12 months ago

GalloDaSballo changed the severity to QA (Quality Assurance)

GalloDaSballo commented 12 months ago

Off by one

GalloDaSballo commented 11 months ago

L