A repository for voting systems using Choice Coin.

Related tags

CryptographyVoting
Overview

Voting

This is a repository for voting software built using Choice Coin on the Algorand Network. Our voting software is centered around Decentralized Decisions, an open-source voting software that allows organizations to make decisions in a distributed manner. The votes in Decentralized Decisions are recorded on the Algorand Blockchain and are tabulated using a stateless smart contract. Post-quantum cryptography ensures that voter information is kept secure throughout the entire process at all points of vulnerability. This repository is meant to facilitate open-development on the Choice Coin Platform and to serve as a starting point for developers looking to set up their own decentralized voting network. Development here can directly be used for Choice Coin's Developer Awards Program. Developers should follow the instructions below to get started. We are looking forward to seeing all the great innovations that will come out of our community!.

Dependencies

  • To run the code in the Choice_Coin_Voting Folder, you first must have Python installed. Please download the latest version of Python, and create a virtual environment specifically for this directory. Python Download: https://www.python.org/downloads/.
  • Also be sure to have the latest version of MySQL installed. MySQL Download: https://www.mysql.com/downloads/.
  • Second, your Python virtual environment must have all of the packages listed in the requirements.txt file, which is also found in the Choice_Coin_Voting folder.
  • Your MySQL Database must be set up similarly to the way it is described in the MySQL_Code.sql file under Choice_Coin_Voting.

Run Steps

  • To run the code found in the Choice_Coin_Voting folder, make sure to first download the dependencies as described above using pip.
  • First, make sure that you have an account with an adequate amount of Choice Coin. This will be used as the escrow account that contains the Choice Coin that is used for voting. It will also send this Choice Coin to the appropriate decision address as dictated by individual voters. Put the accounts' address and mnemonic under escrow_address and escrow_mnemonic in the vote.py file.
  • Furthermore, connect to the Algorand Network through a service such as the PureStake API or the Algorand Sandbox, the code was tested using the PureStake API, and assign your new address and token to algod_address and algod_token respectively in the vote.py file.
  • Configure the keys in index.py based on your own administrative key. Then, enter in the string that you want to be the main administrator key, which will be hashed by the SHA-512.
  • To do this manually through the SHA-512 hashing algorithm in the code, open a new python terminal in this directory with the virtual environment activated. Import hashing from vote, and simply run hashing with your secret key as the input. Assign this to the keys in index.py.
  • Edit the number of decisions based on your preference. To do this, make a new address for the decision, make sure that it is opted into the Choice Coin asset, and add it at each of the appropriate spots in the code files based on the instructions provided in the documentation. Be sure to adjust the code at every juncture necessary to get the best results.
  • Specifically, edit the vote.py file, the index.py, and the vote.html files according to the instructions in the files. The instructions are written as comments at the top of each respective file.
  • This protocol also supports corporate or organizational voting. To add additional decisions, follow the same steps as above, except editing the functions and files with corporate in the name.
  • Create a new MySQL database with the appropriate credentials as described in the SQL_Code.sql file. Be sure to enter in your MySQL credentials at the appropriate points at lines 15-20 in index.py. Specifically, create a new MySQL user with root privileges that can easily access and change the database.
  • Finally, to test as a web application, use the command python index.py in a regular terminal with the virtual environment configured. This will launch a web-application that you can interact with.
  • To learn more about the web application, watch the Demo Video here: https://youtu.be/DWXNGDYXnIM.
Comments
  • Voting Tutorial Optin Error

    Voting Tutorial Optin Error

    I am working on the JavaScript Voting Tutorial and I am getting a consistent error.

    An error occured

    Account '' must opt in to Asset ID 42771692

    The problem is the accounts have already opted into the Asset ID. It looks like the script is catching two errors. First in the voting process:

        .catch((error) => {
          if (error.isTtyError) {
            console.log("Cannot render prompt in this environmet");
          } else {
            console.log("An error occured");
          }
        });
    

    And once in the results:

    const checkResultsOne = async () => {
      const address = "";
      const accountInfo = await algodClient.accountInformation(address).do();
      const assets = await accountInfo["assets"];
      for (const asset in assets) {
        if (asset["asset-id"] === ASSET_ID) {
          const amount = asset["amount"];
          console.log(
            `Account ${address} has ${balanceFormatter(amount, ASSET_ID)}`
          );
          return;
        }
      }
      console.log(`Account ${address} must opt in to Asset ID ${ASSET_ID}`);
    };
    checkResultsOne();
    

    The goal is to trouble shoot these errors and fix the problem to run the program smoothly.

    opened by Bhaney44 11
  • fionnachan / Refinement Bash

    fionnachan / Refinement Bash

    View deployed site here

    Changes

    Refactoring

    • [x] remove package-lock.json because there is already yarn.lock and they should not exist together
    • [x] remove jquery and use useRef to control style changes for expansion / collapse of tabs in FAQ and Voting cards
    • [x] add styled-components for styling
    • [x] add typescript to help development & better code maintenance
      • move some .js to .tsx
      • use type and interface
    • [x] move ElecitonCard out of Election List as a separate component
    • [x] move FAQ question item out of FAQ as a separate component
    • [x] remove unused files
    • [x] use AlgoExplorer API for testnet instead of purestake with hardcoded token in the code base

    Features

    • [x] connect wallet button on header
    • [x] add Algorand wallet option
    • [x] show user's Choice coin balance
    • [x] show user's committed Choice coin
    • [x] allow user to input Choice coin amount for voting
    • [x] add icons to dark/light mode toggle

    Screenshot

    Connect Wallet button image Algorand Wallet option image Input for Choice coin vote amount & header commitment amount image

    For #984

    opened by fionnachan 5
  • BeautifulSoup Scraper

    BeautifulSoup Scraper

    This issue has a bounty of 75,000 Choice. The goal for this issue is to solve the problem outlined in this issue with BeautifulSoup.

    Here is the outline for the code. The code is currently producing the this error. The challenge is to grab the targets identified in the HTML. The targets should be grabbed for every row on the page and sent to a .csv file.

    opened by Bhaney44 3
  • Silver Reward Generator Bash

    Silver Reward Generator Bash

    Details

    Silver Badge: 82,000 Choice Bronze Badge: 39,000 Choice Deadline: Monday April 11th @ 2:30PM EST

    Task

    • Write a script that reads a csv file and sends Choice to each from address.
    • The amount of Choice sent to each address should be 1.1x the value in the amountcolumn.
    • The script should go through each row in the csv file, multiply the amount by 1.1 to generate a variable x, then send x to the from address in the row.
    • Preference will be given to submissions which provide a TestNet address with all transactions.

    Requirements

    1. All files must be in one folder.
    2. Only one file may be used to script the code.
    3. All folders must be named [user_name]_bash.
    4. All contributions must be made to the gen_rewards folder.
    5. You must use the Algorand Python-SDK.
    6. All PRs must be titled, Username_Bash.
    7. Make sure you merge upstream before making a PR.

    Winners

    All winners will be announced and rewards will be distributed by Tuesday April 10th @ 2:30PM EST.

    opened by Bhaney44 2
  • Gold Rewards Bash

    Gold Rewards Bash

    Details

    Deadline | April 3, 2022 @ 2:00PM EST

    First Prize | 100,000 Choice | Gold Badge Second Prize | 44,000 Choice | Silver Badge Bronze | 15,000 Choice | Bronze Badge

    Goal

    Write a web-scraper to scrape all from and amount variables from the following Algorand address: 25S2YKMG2E3L5RTFI67NTSWFJJQHBTDULAIN7TQVXWB3E4E5Y6BPG3O44I on AlgoExplorer or AlgoScan. The scraper should grab all from and amount variables on each page, then move to the next page iteratively until all data has been collected. You may use BeautifulSoup, or any other software packages you choose.

    Requirements

    1. All files must be in 1 folder, named [username]_rewards2.
    2. All files must be added to the rewards2 folder.
    3. All variables should be scraped and stored locally in a .csv file.
    4. No more than three separate files may be used to scrape.
    5. All submissions must include a Readme.md file.
    6. All code must be commented.

    Results

    Winners will be selected based on adherence to the requirements and goal. Additional criteria will consider simplicity, scalability, and ease of use. Advantage may be given to submissions with an explanatory YouTube video. All winners will be announced before April 5 @ 2:00PM EST.

    opened by Bhaney44 2
  • Silver entry

    Silver entry

    1. I changed the vote.py file to use Python Classes instead of Functions-
    2. I created a database for adding escrow address and decision addresses.
    3. A new route for adding address on the Frontend
    opened by Olu-wafemi 2
  • New project

    New project

    A project nobody should miss out on. We are still at the testnet stage, so you still have a lot of time to join up

    Verify Github on Galaxy. gid:drQWaqX9J7RpmxHWkFieQG

    opened by Adedapo62 0
  • OSS Account Creation/Importing and dashboard Bash 👨🏼‍🍳

    OSS Account Creation/Importing and dashboard Bash 👨🏼‍🍳

    Details

    First Prize: 50,000.00 Choice | Silver Badge Second Prize: 25,000.00 Choice | Bronze Badge Contributions: Fully Working Code 5,000 Choice| Bronze Badge

    Deadline: February 18th, 7:00PM PT

    The purpose of this bash is to :

    • Generate an account wallet
    • Import an existing wallet using mnemonic passphrase
    • Connect with either my algo wallet and algosigner
    • After generating a wallet/ importing a wallet/ connecting with algosigner or my algowallet then show a dashboard with account details showing both algo balance and $choice balance in a page

    The logic is similar to this:

    1 - Overview

    creating address + other options.

    image

    2 - Import

    Importing existing wallet address.

    image

    3 - Account Connection

    Connecting with my algo wallet to get wallet address.

    image

    4 - Account Connection

    Connecting with algosigner to get wallet address.

    image

    5 - Dashboard

    In this case algoland is the platform name, you can name yours anything. you can also add $choice balance instead of just algo balance

    image

    Requirements

    • The program must be submitted as a pull request in the Silver Bash folder, in the voting repository.

    • All files submitted must be aggregated in one folder with the title: [UserName]_OSS_account_Bash, such as samuel_OSS-account_Bash.

    • The PR should be titled [UserName]_OSS-acount_Bash.

    • The pull request for the program must be made before the task Deadline.

    • The program must be run on the Algorand TestNet.

    • Any TestNet Algo or Choice Asset ID may be used in the program.

    • The program should include a ReadMe file with the problem, solution, description, and run steps.(a video or hosted link would be good also)

    • As few scripts and files as possible should be used.

    Additional Information

    Winners will be selected based on clarity, simplicity, functionality, and design.

    For more questions or comments, please ask in Discord

    Resources

    opened by Samuellyworld 0
Releases(release)
Owner
Choice Coin
Official Github for Choice Coin, a utility token focusing on governance and democratic participation. Built on the Algorand Blockchain.
Choice Coin
Scrambler - Useful File/Directory Encryption Program

This is a program that is used to scramble/encrypt files on your computer. Do not use this program to do malicious things with. I am not responsible for any damage that you do with this software.

0 Oct 01, 2021
Python Cryptocurrency with stealth addresses

Python Cryptocurrency with stealth addresses. Goal is to have create a cryptocurency that hides transactions totally. I.E. Cant see ammount sent, to who, or from who.

3 Aug 04, 2022
A really, really bad way to encrypt your text

deoxyencryptingnucleicacids A really, really bad way to encrypt your text. A general description of the scheme Encoding: The ascii plaintext is first

Sam Pinkerton 1 Nov 01, 2021
Microllect - Fully automated btc wallet hack,using advanced protocols

Microllect - Fully automated btc wallet hack,using advanced protocols

Arya kaghazkanani 40 Dec 17, 2022
Algo-burner - Burner account for the Algorand blockchain

algo-burner Burner address for Algorand's blockchain Apparently it was a problem

1 Jan 12, 2022
Bridge between L1 (Ethereum) and L2 (cheapETH)

The ETH chain and the cheapETH chain. We can assume the ETH chain has ~1000x more value than the cheapETH chain.

107 Oct 12, 2022
Vaulty - Encrypt/Decrypt with ChaCha20-Poly1305

Vaulty Encrypt/Decrypt with ChaCha20-Poly1305 Vaulty is an extremely lightweight encryption/decryption tool which uses ChaCha20-Poly1305 to provide 25

Chris Mason 1 Jul 04, 2022
Tutela: an Ethereum and Tornado Cash Anonymity Tool

Tutela: an Ethereum and Tornado Cash Anonymity Tool The repo contains open-source code for Tutela, an anonymity tool for Ethereum and Tornado Cash use

TutelaLabs 96 Dec 05, 2022
Venax 116 Dec 21, 2022
BETCOIN BET is a digital currency system created with python

BETCOIN BET is a digital currency created with python and flask with features of a centralized bank, wallet system, and open transaction history of al

Ujjwal Kumar 3 Nov 16, 2021
A repository for voting systems using Choice Coin.

Voting This is a repository for voting software built using Choice Coin on the Algorand Network. Our voting software is centered around Decentralized

Choice Coin 633 Dec 23, 2022
JS Deobfuscation is a Python script that deobfuscates JS code and it's time saver for you

JS Deobfuscation is a Python script that deobfuscate JS code and it's time saver for you. Although it may not work with high degrees of obfuscation, it's a pretty nice tool to help you even if it's j

Quatrecentquatre 3 May 01, 2022
Algorand-app - This tutorial is designed to get you started with Algorand development in a step by step process

Getting Started This tutorial is designed to get you started with Algorand devel

Connor 1 Jan 06, 2022
Salted Crypto Python library

Salted Crypto Python library. Allows to encrypt and decrypt files and directories using popular cryptographic algorithms with salty key(s).

7 Jul 18, 2022
Maximal extractable value inspector for Ethereum, to illuminate the dark forest 🌲 💡

mev-inspect-py Maximal extractable value inspector for Ethereum, to illuminate the dark forest 🌲 💡 Given a block, mev-inspect finds: miner payments

Flashbots 563 Dec 29, 2022
Get the SHA256 hash of any file with this Python Script

Hashfile-SHA256 A SHA256 hash verifying script, written in python. Report Bug Table of Contents About The Project Built With Getting Started Prerequis

Ethan Gallucci 1 Nov 01, 2021
Calculate your taxes from cryptocurrency gains

CoinTaxman helps you to bring your income from crypto trading, lending, ... into your tax declaration.

Jeppy 118 Dec 26, 2022
This is a webpage that contains login and signup page by which the password is stored using elliptic curve cryptography

LoginPage_using_Elliptic_curve_cryptography- This is a webpage that contains login and signup page by which the password is stored using elliptic curv

1 Oct 15, 2021
A python implementation of our standard object-oriented encryption package, shipped with most apps.

Encryption Manager (python edition) VerseGroup's native encryption manager adapted for python applications. Function Generate new set of private and p

Verse Group LLC 2 Oct 30, 2022
Hide secret texts inside an image, optionally encrypt them with a password using AES-256.

Hide secret texts/messages inside an image. You can optionally encrypt your texts with a password using AES-256 before encoding into the image.

Teja Swaroop 97 Dec 29, 2022