Skip to content

📋 ⚙️ 💲 A simplified simulation of the reward system on Ethereum 2.0

License

Notifications You must be signed in to change notification settings

isabella232/eth2-reward-simulation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rewards and Penalties Simulator for Ethereum 2.0

Assumptions

Run this simulation

  1. Get Rust
  2. You can just run the simulation in debug mode (slow), or compile and run it (good)
# Just run the simulation
cargo run

# Compile and run the simulation
cargo build --release && ./target/release/simulation

Note: cargo is the Rust package manager.

Command line flags

Eth2 Reward Simulator 

USAGE:
    simulation [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -e, --epochs <t>                  Epochs to run
    -i, --initial_stake <ETH>         Your initial stake in ETH
    -r, --printing_output <option>    Type of report (epoch, monthly)
    -p, --probability_online <p>      A value in [0,1]

Example

simulation -i 1000000 -p 0.95 -e 1000 -r epoch

Features

Balance

  • FFG rewards and penalties
  • Proposer and attester incentives

UX

  • Command option parameters
    • Initial stake
    • Online probability
    • Honesty probability
    • Epochs to run
  • Monthly Report

Documentation

TODO!

UX

  • Command option parameters
    • Honesty probability
    • Add ETHUSD as parameter and then return reward in USD
  • One special validator with different initial parameters

Balance

  • Inactivity penalty
  • Slashing
    • Whistleblower reward
    • Proposer reward
    • Slashed validator penalty
    • Midway penalty

Validator

  • Validator exit
    • Balance ejection
    • Slasher ejection
    • Voluntary exit
  • Validator activation
  • Account top up
  • Validator Tiers (e.g. A to E) With different set of probabilities.

Docs

  • Inactivity penalty: assumptions.md
  • Slashing: assumptions.md

License

  • Apache 2.0.

About

📋 ⚙️ 💲 A simplified simulation of the reward system on Ethereum 2.0

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%