GhostGovernor cannot operate with the ecosystem own token, Abstain always reverts, early finalization defeats PreventLateQuorum

Hi team

Three defects, one report, one governance fix. All three legs executed in forge, 21 of 21 passing.

Leg A: the real GHST token and the real Stinky token implement neither getPastVotes nor getPastTotalSupply, so constructing the GhostGovernor with the ecosystem own token makes propose revert with empty returndata, and castVote is unreachable behind the same wall.

Leg B: castVote with support 2 reverts with GovernorInvalidVoteType. For and Against are the only castable supports; the Abstain enum entry and the abstainVotes counter can never be written.

Leg C: at an absolute majority of past total supply, state reads Succeeded while the block number is still below the proposal deadline, and a later castVote already reverts. The state override defeats the PreventLateQuorum extension this same contract inherits, in exactly the case it exists for.

propose with real GHST -> reverts, empty returndata
castVote(support 2)     -> reverts GovernorInvalidVoteType
state at majority       -> Succeeded before proposalDeadline

One honest correction to keep: the quorum sub-claim is dropped, because COUNTING_MODE declares quorum for For votes only, so abstain exclusion from quorum matches the declared mode. The defect is the revert, not the quorum sum.

Suggested fix: wire an IVotes token, accept Abstain in the counting module, and remove or gate the state override.

Shahmeer

Adding the full reproduction detail for all three legs. All executed in forge, 21 of 21 passing.

Leg A, real token has no IVotes. GhostGovernor dot sol calls token().getPastTotalSupply() at lines 95 and 182, and there is no getPastVotes anywhere in src outside the governor own calls. Direct selector probes against the real GHST token and the real Stinky token: neither implements getPastVotes nor getPastTotalSupply. A GhostGovernor constructed with the real GHST token, through a real Stinky instance, reverts on propose with empty returndata 0x, because the token has no such function and no fallback. castVote is unreachable behind the same wall.

Leg B, Abstain reverts. GovernorGhostCounting dot sol line 74: castVote with support 2 reverts with the exact error GovernorInvalidVoteType. For and Against are the only castable supports; the Abstain enum entry and the abstainVotes counter can never be written. COUNTING_MODE at line 25 declares quorum for For votes only, so abstain exclusion from quorum at line 44 matches the declared mode. The defect is the revert, not the quorum sum.

Leg C, early finalization. GhostGovernor dot sol lines 90 to 97, the state override: at an absolute majority of past total supply, state reads Succeeded while the block number is still below the proposal deadline, and a later castVote already reverts. This defeats the PreventLateQuorum extension the same contract inherits, in exactly the case it exists for.

Suggested fix, one governance change: wire an IVotes token, accept Abstain in the counting module, and remove or gate the state override.

Shahmeer

Thank you for your report!

Governance now takes place on the ghost chain side and is pushed over Gatekeeper.sol through the verify function. The governance structure you’re referring to is legacy and will not be used in the protocol. You can check this yourself - there are no tokens that implement ERC20Votes, though GHST was previously used for this.