Submitted by cccz
In the \_pledge function, require delegationBoost.adjustedbalanceof(pledgeParams.receiver) + amount <= pledgeParams.targetVotes.
In reality, when the user pledges the amount of votes, the actual votes received by the receiver are the bias in the following calculation. And the bias will be less than amount due to the loss of precision.
This means that the balance of receiver may not reach targetVotes
https://github.com/code-423n4/2022-10-paladin/blob/d6d0c0e57ad80f15e9691086c9c7270d4ccfe0e6/contracts/WardenPledge.sol#L245-L246
https://github.com/curvefi/curve-veBoost/blob/master/contracts/BoostV2.vy#L192-L209
https://github.com/curvefi/curve-veBoost/blob/master/contracts/BoostV2.vy#L175
Use bias instead of amount in the check below:
Kogaroshi (Paladin) acknowledged and commented:
