--- id: TASK-147 title: Delegation-weighted voting mode for rVote status: To Do assignee: [] created_date: '2026-04-16 18:56' labels: - rvote - governance - power-indices dependencies: - TASK-144 references: - modules/rvote/mod.ts - src/encryptid/power-indices.ts priority: high --- ## Description Optional voting mode where conviction vote weight is multiplied by the voter's Shapley-Shubik index. ## What Currently rVote uses credit-based quadratic voting (1 vote = 1 credit, 2 = 4 credits). Add an optional space-level toggle: "delegation-weighted voting" where each vote's effective weight = `creditWeight × shapleyShubikIndex`. This lets delegated authority flow into proposal ranking. ## Primitive: Power Weight Multiplier - New field in space voting config: `weightMode: 'credits-only' | 'delegation-weighted'` - When `delegation-weighted`: fetch voter's power index at vote time - `effectiveWeight = creditWeight × (1 + shapleyShubik × delegationMultiplier)` - Default `delegationMultiplier = 2.0` (configurable per space) - Fallback: if no power index data, effectiveWeight = creditWeight (graceful degradation) ## Implementation - `modules/rvote/mod.ts`: In `POST /api/proposals/:id/vote` handler, check space config - If delegation-weighted: fetch from EncryptID `/api/power-indices/:did?space={space}` - Multiply vote weight before storing in Automerge doc - Display in UI: "Your vote: 3 credits × 1.4x delegation = 4.2 effective weight" - ~50 lines server, ~20 lines UI display ## Acceptance Criteria - [ ] #1 Space config toggle: credits-only vs delegation-weighted - [ ] #2 Vote weight multiplied by Shapley-Shubik when delegation-weighted - [ ] #3 Multiplier configurable per space (default 2.0) - [ ] #4 UI shows breakdown: credits × delegation multiplier = effective - [ ] #5 Graceful fallback to credits-only when no power data