Governance attack vectors

From PlamenTSV/plamen · View interactive version

Governance attack vectors is an AI agent skill from the GitHub repository PlamenTSV/plamen. Protocol Type Trigger governance (detected when Governor, Timelock, voting, proposal, quorum, delegate patterns found) - Inject Into Breadth agents, depth-external, depth-edge-case

How to use this skill

Skill file

Injectable Skill: Governance Attack Vectors

Protocol Type Trigger: governance (detected when Governor, Timelock, voting, proposal, quorum, delegate patterns found)

Inject Into: Breadth agents, depth-external, depth-edge-case

Language: EVM only (Solana has structural mitigations via token locking; Move governance is less standardized)

Finding prefix: [GOV-N]

Orchestrator Decomposition Guide

When decomposing this skill into depth agent investigation questions, map sections to domains:

When This Skill Activates

Recon detects governance patterns: Governor, TimelockController, propose, castVote, execute, queue, quorum, getVotes, delegate, votingPower, or DAO framework imports.


1. Flash Loan Voting Analysis

1a. Vote Power Source

Identify how voting power is determined:

1b. Snapshot Manipulation Window

If snapshot-based:

1c. Delegation Flash Attack

For delegation-based voting:

Tag: [TRACE:vote_power_source={snapshot/live} → snapshot_block={when} → flash_window={YES/NO}]


2. Proposal Lifecycle Security

2a. Proposal Creation

2b. Proposal Content Validation

For each proposal that includes executable calldata:

2c. Execution Integrity

For the execution path (typically via timelock):

2d. Cancellation and Veto

Tag: [TRACE:propose → calldata={target,selector} → restricted={YES/NO} → self_referential={YES/NO}]


3. Quorum and Threshold Analysis

3a. Quorum Computation

3b. Threshold Edge Cases

3c. Voting Period Boundaries

Tag: [BOUNDARY:quorum_threshold={exact} → votes_for={quorum} → passes={YES/NO}]


4. Delegation and Vote Counting

4a. Delegation Chain Integrity

4b. Vote Weight Consistency

4c. Vote Tallying

Tag: [TRACE:delegate(from={A}, to={B}) → checkpoint_update={block} → power_transfer={correct/incorrect}]


Key Questions (must answer all)

  1. Is voting power snapshot-based or live-balance? If snapshot: when is it taken relative to proposal creation?
  2. Can proposal calldata target the governance or token contract itself?
  3. Can quorum be manipulated by changing total supply during an active vote?
  4. Is there a mandatory, non-bypassable delay between proposal approval and execution?
  5. Can an attacker accumulate voting power via flash loan within the snapshot or voting window?

Common False Positives

Step Execution Checklist (MANDATORY)

| Section | Required | Completed? | Notes |

|---------|----------|------------|-------|

| 1. Flash Loan Voting | YES | | Power source, snapshot window, delegation flash |

| 2. Proposal Lifecycle | YES | | Creation, content validation, execution, cancellation |

| 3. Quorum and Thresholds | YES | | Computation, edge cases, period boundaries |

| 4. Delegation and Vote Counting | IF delegation supported | | Chain integrity, weight consistency, tallying |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.