Bug: Proposal execution hash is deterministic and predictable
Severity: Medium (Governance)
File: governance/proposals.py, execute_proposal() (line 389)
Description:
tx_hash = hashlib.sha256(f"{proposal_id}:{now}".encode()).hexdigest() generates the execution transaction hash from only the proposal ID and timestamp. Both values are publicly known, making the hash predictable before execution.
Impact:
- Attackers can pre-compute expected execution hashes
- Breaks transaction unpredictability guarantees
- Could enable front-running of proposal executions
Expected Fix:
Include a cryptographic nonce (e.g., secrets.token_bytes(32)) in the hash input.
Bug: Proposal execution hash is deterministic and predictable
Severity: Medium (Governance)
File:
governance/proposals.py,execute_proposal()(line 389)Description:
tx_hash = hashlib.sha256(f"{proposal_id}:{now}".encode()).hexdigest()generates the execution transaction hash from only the proposal ID and timestamp. Both values are publicly known, making the hash predictable before execution.Impact:
Expected Fix:
Include a cryptographic nonce (e.g.,
secrets.token_bytes(32)) in the hash input.