Liquid Democracy Voting Application Specifications

Overview

This is a web-based liquid democracy voting application that allows users to participate in democratic decision-making through both direct voting and proxy delegation. The system enables voters to delegate their voting power to trusted proxies for specific categories while maintaining the ability to vote directly on any issue.

Core Concepts

Liquid Democracy

Key Terms

Functional Requirements

1. Voter Registration

2. Proxy Relationship Management

3. Voting System

4. Vote Resolution Logic

5. Visual Vote Flow

User Interface Requirements

1. Registration Tab

2. Proxy Setup Tab

3. Voting Tab

4. Visual Layout System

5. Real-time Updates

Technical Requirements

State Management

Vote Calculation Engine

Layout Calculation Engine

Animation System

Data Models

Voter

{
  id: string (unique identifier)
  name: string
  isProxy: boolean (can receive delegations)
}

Proxy Relationship

{
  principalId: string (voter who delegates)
  proxyIds: string[] (ordered list of proxy voters)
  category: string
}

Vote

{
  voterId: string
  vote: "YES" | "NO" | "ABSTAIN"
  category: string
  question: string
  timestamp: number
}

Vote Chain

{
  principalId: string (original voter)
  chainIds: string[] (path from principal to final vote source)
  finalVote: "YES" | "NO" | "ABSTAIN"
  category: string
  question: string
}

Behavior Specifications

Proxy Chain Resolution

  1. Start with a voter who hasn’t voted directly
  2. Find their proxy relationships for the current category
  3. Check each proxy in priority order:
    • If proxy voted directly → use that vote
    • If proxy has own proxy chain → recursively follow that chain
    • If no vote found → try next proxy in priority order
  4. If no vote found in entire chain → default to ABSTAIN
  5. Detect and handle circular references gracefully

Visual Layout Algorithm

  1. Column Assignment: Assign each voter to a column based on their depth in delegation chains
  2. Column Organization: Group voters by their assigned columns
  3. Sorting: Sort voters within each column:
    • Column 0: By final vote type (YES, ABSTAIN, NO)
    • Other columns: By which proxy they delegate to
  4. Positioning: Position cards sequentially within columns with no gaps
  5. Proxy Centering: Center proxies vertically on their incoming connections
  6. Empty Column Removal: Remove columns with no voters and compact remaining columns

Arrow Flow Calculation

  1. Delegation Arrows: Draw arrows between consecutive voters in delegation chains
  2. Tally Arrows: Draw arrows from final vote sources to appropriate tally boxes
  3. Positioning: Arrows start from right edge of cards and end at left edge of target cards
  4. Styling: Different colors based on vote type (green for YES, red for NO)
  5. Z-Index: Arrows render behind cards to avoid visual obstruction

User Interaction Flows

  1. Adding Voters: Registration → Immediate appearance in proxy setup and voting
  2. Setting Proxies: Category selection → Principal selection → Proxy assignment → Live preview
  3. Casting Votes: Category/Question selection → Voter selection → Vote casting → Immediate visual update
  4. Changing Votes: Select voted cards → Choose new vote option → Immediate recalculation
  5. Clearing Votes: Either clear specific voter votes or all votes globally

Quality Requirements

Performance

Usability

Reliability

Maintainability

Success Criteria

The application successfully demonstrates liquid democracy when:

  1. Users can easily set up proxy relationships and understand the implications
  2. Vote flow is clearly visualized and updates in real-time
  3. Complex proxy chains resolve correctly to final votes
  4. The interface is intuitive enough for non-technical users
  5. Performance remains smooth even with complex delegation networks
  6. All edge cases (cycles, empty chains, etc.) are handled gracefully

This specification provides a complete blueprint for building a liquid democracy voting application that balances the complexity of the underlying voting system with an intuitive, visual user experience.