Voting System

Real-time per-option voting mechanics for community-powered answers

Overview

Quanta's Voting System lets the community mark each answer choice as correct or wrong. Per-option votes accumulate independently, so consensus forms from real usage instead of a single pick.

Introduced in v1.5.0

Added in v1.5.0 with real-time sync and built-in retries.

Voting Mechanics

Per-Option Voting Explained

Vote on each answer option independently:

For a multiple-choice question with options A, B, C, D:

  • You can vote A as correct and B as wrong
  • Other users can vote C as correct and D as wrong
  • Each option accumulates its own vote counts
  • Community consensus emerges from aggregate voting patterns

Vote Types

Correct Vote (👍🏻)

Mark an option as correct after you verify it.

Wrong Vote (👎🏻)

Flag an option as wrong to reduce false positives.

Inline Vote Buttons

Vote buttons sit beside each answer option on quiz pages.

Even with inline buttons hidden, you can still vote through the Answer Vault page accessible from the extension popup.

Vote Persistence & Synchronization

How Votes Are Stored

Votes persist in the database and synchronize in real time across:

  • All users using Quanta
  • Multiple browser tabs in a single session
  • Page refreshes and new sessions

Fixed in v1.5.0

Previous refresh-loss issues were fixed in v1.5.0.

Real-Time Sync

The system streams updates from a real-time database:

User A votes → Database stores vote → Realtime broadcast → All users see update

Sync Features:

  • INSERT events: New votes appear instantly
  • UPDATE events: Vote count changes sync immediately
  • DELETE events: Vote removals (unvotes) propagate in real-time
  • Question ID tracking: Votes correctly associated with questions via cached mappings

Vote Submission Reliability

Automatic Retry Logic

Failed submissions automatically retry (v1.5.0+):

  1. Initial submission attempts to save vote to the database
  2. On error: System automatically retries with exponential backoff
  3. User feedback: Shows submission status with clear error messages
  4. Recovery: Retries continue until successful or maximum attempts reached

Network Required

Vote submission requires an active internet connection. Offline votes are not queued; you'll need to reconnect and re-vote.

Optimistic UI Updates

The UI updates immediately:

  • Vote counts increment instantly
  • Visual feedback confirms your action
  • Background sync happens asynchronously

If submission fails, the UI reverts to the previous state and displays an error.

Community Consensus

Balanced Scoring Algorithm

Quanta uses a balanced scoring system to determine the best answer:

// Simplified scoring logic
const score = (correctVotes - wrongVotes) / totalVotes;
const confidence = totalVotes > threshold ? "high" : "medium";

Factors:

  • Net vote difference (correct - wrong)
  • Total vote volume (more votes = higher confidence)
  • Distribution balance (unanimous vs split votes)

Intelligent Answer Prioritization

The system prioritizes answers that:

  1. Have higher correct vote counts
  2. Have lower wrong vote counts
  3. Show consistent voting patterns (not split 50/50)
  4. Accumulate more total votes (community validation)

Answers with just 1 correct vote are treated differently than answers with 100 correct votes, even if both have 0 wrong votes.

Best Practices

Settings Configuration

Vote Button Toggle

Control inline vote button visibility:

Location: Main Settings → Behavior Tab → "Show Vote Buttons"

Options:

  • Show (default): Buttons appear on quiz pages
  • Hide: Cleaner interface, vote via vault page only

Quick Actions Integration

Access voting features quickly:

Main Settings → Quick Actions Grid:

  • "View Answer Vault" - See all community votes
  • Navigate to voting statistics and contribution history

Troubleshooting

Performance Considerations

Real-Time Overhead

WebSocket subscriptions add minimal overhead but use slight extra bandwidth.

Retry Impact

Retries improve reliability and are capped at 3 attempts per vote.

Cache Efficiency

Vote ID mappings are cached in memory for faster DELETE event handling, cleared on page refresh.

UI Responsiveness

Optimistic updates keep the UI responsive on slow connections.

Privacy & Security

Anonymous Voting

All votes are anonymous. No user identifiers, emails, or personal data are associated with votes.

What's Stored:

  • Question text (for matching)
  • Answer option text
  • Vote type (correct/wrong)
  • Timestamp
  • Vote counts

What's NOT Stored:

  • User identity
  • IP addresses
  • Browser fingerprints
  • Personal information

Next Steps

Last updated on