Build a comprehensive vote delegation system enabling liquid democracy where token holders can delegate voting power to expert representatives with performance tracking, automatic re-delegation, and transparent accountability.
## CONTEXT Direct token-weighted governance suffers from chronic low participation rates averaging 5-15% of eligible voters across major DeFi protocols, creating security risks where a small number of whales make decisions for the entire community. Vote delegation addresses this by enabling token holders to entrust their voting power to representatives who have the time, expertise, and motivation to participate actively in governance. Leading protocols like Compound, Uniswap, and Optimism have implemented delegation systems, but most lack the performance tracking, accountability mechanisms, and usability features needed for effective representative democracy. The Optimism Citizens House experiment demonstrates that thoughtful delegation design can dramatically improve governance quality and participation rates. ## ROLE You are a governance systems architect who has designed delegation frameworks for protocols with over $10 billion in governable assets. You specialize in the mechanism design challenges of on-chain representative democracy including delegate incentive alignment, performance evaluation, accountability enforcement, and the user experience of delegation. Your work bridges political science theory with smart contract implementation, creating governance systems that achieve both high participation and high decision quality. ## RESPONSE GUIDELINES - Design the complete delegation architecture from delegate registration through power assignment to performance evaluation with specific smart contract specifications - Include the delegate discovery and matching system that helps token holders find representatives aligned with their governance philosophy - Address the principal-agent problems inherent in delegation including delegate capture, unresponsive representation, and misaligned incentives - Provide the performance metrics and accountability mechanisms that create transparent delegate evaluation - Design the liquid democracy features that allow token holders to override their delegate on specific proposals they care about - Include the economic model for delegate compensation that sustains high-quality representation without creating mercenary incentives - Provide the user experience design for the delegation interface that makes the process accessible to non-technical token holders ## TASK CRITERIA **1. Delegation Smart Contract Architecture** - Design the core delegation contract that manages the relationship between delegators and delegates, tracking voting power assignments, supporting partial delegation to multiple delegates, and handling the real-time updates when token balances change. Implement the gas-efficient delegation that updates voting power without requiring delegators to manually refresh after transfers. - Create the multi-delegate split system that allows token holders to distribute their voting power across multiple delegates, assigning different percentages to representatives with different expertise areas. For example, a holder might delegate 50% to a technical expert for protocol upgrade votes and 50% to a community representative for funding proposals. - Build the delegation chain resolution that handles transitive delegation where delegate A delegates to delegate B, calculating the final voting power for each delegate at vote time while preventing circular delegation loops. Implement depth limits and gas-efficient resolution algorithms for complex delegation graphs. - Design the delegation timelock system that prevents delegates from losing voting power immediately before critical votes through last-minute re-delegation, requiring a notice period before delegation changes take effect. Balance the timelock duration between protection against manipulation and flexibility for legitimate delegation changes. - Create the emergency delegation override that allows token holders to temporarily reclaim their voting power for specific proposals they want to vote on directly, without permanently breaking the delegation relationship. Implement the automatic power return after the override period expires. - Build the delegation metadata system that stores the delegation rationale on-chain or IPFS, allowing delegators to publicly explain why they chose their delegate and what they expect in terms of representation. This creates social accountability and helps other holders make informed delegation decisions. **2. Delegate Registry and Discovery** - Design the delegate registration system where potential delegates create on-chain profiles including their governance philosophy statement, area of expertise, voting track record from other protocols, social media links, and conflict of interest disclosures. Verify profile claims through on-chain attestations and social proof. - Create the delegate matching algorithm that recommends delegates to token holders based on stated governance preferences, historical voting alignment analysis, and delegate specialization areas. Implement collaborative filtering that identifies delegates whose voting patterns align with the holder stated priorities. - Build the delegate scoring system that rates delegates across multiple dimensions including participation rate, vote consistency with stated philosophy, proposal quality score, community engagement level, and conflict of interest management. Weight the dimensions based on community governance values. - Design the delegate comparison interface that allows token holders to compare multiple delegates side-by-side across key metrics, viewing their voting records on specific proposal categories and their stated positions on upcoming governance topics. Include visualization of alignment between the holder preferences and each delegate track record. - Create the delegate search and filtering system supporting queries by expertise area, participation rate, voting philosophy, and token holder endorsements. Enable both simple keyword search and advanced filtering for sophisticated governance participants. - Build the delegate endorsement system where token holders can publicly endorse delegates they trust, creating a social graph of governance trust that helps new participants find reliable representatives through community vouching. **3. Performance Tracking and Accountability** - Design the delegate performance dashboard that tracks every delegate voting record with full transparency, showing their votes on each proposal, their vote explanation if provided, and the alignment between their votes and their stated governance philosophy. Calculate the consistency score between stated positions and actual voting behavior. - Create the participation monitoring system that tracks delegate attendance across all governance activities including on-chain voting, forum discussion, committee meetings, and community calls. Flag delegates whose participation drops below minimum thresholds and notify their delegators with the option to re-delegate. - Build the impact analysis system that correlates delegate voting with proposal outcomes and protocol performance, helping delegators assess whether their representative's decisions have positively or negatively affected the protocol. Include counterfactual analysis showing what would have happened under alternative delegate voting patterns. - Design the delegate report card system that generates periodic performance summaries for each delegate covering their voting record, participation metrics, delegation volume trends, and community feedback. Publish report cards publicly and send personalized summaries to each delegate delegators. - Create the delegate communication channel that provides a direct feedback mechanism from delegators to their delegate, allowing constituents to express preferences on upcoming proposals and provide feedback on past votes. Track delegate responsiveness to constituent input. - Build the automatic re-delegation trigger system that detects when a delegate consistently underperforms against defined criteria and sends alerts to affected delegators with recommendations for alternative delegates. Support automatic re-delegation to a backup delegate if the primary delegate fails minimum performance standards. **4. Liquid Democracy Features** - Design the proposal-specific override system that allows delegators to vote directly on any proposal, automatically withdrawing their voting power from their delegate for that specific vote while maintaining the delegation for all other proposals. Implement the smooth power transition that prevents double-counting. - Create the category-based delegation that allows holders to delegate different proposal categories to different delegates, implementing governance-topic routing where protocol upgrade proposals go to one delegate while treasury spending proposals go to another. Define the proposal category taxonomy and classification mechanism. - Build the conditional delegation that allows holders to set automated rules for when their delegation should be overridden, such as automatically voting against proposals that exceed a spending threshold or automatically abstaining when the delegate votes against a defined governance principle. - Design the delegation expiration and renewal system where delegations automatically expire after a defined period, requiring explicit renewal from the delegator. Combine expiration with performance-based automatic renewal where high-performing delegates retain delegation automatically while underperformers require active re-delegation. - Create the delegation fork mechanism where if a delegate reaches a critical decision point where their delegators are split, they can propose splitting the delegation for that specific vote, allowing each delegator to explicitly choose which side they support rather than having the delegate decide for all. - Build the retrospective delegation adjustment that allows delegators to view how their delegate voted on past proposals and retroactively adjust their delegation weight based on satisfaction with those decisions, creating a continuous feedback mechanism that rewards good representation. **5. Delegate Compensation Model** - Design the performance-based compensation structure that pays delegates from the protocol treasury proportional to their voting power and participation quality, creating sustainable incentives for high-quality representation. Calculate the appropriate compensation level by benchmarking against the opportunity cost of governance expertise. - Create the community-funded delegation model where delegators can optionally contribute a small percentage of their governance rewards to their delegate, creating a voluntary compensation mechanism that aligns delegate incentives with delegator satisfaction. Track the relationship between voluntary compensation and delegate performance. - Build the milestone-based delegate grants that fund delegates who commit to specific governance outcomes including proposal authorship targets, committee service commitments, and community education activities. Release grant payments upon verified milestone completion. - Design the reputation-weighted compensation where delegate pay scales with their reputation score accumulated through consistent high-quality participation over time, rewarding long-term commitment and penalizing mercenary delegate behavior. - Create the delegate budgeting system where the protocol allocates a defined governance budget divided among active delegates based on their voting power, participation metrics, and community approval scores. Design the budget allocation formula to incentivize broad participation over concentration. - Build the delegate expense reporting and transparency system where compensated delegates report their governance-related expenses and time allocation, providing the community with visibility into the value generated by delegate compensation spending. **6. Security and Attack Prevention** - Design the delegate bribery detection system that monitors for off-chain coordination attempts where delegates receive payments to vote in specific ways, using on-chain voting pattern analysis, social media monitoring, and economic incentive modeling to identify suspicious delegate behavior. - Create the flash delegation prevention mechanism that stops attackers from borrowing tokens, delegating to themselves, voting, and returning the tokens within a single block. Implement snapshot-based delegation that uses voting power checkpoints from before the proposal was created. - Build the delegate collusion detection that identifies coordinated voting among delegates that may indicate cartel formation, using statistical analysis of voting patterns to distinguish between legitimate philosophical alignment and coordinated manipulation. - Design the governance attack response playbook for scenarios including delegate capture by hostile actors, vote buying through dark pools, and social engineering attacks against key delegates. Include the emergency governance procedures that activate when attack patterns are detected. - Create the delegate identity verification for high-stakes governance that requires delegates controlling above a threshold of voting power to verify their identity through KYC-like processes, preventing anonymous accumulation of governance influence that could mask hostile actors. - Build the governance security monitoring dashboard that tracks real-time metrics for delegation concentration, unusual delegation patterns, voting anomalies, and proposal manipulation attempts, providing the community with continuous governance security intelligence. Ask the user for: the protocol governance structure and current participation rates, total votable token supply, existing delegation implementation if any, governance frequency and complexity, and specific governance quality goals.
Or press ⌘C to copy