MOR is a scalable Proof of Work (PoW) mining protocol built on Solana using Magicblock's Ephemeral Rollup. It enables anyone to mine tokens with minimal setup by offloading heavy mining computations off-chain while keeping token issuance and rewards trustless and verifiable on-chain.
- Scalable Mining: Billions of hashes can be submitted per second without Solana network congestion
- Cost Efficient: No transaction fees during mining - only pay when claiming rewards or checkpointing
- Trustless: All rewards and token issuance verified on-chain via Solana smart contracts
- Flexible: Support for any SPL token through configurable mining pools
MOR is built on proven mining mechanics inspired by ORE, featuring:
- Hash-based Proof of Work: SHA3-256 based mining algorithm
- Dynamic Difficulty Adjustment: Automatic difficulty scaling based on network participation
- Epoch-based Rewards: Time-bounded mining periods for fair reward distribution
- Ephemeral Rollup Integration: Heavy computation handled off-chain on Magicblock's ER
- Base Layer Settlement: Final reward claims and account state settled on Solana
- Pool Creation: Admin creates a liquidity pool and deposits tokens for mining rewards
- Account Setup: Users create their mining account for a specific token pool
- Delegation: Miners delegate their account to Magicblock's Ephemeral Rollup
- Mining: Continuous hash-based proof of work mining for tokens
- Undelegation: After accumulating rewards, miners undelegate back to base layer
- Claiming: Final reward claims executed on Solana base layer
- Rust (latest stable version)
- Solana CLI (v2.2+)
- Anchor Framework (v0.30+)
git clone https://github.com/magicblock-labs/magicblock-validator
./test-integration/configs/run-test-validator.sh # make sure all the files are available (goto ./test-integration/schedulecommit/sh/update run this script) PORT: 8899
cargo run -- configs/ephem-localnet.toml # start the magicblock's er PORT: 7799
# Deploy program locally
cd mor-core
anchor deploy
anchor create-token # creates a test token, you can edit the address in the test files
# Run CLI against local cluster
cd mor-cli
cargo run -- setup-keypair# Run Anchor tests
cd mor-core
anchor run test-name- Test Order:
- create-token
- initialize-pool
- delegate-reward-pool
- initialize-miner
- delegate-miner
- submit-solution-er
- undelegate-miner
- claim-rewards
The MOR CLI provides all necessary tools for interacting with the mining protocol:
| Command | Description | Example |
|---|---|---|
setup-keypair |
Generate or import a Solana keypair | mor-cli setup-keypair |
initialize-pool |
Create a new mining pool with token deposits | mor-cli initialize-pool --token-mint <MINT> <AMOUNT> |
create-account |
Create your miner account for a specific pool | mor-cli create-account --token-mint <MINT> |
delegate-miner |
Delegate your miner to the Ephemeral Rollup | mor-cli delegate-miner --token-mint <MINT> |
mine |
Start mining tokens from the pool | mor-cli mine --token-mint <MINT> |
undelegate-miner |
Undelegate your miner back to base layer | mor-cli undelegate-miner --token-mint <MINT> |
claim-rewards |
Claim accumulated mining rewards | mor-cli claim-rewards --token-mint <MINT> |
get-account |
View miner account details and stats | mor-cli get-account --token-mint <MINT> |
# Generate a new keypair or import existing one
mor-cli setup-keypair# Create a pool with 500 tokens for mining rewards
mor-cli initialize-pool --token-mint tesnw8eLyAwSR5oGzGogWcAuJhp4pynBzjKvs6kvw9T 500# Create account for the specific token pool
mor-cli create-account --token-mint tesnw8eLyAwSR5oGzGogWcAuJhp4pynBzjKvs6kvw9T# Delegate your miner to start mining
mor-cli delegate-miner --token-mint tesnw8eLyAwSR5oGzGogWcAuJhp4pynBzjKvs6kvw9T# Begin proof of work mining
mor-cli mine --token-mint tesnw8eLyAwSR5oGzGogWcAuJhp4pynBzjKvs6kvw9T# When ready, undelegate and claim rewards
mor-cli undelegate-miner --token-mint tesnw8eLyAwSR5oGzGogWcAuJhp4pynBzjKvs6kvw9T
mor-cli claim-rewards --token-mint tesnw8eLyAwSR5oGzGogWcAuJhp4pynBzjKvs6kvw9T# Set Solana cluster (localnet)
solana config set -ul
# Set your keypair path
solana config set --keypair ~/.config/solana/id.json- Solana Base Layer:
http://localhost:8899 - Ephemeral Rollup:
http://localhost:7799
MOR uses a SHA3-256 based proof of work algorithm:
- Challenge Generation:
SHA3(miner_pubkey + epoch) - Nonce Search: Find nonce where
SHA3(challenge + nonce)has leading zero bytes - Difficulty: Number of required leading zero bytes (adjusts dynamically)
- Epochs: Mining periods of 150 slots (~60 seconds on Solana)
mor/
βββ mor-cli/ # Command line interface
β βββ src/
β β βββ commands/ # CLI command implementations
β β βββ utils/ # Helper utilities and constants
β β βββ main.rs # CLI entry point
β βββ Cargo.toml
βββ mor-core/ # Solana program (smart contract)
β βββ programs/ # Anchor program code
β βββ tests/ # Integration tests
β βββ migrations/ # Deployment scripts
β βββ Anchor.toml
βββ README.md
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Start mining today and earn tokens through proof of work on Solana! βοΈπ