QA Report #209
Labels
bug
Something isn't working
grade-b
Q-49
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Missing check for
votesDifference
There is no check for
votesDifference
in https://github.com/code-423n4/2022-10-paladin/blob/d6d0c0e57ad80f15e9691086c9c7270d4ccfe0e6/contracts/WardenPledge.sol#L325. Ifreceiver
balance of veCRV equalstargetVotes
this would create aPledge
with zerototalRewardAmount
, making this pledge useless as no rational user will pledge without receiving rewards.Please consider checking
vars.votesDifference > 0
and reverting with the appropriate error.totalDelegatedAmount
andrewardAmount
calculated incorrectlyThe following expression for calculating
totalDelegatedAmounts
has an extrabias
term (https://github.com/code-423n4/2022-10-paladin/blob/d6d0c0e57ad80f15e9691086c9c7270d4ccfe0e6/contracts/WardenPledge.sol#L259-L265), opposed to what is defined in boostV2 contract (https://github.com/curvefi/curve-veBoost/blobdb3dec43b6e4fac0fca1f01509f9133563f43ebb/contracts/BoostV2.vy#L191-L206). Therefore thetotalDelegatedAmounts
overstates the actual amount pledged per sec, consequently also overstatingrewardAmount
.Please consider removing the extra bias term, as shown below.
The text was updated successfully, but these errors were encountered: