Voting smart contracts for NDC v2
near-ndc / voting-v2 Goto Github PK
View Code? Open in Web Editor NEWVoting smart contracts for NDC v2
License: Mozilla Public License 2.0
Voting smart contracts for NDC v2
License: Mozilla Public License 2.0
The scope of the voting contract:
As a Product Manager I want to have snapshot in form of json file on IPFS
AC1: Snapshot is available for the block specified in the Election framework document
As a Product Manager I want to understand if we have all needed data in the Bigquery public dataset
https://near.org/blog/near-protocol-bigquery-public-dataset.
AC: We outline data that we have and that we do not hace from data needed for voting
As a user I want to encrypt data using secret network to preserve my privacy
AC1: User can create a shared secret to encrypt the vote
AC2: Public key for decryption is available after voting period ends
As a Product Manager I want voting package to be encrypted so information about it is not available before the voting ends
AC1: User can create an encryption key
AC2: User can encrypt the Voting package with the key from AC1
AC3: Voting package from AC2 contains amount of votes for each candidate
AC4: User can resubmit the voting untill the end of the voting period
AC5: User is able to submit encryption key from AC1 to the contract
As a User I want my vote to be processed in order to get it accounted
AC1: Encrypted votes are stored in the voting contract
Relayer scope:
As a Product Manager I want to have activity data for users that ever staked on NEAR blockchain
AC: We have list of users who ever staked on NEAR with number of months they had an active transaction
As a Product manager I want to have staking data for the voting project
AC1: I have list of users (accounts) who ever staked
AC2: I have stake amount for users who ever staked at the moment of the snapshot
As a user I want to register in voting in order to vote
AC1: Users are able to register in voting
AC2: Same user cant register twice
AC3: Voting power is assigned to user once he registers
AC4: Data about registered users is available on the relayer
As a FE developer I want to have support for filtering snapshot data in order to provide user friendly views
AC1: Following fields are available for filtering\sorting with pagination : (AccountId,ActivityVP,StakingVP,OverallVP,AccountAge)
The given work on voting snapshot will require a lot of processing on the data. That might be costly using bigquery api that's why we have to move it first to our local server.
As a Product Owner I want to decrypt votes in order to process voting results
AC1: Decryption keys are available after the voting ends
AC2: Relayer decrypts voting data using keys from AC1 and publishes it to the NEAR mainnet
AC3: Every user can check data published in AC2
Nomination criteria to be defined.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.