QA Report #145
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
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")
Reinitalisation in BkdLocker.sol
In the
initialize()
function, the only check is made that the currentstartBoost
value is zero, if zero is passed then this allows the function to be reinitialised and potentially modifying other variables which should remain constant.Consider making a check that the passed value of
startBoost
is nonzero.https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/BkdLocker.sol#L59
Additionally, in
initialize()
no check is made thatMAX_BOOST
is larger thanSTART_BOOST
, if this is the case then calculation made here incomputeNewBoost()
will revert due to an arithmetic underflow preventing any further call which deals with claiming fees, staking or withdrawing tokens.Make a check in the
initialize()
function to make sure thatmax boost
is larger thanstart boost
The text was updated successfully, but these errors were encountered: