{"id":"XE-13762","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":2416,"title":"DAO harness: pinned governance numerics are never range-checked — a proposal passes with zero 'for' votes, and a fee is refunded on a quorum nobody met","area":"dao-harness","claimed_tier":"minor","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-15T04:22:11.579482+00:00","updated_at":"2026-11-15T10:27:05.245120+00:00","source_created_at":null,"told_at":"2026-11-15T10:27:34.252500+00:00","status_changed_at":"2026-11-15T10:27:34.239860+00:00","url":"https://bounty.xe.network/XE-13762","body":"Summary\r\npinned_rules() (dao/dao/config.py:192-207) copies the Schedule B governance numbers into every proposal's pinned rules with no validation of any numeric field. The two fee-action strings from the same function were XE-13153; the numerics are a separate, graver effect: they decide outcomes. A Schedule B value outside its meaningful range silently inverts the decision rules the members believe are in force.\r\n\r\nReproduction (executed against a local Postgres 16 with the real service functions portal.tally / portal._close / portal.close_due / portal._open; probe and raw output available on request)\r\n- pass_mark_fraction = 0, votes 1 for / 99 against, quorum met: outcome = passed (for_share 0.01 > 0).\r\n- pass_mark_fraction = -0.5, votes 0 for / 100 against: outcome = passed (for_share 0.00 > -0.5). A proposal with no supporting weight at all is recorded as passed.\r\n- pass_mark_fraction = 1, votes 100 for / 0 against (unanimous): outcome = failed (1.0 > 1 is false). No proposal can ever pass.\r\n- quorum_wallets = 0 and quorum_wallets = -5, proposal with zero votes: closes with quorum_met = True, and _close takes the fee_on_quorum path — the filer's fee row went to state 'due_refund' on a proposal nobody participated in. The no_quorum outcome exists precisely to route that case to fee_below_quorum.\r\n- window_days = -1: closes_at is a day before opened_at; portal._open refuses every vote from birth ('voting is closed') and close_due closes the proposal on its first pass with 0 votes.\r\n- fee_micro_xe = -5: submit demands a fee_block_hash (a negative fee is truthy) and then _verify_fee early-returns amount 0 for fee <= 0 without ever reading the named block. A non-numeric fee ('abc', a YAML typo) raises ValueError in submit's int(...) and returns 500 on every proposal submission while pinned.\r\n\r\nImpact\r\nGovernance integrity and fee routing are set by whichever numbers happen to be pinned, with no error anywhere: a 0-for 'pass' can carry ops into a resolution, a unanimous vote can be recorded as failed, and proposal fees leave by the refund path on quorums that were never met. The shipped config (pass mark 0.5, quorum 20, window 21 days) is sane, so this needs a bad pin — a config edit, a template copy, a future Schedule B change — and nothing would ever say so.\r\n\r\nSuggested fix direction\r\nValidate the numeric fields where they are pinned (or where the config loads): pass_mark_fraction within (0, 1), quorum_wallets >= 1, window_days >= 1, fee_micro_xe >= 0 and an integer — and refuse to open proposals under a ruleset that fails validation, in the same place XE-13153's fee-action validation belongs.\r\n\r\nNovelty note\r\nSame root cause as my XE-13153 (unvalidated pinned_rules()), filed separately because the effects are new — decision outcomes and fee routing, not fee-state stranding. If triage prefers one config-validation ticket per class, folding this into XE-13153 is fine.","patch_refs":[],"thread":[{"id":5404,"source":"desk","source_ref":"reply:4081","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-13762 and says what differs; it is read like any other.","created_at":"2026-11-15T10:27:05.245120+00:00"}]}