#mars #marsh #solana #crypto #miraland

marsh-program

Marsh is a cryptocurrency for sovereign individuals living in Mirascape Horizon

2 stable releases

2.1.2 Aug 28, 2024
2.1.1 Aug 26, 2024

#2 in #marsh

Apache-2.0 and LGPL-3.0-only

100KB
2K SLoC

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

Dependencies

~39MB
~579K SLoC