QA Report #36
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L729
Vulnerability details
Impact
If
startDropPerSecond
is initialized at less thanendDropPerSecond
the contract will be unusable. There will be an underflow in_updateDropPerSecond
which will always revert. This function is called throughout the contract, in critical functions likelock
andclaim
, if it were to always revert the contract would be broken and unusable.Proof of Concept
If
startDropPerSecond
is initialized at less thanendDropPerSecond
in the constructor, the contract will be deployed without issue but will be broken.Tools Used
Manual analysis
Recommended Mitigation Steps
Add a check in the constructor that ensures
startDropPerSecond
>=endDropPerSecond
The text was updated successfully, but these errors were encountered: