Description:Description\
There is an inconsistency in how the contract checks the expiration time of a humanity across different functions.
Specifically, the isClaimed and boundTo functions use >= to compare the expirationTime with the current timestamp, while the isHuman function uses a > comparison.
This discrepancy can result in an off-by-one error where a humanity that has an expiration time exactly equal to the current timestamp.
Such inconsistency can lead to unexpected behavior and potential vulnerabilities in the contract's logic.
Implement a "centralized" function that checks the validity of data and is used in all the other relevant functions that use these checks and update the data.
Github username: -- Twitter username: dod4ufn Submission hash (on-chain): 0x28e7489aaa6f851dab0f1ef245b5887370a9d7572b54056fe109248e2e373a35 Severity: low
Description: Description\ There is an inconsistency in how the contract checks the expiration time of a humanity across different functions. Specifically, the
isClaimed
andboundTo
functions use>=
to compare theexpirationTime
with the current timestamp, while theisHuman
function uses a>
comparison. This discrepancy can result in an off-by-one error where a humanity that has an expiration time exactly equal to the current timestamp. Such inconsistency can lead to unexpected behavior and potential vulnerabilities in the contract's logic.In the CrossChainProofOfHumanity.sol file:
Implement a "centralized" function that checks the validity of data and is used in all the other relevant functions that use these checks and update the data.