Git Product home page Git Product logo

survey-memefactory's People

Contributors

alexand0x avatar benzap avatar bradymck avatar madvas avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bradymck

survey-memefactory's Issues

Add multi-language support

We need to support urls such as https://survey.memefactory.io/cn/ and https://survey.memefactory.io/ko/ in order to have translations for asian languages.

Add this functionality, so we can add translated texts. No need to adopt any robust mechanisms/libraries for this, this is just temporary application, translated texts can be pasted into cljs files, same as with English texts right now.

Script for calculating DANK rewards

Write snippet that calculates DANK rewards for voters.
800M DANK tokens will be distributed to voters in following way:
A voter's votes from all 6 rounds will be summed up and he'll then get proportional amount of DANK relative to all other votes.
Example:
User voted as such in 6 surveys:

  1. survey 300k DNT
  2. survey 200k DNT
  3. survey 100k DNT
  4. survey 400k DNT
  5. survey 500k DNT
  6. survey 600k DNT

So together he voted: 2.1M DNT
Let's say votes from all voters in all 6 rounds were together 50M DNT
This user would be eligible for (2,1/50)*100 = 4,2. 4,2% from 800M DANK = 33,6M.
User would get 33,6M DANK.

Output from this script should be in format:
[user-address] [amount of DANK]
0x619e9f8f181866fedb5e6c96c21d27323a233808 2000000

Survey contract can be found here https://github.com/district0x/survey-memefactory/blob/04b7e1576a08f5f721c93a62a7f93135b3cb713a/resources/public/contracts/src/Survey.sol
Address is 0x582ccc8fecacb8cbc3ad280f32194022a64f9ca3
Survey IDs are: 0, 2, 3, 4, 5, 6 (beware 1 is skipped)

In db.cljs and syncer.cljs and graphql_resolvers.cljs, we're already calculating user's votes, so you might wanna use code from there.

It's not important to write standalone script that calculates this, feel free to get output just from REPL, using existing db.cljs and everything server-side code uses. Just output is important.

Distribute DANK token

Deploy MiniMeToken into mainnet and distribute DANK token accordingly.

First you'll need to deploy MiniMeTokenFactory and MiniMeToken, after that, so you can pass the factory address into constructor.

Parameters passed into constructor:
_tokenFactory - Address you'll obtain after deploying MiniMeTokenFactory
_parentToken - 0x0
_parentSnapShotBlock - 0
_tokenName - DANK Token
_decimalUnits - 18
_tokenSymbol - DANK
_transfersEnabled - true

After deploying, you'll call generateTokens and generate 1000000000 DANK to your address (1 billion in ether unit, but you need to pass it in wei, therefore multiply by 18) and then distribute from your address. You can do this from any address you want, after distribution is done, we'll change token controller to multisig.

You can do it in REPL from this repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.