Submitted by 0xpiken, also found by Infect3d, Toshii, Aymen0909 (1, 2), jasonxiale, Draiakoo, zhaojie, solmaxis69, t0x1c, 0xRobocop, 0xBinChook, J4X (1, 2), klau5, 0xWaitress, cats, and haxatron
SALT staker might have chance to finalize the vote by manipulating the required quorum.
When a proposal is created, anyone can vote by calling Proposals#castVote() as far as they have voting power.
Anyone can finalize the vote on a specific ballot by calling DAO#finalizeBallot() as soon as the ballot meet below requirements:
If the total number of votes is less than the required quorum, the ballot can not be finalized:
The required quorum varies based on the ballot type and the total staked SALT:
If a SALT staker unstakes their xSALT, the required quorum will decrease. However, this action does not impact the voting number the staker has casted. A staker might have chance to finalize the ballot in advance by unstaking their xSALT if the total number of votes and required quorum are close enough.
Once the ballot is closed, the staker can simply cancel their unstaking without suffering any loss.
Copy below codes to Proposals.t.sol and run COVERAGE="yes" NETWORK="sep" forge test -vv --rpc-url RPC_URL --match-test testCanFinalizeBallotByUnstaking
From above codes we can see, the ballot can be finalized after Alice unstakes all her xSALT.
There are several ways to fix this problem. The simplest one is calculating and storing the required quorum when the proposal is created. Once the required quorum is fixed, no one can change it by unstaking their xSALT:
Picodes (Judge) commented:
othernet-global (Salty.IO) confirmed and commented:
Status: Mitigation confirmed. Full details in reports from Reports from  zzebra83, 0xpiken, and t0x1c.
