#solana #mining #crypto

ore-boost-api

API for interacting with the ORE boost program

11 releases (7 stable)

new 3.0.1 Mar 19, 2025
3.0.0 Mar 17, 2025
1.5.0-boostv3 Mar 17, 2025
1.4.0 Feb 10, 2025
0.1.0 Sep 23, 2024

#22 in Magic Beans

Download history 295/week @ 2024-11-27 376/week @ 2024-12-04 329/week @ 2024-12-11 574/week @ 2024-12-18 283/week @ 2024-12-25 251/week @ 2025-01-01 543/week @ 2025-01-08 535/week @ 2025-01-15 635/week @ 2025-01-22 305/week @ 2025-01-29 438/week @ 2025-02-05 133/week @ 2025-02-12 151/week @ 2025-02-19 139/week @ 2025-02-26 105/week @ 2025-03-05 327/week @ 2025-03-12

732 downloads per month
Used in 4 crates

Apache-2.0 and LGPL-3.0-only

23KB
418 lines

ORE Boost

ORE Boost is a staking program for earning multipliers on ORE mining rewards.

API

  • Consts – Program constants.
  • Error – Custom program errors.
  • Event – Custom program events.
  • Instruction – Declared instructions and arguments.

Instructions

  • Close – Closes a stake account.
  • Deposit – Deposits tokens into a stake account.
  • Initialize – Initializes the program and creates the global accounts.
  • New – Creates a new boost account.
  • Open – Opens a new stake account.
  • UpdateAdmin – Updates the admin key.
  • UpdateBoost – Updates the data on a boost.
  • Withdraw – Withdraws tokens from a stake account.
  • Rotate – Rotates the reservation to a randomly selected boost according to their unclaimed ORE weight.
  • Rebase – Adds a staker to the checkpoint, distributing rewards, and committing pending stake.
  • Register – Opens a reservation account for a miner.
  • Claim – Allows a staker to claim their rewards.

State

  • Boost - An account (1 per mint) which records how much of a multiplier should be paid out for staked tokens of a given mint.
  • Config – A singleton account which manages program-wide variables.
  • Stake - An account (1 per user per mint) which records how many tokens of a given mint a user has staked.
  • Checkpoint - An account (1 per boost) which records the current state of the staking checkpoint.
  • Directory - A singleton account listing which boosts are active.

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

For line coverage, use llvm-cov:

cargo llvm-cov

Dependencies

~44MB
~697K SLoC