marsh-program

Crates.iomarsh-program
lib.rsmarsh-program
version2.1.2
sourcesrc
created_at2024-08-26 04:01:18.570601
updated_at2024-08-28 05:57:25.125292
descriptionMarsh is a cryptocurrency for sovereign individuals living in Mirascape Horizon.
homepagehttps://miraland.io/marsh
repositoryhttps://github.com/miraland-labs/marsh
max_upload_size
id1351735
size46,742
Miraland (miralandlabs)

documentation

https://miraland.io/marsh

README

MARSH

Upgraded version of Mars, Mars(h) is a proof-of-work cryptocurrency for sovereign individuals living in Mirascape Horizon across the galaxy. You can mine Marsh from anywhere on Earth. The ultimate goal for Marsh is to circulate it between sovereign individuals and intelligent species such as AI, and to exchange it between intelligent species.

Supply

Regardless of how many miners are active in the world, Marsh supply growth is dynamically adjusted every 60 seconds to maintain an average supply growth of 10 MARS(H)/min.

API

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

Instructions

  • Claim – Distributes MARSH from the treasury to a miner.
  • Close – Closes a proof account returns the rent to the owner.
  • Open – Opens a new proof account for a miner.
  • Mine – Verifies a hash and increments a miner's claimable balance.
  • Stake – Stakes MARSH with a miner to increase their multiplier.
  • Reset – Resets the program for a new epoch.
  • Update – Updates a proof account's miner authority.
  • Upgrade – Migrates MARS tokens to MARSH, if and only if evoluation is activated, one-for-one.
  • Initialize – Initializes the program and creates the global accounts.
  • Evolve - Activate/deactivate Mars evolution to enable/disable migration from Mars to Marsh.
  • UpdateEvolver - Updates/changes the authority of Mars evolution.

State

  • Bus - An account (8 total) which tracks and limits the amount MARSH mined each epoch.

  • Config – A singleton account which manages program-wide variables.

  • Proof - An account (1 per user) which tracks a miner's current hash and current stake.

  • Treasury – A singleton account which has authority to mint MARSH and holds onto user stake.

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

For line coverage, use llvm-cov:

cargo llvm-cov
Commit count: 0

cargo fmt