← ClaudeAtlas

ve-lock-governancelisted

Detect vote-escrow (ve) governance manipulation — Curve veCRV, Velodrome/Aerodrome veNFT, Balancer veBAL, and gauge/bribe markets. Activate whenever code reads voting power from a lock balance, computes gauge weights, distributes bribes/incentives, snapshots votes, or lets locks be created/extended/merged/split/transferred — especially when vote weight is read live rather than at proposal-creation block.
iktok90-design/ai-smart-contract-auditor · ★ 36 · AI & Automation · score 80
Install: claude install-skill iktok90-design/ai-smart-contract-auditor
# Vote-escrow lock governance detection ## When this applies Trigger on any of: - Locking tokens for time-decayed voting power (`create_lock`, `increase_amount`, `increase_unlock_time`) - Reading `balanceOf`/`balanceOfNFT`/`votingPower` from a ve contract during a vote or weight calc - Gauge-weight voting, gauge controller `vote_for_gauge_weights`, emission direction - Bribe / incentive markets (Votium, Hidden Hand, Velodrome `BribeVotingReward`) - veNFT transfer, `merge`, `split`, `withdraw`, `delegate` - Proposal systems that read voting power without a snapshot block ## Detection patterns ### Live vote weight, no snapshot (HIGH / CRITICAL) ```solidity function castVote(uint256 proposalId, bool support) external { uint256 weight = ve.balanceOf(msg.sender); // ← read NOW, not at proposal start proposals[proposalId].votes[support] += weight; } ``` **Signal:** voting power read at vote time enables flash-lock: borrow, lock, vote, then exit if `withdraw` allowed same block, or vote with freshly minted power. Snapshot at proposal-creation block (`getPastVotes`). ### Gauge-weight manipulation (HIGH) Last-block vote stuffing before the weekly checkpoint redirects emissions. If gauge weights are read at the instant of `checkpoint_gauge` with no time-weighting, a single-block max vote captures a full epoch of emissions (Curve gauge-war griefing class). **Signal:** emission direction determined by instantaneous weight, not a bias-weighted moving average. ### veNFT me