Skip to content

A forecasting model for the Internet Computer written in Haskell

License

Notifications You must be signed in to change notification settings

gabrielnic/icp-forecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICP Staking Forecaster

DISCLAIMER: This code is provided with no guarantees of accuracy or fitness for any purpose. It attempts to estimate the rewards algorithm used by the NNS Governance canister on the Internet Computer, but is not guaranteed to even be consistent with that canister since it is a re-implementation in Haskell and not directly derived from the original Rust code. Use at your own risk.

Usage

To use (assuming you have the jq utility installed):

nix-shell
cabal configure
cabal build
$(find . -name icp-forecast -type f -executable) \
    --start 0.41                                 \
    --voting 67                                  \
    --minting 5                                  \
    --stake 100000                               \
    --delay 4                                    \
    --dissolve 4                                 \
    --duration 8                                 \
    --compound True | jq -r

Some notes on the meaning of the parameters, all of which are currently necessary and in the above order:

--start is the number of years since genesis that calculation should begin at. 0.41 is five months.

--voting is the percentage of supply that reflects the current voting power. This can be greater than 100.

--minting is the percentage of rewards that are minted by spawning each day.

--stake is the initial stake of the hypothetical neuron.

--delay is the dissolve delay of that neuron, in years. Decimals are allowed.

--dissolve is when to start dissolving, in years. So, a delay of 4 with a dissolve of 4 years means that the neuron has a dissolve delay of 4 years, but it will not start dissolving until 4 years have transpired.

--duration is how long to run the simulator for. This number can be shorter than either of --delay or --dissolve, in which case it simply means that the delay period may not expire or start dissolving before the simulation ends.

--compound indicates whether rewards should always be compounded back into the original neuron.

About

A forecasting model for the Internet Computer written in Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published