Skip to content

Instantly share code, notes, and snippets.

@sudo-vaibhav
Last active July 12, 2020 09:27
Show Gist options
  • Save sudo-vaibhav/a41b724f817abf204cef088938efc8b0 to your computer and use it in GitHub Desktop.
Save sudo-vaibhav/a41b724f817abf204cef088938efc8b0 to your computer and use it in GitHub Desktop.
setting up blockchain constants
const THIRTY_MINUTES = 30 * 60 * 1000 //the consensus algorithm runs every 30 minutes
const INITIAL_BALANCE = 50 //this is the initial amount that any node starts with
const STAKE_AMOUNT = 10 //this is the amount that's staked by default to make a proposal
const REWARD_AMOUNT = 15 //you get 5 more Reputation Tokens that what you staked
const PENALIZED_AMOUNT = 5 //you lose 5 Reputation Tokens if your contribution is not approved by the majority of nodes
const CONSENSUS_THRESHOLD = 0.5 //more than 50% of nodes have to approve your contribution to get the reward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment