Cryptosat
WebsiteBlogSatellite Tracking
  • Cryptosat
    • 🛰️Satellite tracking
    • 📄SpaceTEE paper
    • Contribution to the Ethereum KZG Ceremony
      • Cryptosat KZG Operation Tracker
      • Crypto2 contribution output
      • Contribution verification
  • Cryptosim
    • Cryptosim
    • Asynchronous API
    • Use-case examples
    • Open-source contribution
  • 🗳️Private Voting
    • Private Voting on Snapshot X
    • Private Voting Contract
    • Browser Side Encryption
  • 🎲random-beacon
    • Verifiable Random Beacon
    • Using the random beacon on-chain
  • API documentation
    • Message Signing
    • Authentication
    • Randomness API
      • Tutorial
      • API reference
    • Queue API
      • API reference
        • Queue
          • Request
          • Requests
    • Public randomness SAPI
      • About
      • API reference
        • Public randomness
          • Result
    • FROST API
      • About
      • API reference
        • Frost
          • Partial sign
          • Private key
      • Specification
    • Satellite Public Keys
  • ⏳Time-based Primitives
    • ⌚Time-based primitives and delay-encryption
    • ⚛️Using Delay Encryption for Atomic Swaps
  • Flastsat Environment
    • Overview
    • Access and Control
    • Crypto Engine Specs
    • Power API
Powered by GitBook
On this page
  • Implementation
  • Voters authentication
  • Voting strategies
  • On-chain voting: step-by-step
  1. Private Voting

Private Voting on Snapshot X

PreviousOpen-source contributionNextPrivate Voting Contract

Last updated 1 year ago

is a voting protocol implemented fully on-chain. It enables automatic transacting following the passing of a proposal (as part of, e.g., DAO governance). For extensive documentation of Snapshot X, refer to the .

Cryptosat extends SnapshotX with the capability of casting votes privately. While the final election result is disclosed and acted upon by the smart contract, the individual votes are protected and hidden from public view.

Implementation

In the future, and in order to maintain compatibility with the non-private on-chain version of Snapshot X, Cryptosat will run an EVM aboard its satellite, executing a replica of the Snapshot X on-chain smart contract.

Voters authentication

Authentication is done using existing Snapshot X authentication mechanisms. Using Cryptosat's Private Voting doesn't change the authentication methods.

Voting strategies

Today, we implement a simple voting strategy where each token has 1 voting power.

On-chain voting: step-by-step

All methods are exposed via the CryptosatPrivateVoting contract.

  1. Admin - Initializes Ballot: Admin triggers init(minimum voters: int) method to initialize the ballot. Can only be triggered by a designated wallet address. The minimum number of voters must be equal or bigger than 2.

  2. Admin - Finalizes Ballot: By triggering the finalize() method, the admin can finalize the vote tally after the minimum number of votes has been cast. The winning option will is revealed through the Cryptosat smart contract _winner field that is updated on-chain by the Cryptosat backend.

Today, Cryptosat relies on its implemented in Rust to implement tallying aboard the satellite. The satellite public key and Cryptosat's encryption API can be used by voters to encrypt their votes. Privacy is guaranteed since the votes can only be decrypted in space, and the votes are never sent back to earth, just the final result.

Voting phase: Each voter encrypts their vote using the published satellite private key. The front-end application can implement this functionality using Cryptosat's library. For example encrypted_vote = encrypt_message(pubkey, "candidate-1"); Then, the voter calls the vote(encrypted_vote) method, with the encrypted vote as a parameter.

🗳️
Private Voting library
private_voting
Snapshot X
technical documentation
SnapshotX and Cryptosat integration diagram
Drawing