Skip to content

Instantly share code, notes, and snippets.

@kvhnuke
Created July 3, 2019 20:10
Show Gist options
  • Save kvhnuke/30c36f1fc021ee9af041a6e24ea014f1 to your computer and use it in GitHub Desktop.
Save kvhnuke/30c36f1fc021ee9af041a6e24ea014f1 to your computer and use it in GitHub Desktop.
EthVM Survey Giveaway

Blockchain Explorer Survey

5 MEW Engraved Ledger Nano S and Stickers Giveaway

Rules

  • Survey must be thoughtful
  • Valid
  • No spamming
  • Must answer all questions, including open ended responses

Procedure

  • At the conclusion of the survey, we will publish a list of KECCAK-256 hashes of lowercased twitter handles or email addresses which are eligible (To somewhat hide user information)
  • We will pick a blocknumber atleast 1000+ blocks into the future, lets call this N
  • Then we will collect the Hashes of blockHash(N),blockHash(N+1),blockHash(N+2),blockHash(N+3),blockHash(N+4) (Total of 5 blockhashes, 5 is the number of Ledger Nano S)
  • Then use following formula to select the Winners,
    • NE number of entries
    function randomGen(uint blockHash) constant returns (uint randomNumber) {
        return(blockHash % NE);
    }
    
    • This will return the winning positions of the published list, list is 0 based. If it returns the same number twice, we will pick the next in line!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment