Git Product home page Git Product logo

eth2-reward-simulation's Introduction

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.

eth2-reward-simulation's People

Contributors

edsonalcala avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.