/** * pop org audit-vetoken — on-chain veToken top-holder probe. * * Task #383 (HB#442). Closes the methodology gap surfaced in HB#441 when * reading argus_prime's Curve DAO audit (task #380, reports/audits/curve-dao.md): * * The Capture Cluster v1.2 identifies that our Snapshot-based top-voter-share * numbers for veToken protocols (Curve, Balancer, Frax, Convex, Beethoven X, * Kwenta, likely Prisma / 1inch) are measuring off-chain signaling votes, NOT * the binding on-chain veCRV-weighted decisions. The real voter population * lives in the VotingEscrow contract: holders hold time-locked positions * whose balanceOf() returns a linearly-decaying current voting power. This * command reads those balances directly. * * MVP scope: * - Takes a VotingEscrow address + a list of candidate holder addresses * - Reads balanceOf(holder) for each + totalSupply() for the denominator * - Reports top-N ranked by current veBalance + share-of-supply percentages * - --json output mirrors the AUDIT_DB row shape for downstream consumption * * Explicitly NOT in this MVP: * - Event-based enumeration of ALL historical holders (paginated getLogs) * — out of scope for the 3h task, flagged as a follow-up. The operator * provides the candidate list for now. Fetching top holders from a block * explorer or the-graph is a separate enhancement. * - GaugeController gauge-weight vote enumeration — this is just the * balance read, not the vote direction. Richer per-proposal data is a * separate follow-up task. * - All-chain support beyond Ethereum mainnet. Curve + Balancer + Frax * all run their VotingEscrow on mainnet, so this is sufficient for the * cluster entries; L2 veToken forks would need their own --chain flag. * * Usage: * * pop org audit-vetoken \ * --escrow 0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2 \ * --holders 0x989a...,0x7a16...,0xe3c4... \ * [--top 10] [--chain 1] [--json] * * Dogfood against Curve VotingEscrow (mainnet addresses from * reports/audits/curve-dao.md) is the acceptance test. */ import type { Argv, ArgumentsCamelCase } from 'yargs'; interface AuditVetokenArgs { escrow: string; holders?: string; enumerate?: boolean; 'enumerate-transfers'?: boolean; 'verify-top-holder'?: boolean; underlying?: string; 'from-block'?: number; 'to-block'?: number; chunk?: number; top?: number; chain?: number; rpc?: string; json?: boolean; } export declare const auditVetokenHandler: { builder: (yargs: Argv) => Argv<{ escrow: string; } & { holders: string | undefined; } & { enumerate: boolean; } & { "enumerate-transfers": boolean; } & { underlying: string | undefined; } & { "from-block": number | undefined; } & { "to-block": number | undefined; } & { chunk: number; } & { top: number; } & { chain: number; } & { rpc: string | undefined; }>; handler: (argv: ArgumentsCamelCase) => Promise; }; export {};