Last active
September 22, 2017 16:04
-
-
Save ncodes/01f273cbb222f35aebe2889da4d8149d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ExchangeFunc(usd, currentYear) { | |
// percentage of depreciation per year | |
var depPercent = 2 / 100 | |
// Blockchain launch year | |
var epochYear = 2017 | |
// Time since blockchain launch | |
var yearSinceEpoch = currentYear - epochYear | |
// initial estimated number of global scanners | |
var initEstScanners = 1000000 | |
// increase unique scanners by depPercent each year | |
var finEstScanners = initEstScanners + (initEstScanners * depPercent * yearSinceEpoch) | |
// Calculate reward | |
var ell = (usd - (depPercent * usd * yearSinceEpoch)) / finEstScanners | |
ell = (ell < 0) ? 0 : ell | |
ell = isNaN(ell) ? 0 : ell | |
return { | |
ell, | |
initialEstimatedScanner: initEstScanners, | |
finalEstimatedScanners: finEstScanners, | |
yearSinceEpoch, | |
epochYear, | |
depPercent, | |
usd, | |
currentYear, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the initial Ellcrys exchange algorithm. It is designed to allow millions of people participate in the banknote scanning
operation without significantly inflating the value of already circulating ells. A few things to note:
to participate in scanning. This also increases by 2% every year.