In Governance.sol , it might be impossible to activate a new proposal forever after failed to execute the previous active proposal.
Votes cast for an active proposal are locked in the Governance contract until that proposal is executed or replaced. If a failed proposal holds more than 80% of the total votes, no new proposal can reach the 20% endorsement threshold, so governance can be permanently stuck.
Originally disclosed on Code4rena
Submitted by hansfriese, also found by berndartmueller, csanuragjain, m9800, V_B, and zzzitron
https://github.com/code-423n4/2022-08-olympus/blob/2a0b515012b4a40076f6eac487f7816aafb8724a/src/policies/Governance.sol#L216-L221 https://github.com/code-423n4/2022-08-olympus/blob/2a0b515012b4a40076f6eac487f7816aafb8724a/src/policies/Governance.sol#L302-L304
Currently, if users vote for the active proposal, the VOTES are transferred to the contract so that users can’t vote or endorse other proposals while the voted proposal is active.
And the active proposal can be replaced only when the proposal is executed successfully or another proposal is activated after GRACE_PERIOD.
But activateProposal() requires at least 20% endorsements here, so it might be impossible to activate a new proposal forever if the current active proposal involves more than 80% of total votes.
Proof of Concept
The below scenario would be possible.
Proposal 1was submitted and activated successfully.- Let’s assume 81% of the total votes voted for this proposal.
Yes = 47%,No = 34% - This proposal can’t be executed for this requirement because
47% - 34% = 13% < 33%. - Currently the contract contains more than 81% of total votes and users have at most 19% in total.
- Also users can’t reclaim their votes among 81% while
Proposal 1is active. - So even if a user who has 1% votes submits a new proposal, it’s impossible to activate because of this require().
- So it’s impossible to delete
Proposal 1from an active proposal and there won’t be other active proposal forever.
Tools Used
Solidity Visual Developer of VSCode
Recommended Mitigation Steps
I think we should add one more constant like EXECUTION_EXPIRE = 2 weeks so that voters can reclaim their votes after this period even if the proposal is active.
I am not sure we can use the current GRACE_PERIOD for that purpose.
So reclaimVotes() should be modified like below.
function reclaimVotes(uint256 proposalId_) external {
uint256 userVotes = userVotesForProposal[proposalId_][msg.sender];
if (userVotes == 0) {
revert CannotReclaimZeroVotes();
}
if (proposalId_ == activeProposal.proposalId) {
if (block.timestamp < activeProposal.activationTimestamp + EXECUTION_EXPIRE) //+++++++++++++++++++++++++++++++++
{
revert CannotReclaimTokensForActiveVote();
}
}
if (tokenClaimsForProposal[proposalId_][msg.sender] == true) {
revert VotingTokensAlreadyReclaimed();
}
tokenClaimsForProposal[proposalId_][msg.sender] = true;
VOTES.transferFrom(address(this), msg.sender, userVotes);
}
fullyallocated (Olympus) confirmed
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the design locks voters' tokens for the whole lifetime of an active proposal and only releases them on successful execution or replacement, with no time-based expiry, so a failed proposal can permanently trap a supermajority of votes.
Impact
Governance could be permanently blocked: no new proposal can be activated and the stuck proposal cannot be removed, so the protocol may be unable to pass any further changes.
What the attacker needed
Proposal holding over 80% of votes; that proposal fails to execute; no time-based vote reclaim
The fix
The reporter suggests adding an execution expiry constant so voters can reclaim their votes after a set period even while the proposal is still active.
How it was found
- Submit and activate a proposal.
- Have about 81% of total votes cast on it, with a margin below the execution threshold so it cannot pass.
- Observe that those votes stay locked in the contract while the proposal is active.
- Try to submit and activate a new proposal with the remaining votes and see it fail the 20% endorsement requirement.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this voting system, when people vote on a proposal their voting tokens are held by the contract until that proposal finishes. A new proposal needs at least 20% of all tokens to back it before it can become active. If one proposal that cannot pass is holding more than 80% of the tokens, nobody else has enough left to start a new one, so the system is stuck.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.