{"id":"XE-13381","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"538","source_url":"https://github.com/xeprotocol/xe/issues/538","reporter_id":2,"title":"[DAO] resolutions.propose and portal.decide allow direction-inverted, ops-mismatched, concurrent-withdrawal, and cancelled-session open-vote decisions","area":"dao-harness","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-11651","tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:13.922602+00:00","updated_at":"2026-11-15T10:28:26.544497+00:00","source_created_at":"2026-11-13T06:10:05+00:00","told_at":"2026-11-15T10:27:40+00:00","status_changed_at":"2026-11-15T10:27:33.458747+00:00","url":"https://bounty.xe.network/XE-13381","body":"### Summary\n\nAcross `dao/services/resolutions.py` (`propose`) and `dao/services/portal.py` (`_decision_resolution`, `decide`), open-vote resolutions (`adopt_open_vote`, `decline_open_vote`) and proposal decisions (`adopt`, `decline`, `refer`, `defer`) fail to enforce agreement on target proposal, direction, operations (`ops`), concurrent withdrawal locking, and linked signing-session liveness:\n\n1. **Unbound or dead-on-arrival open-vote resolutions at intake (`resolutions.propose`)**:\n   - `adopt_open_vote` and `decline_open_vote` can be proposed without `related_proposal`, or `decline_open_vote` can carry executable `ops` (opening a `SigningSession` when passed even though the resolution declines the vote).\n   - `adopt_open_vote` can be proposed against an already-closed non-passed (`outcome != \"passed\"`) or already-declined proposal, or against an ops-carrying proposal with mismatched `ops` (`not portal.same_ops`), causing the resolution to pass dead or execute divergent operations.\n2. **Direction inversion and interim `refer`/`defer` mismatches in `portal.decide`**:\n   - `portal.decide` allows recording `decision=\"adopt\"` while citing a `decline_open_vote` resolution, or `decision=\"decline\"` while citing an `adopt_open_vote` (or ops-carrying) resolution.\n   - Interim `refer` / `defer` citations do not enforce `adopt_open_vote` outcome and `same_ops` agreement.\n3. **TOCTOU withdrawal race and dead `SigningSession` citation (`portal._decision_resolution`)**:\n   - `_decision_resolution` reads `Resolution` without `FOR UPDATE` (`populate_existing=True`), allowing a concurrent `withdraw` transaction to race `portal.decide` / `refer`.\n   - When a passed resolution opened a `SigningSession` that was subsequently `cancelled` or `failed` (so its on-chain `ops` will never execute), `portal._decision_resolution` still accepts that resolution as live authority to mark the proposal `adopted`.\n\n### Impact\n\nA proposal decision recorded on public governance surfaces can invert the direction of the cited resolution, cite a resolution whose `SigningSession` was cancelled/failed and will never execute on-chain, race a concurrent resolution withdrawal, or open an executable `SigningSession` from a `decline_open_vote` resolution.\n","patch_refs":[{"id":745,"repo":"xeprotocol/xe","kind":"pr","ref":"917","title":"fix(xe): dao--resolutions-propose-and (fixes #538)","url":"https://github.com/xeprotocol/xe/pull/917","note":"","state":"open","author":"tipprb","added_by":"desk","created_at":"2026-11-20T01:24:57.642687+00:00"}],"thread":[{"id":3145,"source":"github","source_ref":"6845642679","author":"Khanhtnq","team":false,"body":"Proposed fix opened in https://github.com/xeprotocol/dao/pull/5.","created_at":"2026-11-13T06:10:07+00:00"},{"id":5375,"source":"github","source_ref":"6892976637","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-11651, 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-13381 and says what differs; it is read like any other.","created_at":"2026-11-15T10:27:40+00:00"}]}