Code Monkey home page Code Monkey logo

simulation's Introduction

Simulation

Fula Blockchain Simulation

Motivation

To develop a simulation model for the Mining rewards portion of the Functionland project.

Basic Concept:

A user would assess their current position financially and then make a decision on whether or not to purchase the Functionland box. If they choose to purchase the box, then we analyze the trade potential cost difference (and earnings!) that a user would experience.

Some key parameters being utilized:

  • Time (defaults to 1 year)
  • Cloud savings (Is derived from the amount not spent on the cloud storage solutions)
  • Hardware buy in cost (A one time cost associated with getting the mining device)
  • Power consumption cost (An additional cost, though not much, per month)
  • Tokens earned per end user (The reward earned by mining per user)
    • Amount depends on the number of miners in the system
    • Example: 50,000 miners a month and the reward is 200 tokens a month

These will then influence the modeling the rewards (money earned) from mining the token over the course of a year.

Key Insights

  • We noticed on the default settings (after we had set miners to default to 1100) that the token rewards at the end of the year vs miners starts to cross after 1 year.
    • This was different from the relatively low margin of tokens mined at 10,000 miners and could be a good indicator of when people would want to join the network.

Development

Requirements:

  • Python >= 3.10
  • A virtual environment
  • Jupyter Labs or Jupyter notebook
    • Download or use an extension inside of VScode
  • ipykernel

Project Execution

To run the Jupyter Notebook (and eventually python script files):

  1. Enable your virtual environment

pip install requirements.txt

Then you will need to add the kernel to the notebook if you want the virtual environment to work properly:

python -m ipykernel install --user --name=functionland

Do note that the environment name of functionland can be replaced with anything else, just remember to stay consistent otherwise errors may arise.

Once we have the script files, those can be executed with the python run time without the need to load in that extra kernel (woo!).

Running the Python Simulation

This was developed with Python 3.8 as the version so the way to run it on the CLI should follow:

python3 src/simulations/__init__.py

If you use VScode (or similar) it should be a very similar execution step once you are able to locate main.py or the __init__.py module.

Progress:

  • Setup the initial system parameters
  • Show the token price at $0.04
  • Show the rewards for those who mined over the course of year as the token value increases.
  • Show the break even point (explicitly)
  • Build the models in Python scripts
  • Integrate with dashboard service
  • Build out the UI of the dashboard

Issues / Bugs:

At this time, no known bugs are present.

simulation's People

Contributors

ehsan6sha avatar okelleydevelopment avatar

Watchers

 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.