Quorum math is wrong as user cotes are bias with decay, but quorum is bias without decay. Thus even if 100% of the users voted, their voting power will be way less than the totalSupply of veRAAC, which is used for quorum math.
1 When user cast votes getVotingPower is used to retrieve there voting power
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/proposals/Governance.sol#L181
Where user voting power is the current decayed bias. In simple terms if a user has 1000 bias at day 1 of his 1 year stake, on the 6th month he will have 500 bias, as the other 500 has linearly decayed.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/veRAACToken.sol#L426
2 When users lock their tokens they get minted 100% of their initial bias. The totalSupply also gets increased by that
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/veRAACToken.sol#L212
With these 2 in mind we can see an issue appear inside Governance::state, where we are comparing currentQuorum, which is user votes (decayed bias) to quorum, which is a simple math equation multiplying veRAAC totalSupply by quorum percentage.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/proposals/Governance.sol#L288
Example:
There are 100k tokens minted
The average user has locked for 2 years and it's currently year 1
A proposal is made with 20% quorum
Users vote on it, but the current active voting power that can be used for voting is 50k
15k of voting power is used, which is 30% of all active one
This is compared against 100k * 20% = 20k and the vote fails to reach quorum
We are comparing active voting power against originally minted one. The comparison won't be correct, which will result in the failure of many proposals.
Quorums will be hard to reach.
Proposals with voting power more than the current quorum will sill struggle to pass.
Quorum math will always be wrong, this makes the bug more impactful as with time the difference between the 2 will expand even more, to a point where not proposals would be able to meet the quorum.
Manual review
Either have a variable to track decayed voting power, or user balances as voting power.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.