Improperly Skewed Governance Mechanism #232
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
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraLocker.sol#L594-L609
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraLocker.sol#L611-L618
Vulnerability details
ALR-02H: Improperly Skewed Governance Mechanism
Description
The balance checkpointing system exposed by the contract for governance purposes is flawed as it does not maintain voting balances properly. In detail, the total supply of votes is tracked as the sum of all locked balances, however, the total voting power of an individual only tracks delegated balances. As a result, governance percentage thresholds will be significantly affected and potentially unmet.
Impact
The governance module may be unusable due to the significant discrepancy between "circulating" voting power supply and the actual voting power of each individual summed up.
Solution (Recommended Mitigation Steps)
We advise the total voting supply to properly track the delegated balances only as otherwise, any system relying on proportionate checkpointed balances will fail to function properly.
PoC
Issue is deducible by inspecting the relevant lines referenced in the issue and making note of the calculations within the
getPastVotes
individual voting power function as well as thegetPastTotalSupply
cumulative voting power function.Tools
Manual inspection of the codebase.
The text was updated successfully, but these errors were encountered: