config#GLIDE_PER_BLOCK TypeScript Examples

The following examples show how to use config#GLIDE_PER_BLOCK. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: calculations.ts    From glide-frontend with GNU General Public License v3.0 6 votes vote down vote up
// Get Glide token reward per block
function rewardPerPhase(phaseNumber: number) {
  // If larger than 25, it would be overflow error (also, in first 25 phase we will distribute all tokens)
  if (phaseNumber === 0 || phaseNumber > 25) {
    return new BigNumber(0)
  }
  if (phaseNumber === 1) {
    return GLIDE_PER_BLOCK
  }
  const rwrd = GLIDE_PER_BLOCK.multipliedBy(75)
    .div(100)
    .multipliedBy(85 ** (phaseNumber - 2))
    .div(100 ** (phaseNumber - 2))
  return rwrd
}