Giter Site home page Giter Site logo

ore's Introduction

Ore

Ore is a digital currency you can mine from anywhere, at home or on your phone. It uses a novel proof-of-work algorithm to guarantee no miner can ever be starved out from earning rewards.

How it works

The primary innovation of Ore is to offer non-exclusive mining rewards. This means one miner finding a valid solution does not prevent another miner from finding one as well. Rather than setting up every miner in a winner-take-all competition against one another, Ore gives each miner a personalized computational challenge. As long as a miner provides a valid solution to their own individual challenge, the protocol guarantees they will earn a piece of the supply. Since no miner can be censored from the network and valid solutions are non-exclusive, starvation is avoided.

Supply

Ore is designed to protect holders from runaway supply inflation. Regardless of how many miners are active in the world, supply growth is strictly bounded to a rate of 0 ≤ R ≤ 2 ORE/min. In other words, linear. The mining reward rate – amount paid out to miners per valid solution – is dynamically adjusted every 60 seconds to maintain an average supply growth of 1 ORE/min. This level was chosen for its straightforward simplicity, scale agnosticism, and for striking a balance between the extremes of exponential inflation on one hand and stagnant deflation on the other.

Program

  • Consts – Program constants.
  • Entrypoint – The program entrypoint.
  • Errors – Custom program errors.
  • Idl – Interface for clients, explorers, and programs.
  • Instruction – Declared instructions and arguments.
  • Loaders – Validation logic for loading Solana accounts.

Instructions

  • Initialize – Initializes the Ore program, creating the bus, mint, and treasury accounts.
  • Reset – Resets the program for a new epoch.
  • Register – Creates a new proof account for a prospective miner.
  • Mine – Verifies a hash provided by a miner and issues claimable rewards.
  • Claim – Distributes claimable rewards as tokens from the treasury to a miner.
  • UpdateAdmin – Updates the admin authority.
  • UpdateDifficulty - Updates the hashing difficulty.

State

  • Bus - An account (8 total) which tracks and limits the amount mined rewards each epoch.
  • Proof - An account (1 per miner) which tracks a miner's hash, claimable rewards, and lifetime stats.
  • Treasury – A singleton account which manages program-wide variables and authorities.

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

For line coverage, use llvm-cov:

cargo llvm-cov

ore's People

Contributors

hardhatchad 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.