How to Mine Ore: A Beginner-Friendly Guide
Big shoutout to Hardhat Chad and 0xIchigo for their awesome feedback and and help in shaping this article!
Ore is a Proof of Work token built on Solana that anyone can mine from anywhere. Soon after it was launched on April 2nd, 2024, it was heralded as the project that broke Solana. Solana was facing significant congestion due to spam transactions, most of which were caused by Ore miners during this time. The creator of Ore, Hardhat Chad, later paused mining on April 16th, 2024. On 6th August 2024, Ore v2 was released, and mining resumed. It introduces a new mining algorithm, Drillx, and token incentives to incentivize people to stake the token. Since its release, Ore transactions currently make ~5% of each block.
In this article, we will explore Proof of Work and mining by tracing its origins in Bitcoin. Later, we will compare Ore mining with Bitcoin mining before learning how to mine ORE via the web app and Command Line Interface (CLI).
Bitcoin
Bitcoin is the first cryptocurrency introduced by Satoshi Nakamoto in 2008. It introduced the concept of blockchains, where blocks (i.e., batches of transactions) are chained together and made immutable via hash chaining. Essentially, a block’s hash is a 64-digit hexadecimal number that is the result of sending the entries of transactions contained in a block through the SHA256 hashing algorithm. Each block uses the previous block's hash to chain them together, thus creating a chain of blocks. This property makes blockchains immutable; the hash value will not match if the data is altered.
Anyone can calculate and provide a block’s hash. First, the network sets a target hash value. The target hash is used to determine the mining difficulty. Mining difficulty is a dynamic parameter that adjusts every 2016th block, or approximately every two weeks. It is used to ensure that blocks are added to the blockchain at a consistent rate of roughly once every 10 minutes. Miners (i.e., anyone with a mining rig and mining software) solve a complex mathematical problem to find the hash that is less than or equal to the target hash. Every miner on the network does this until the correct hash and nonce (number used only once) combination is found. Whoever gets it first gets a reward in the form of Bitcoin and fees for the work done. Thus, mining is simply the process of solving complex mathematical problems, submitting hashes, and being rewarded for the compute done. However, solving these problems requires a lot of processing power and energy.
This mining process is called Proof of Work (PoW). The work done to generate the winning hash is viewed as proof that the miner validated the transactions in the block, thus proving this work was done. PoW is a consensus mechanism. Consensus is reached after the block is closed and added to the chain. While working on proposing new blocks and generating winning hashes, each miner also validates each new block as it is added. Each miner broadcasts to the network that the block is confirmed to be valid. New blocks use the previous block's header hash, creating a chain of proof, which leads to network consensus. This is why these proofs are called consensus mechanisms—because they form the basis of how consensus is reached. This only requires a little energy or computational power because each mining node does this while mining the latest block. As new blocks are added, the network confirms them.
The total supply of Bitcoin is capped at 21 million. At the time of writing, around 19 million Bitcoins have been mined. In 2009, the genesis block (i.e., the first block) was mined by its pseudonymous creator, Satoshi Nakamoto, earning 50 Bitcoin as a reward.
Ore
Ore, like Bitcoin, is a Proof of Work token, but it is implemented as a program on top of Solana. It can be mined on any laptop, phone, or home computer. Ore v1 had a few problems. First, it was too gameable, leading to mass spam that congested Solana. Another problem was the instant dumping of ORE, as miners lacked reason to do anything but claim and sell, causing the token's value to drop from around $4,000 to around $120.
To survive, Ore v2 has made several significant changes from the simpler v1:
- The introduction of a new, less gameable mining algorithm called DrillX ensures that even simple phone and laptop miners will never be priced out of mining Ore
- The introduction of ORE staking to boost mining rewards creates a demand sink that incentivizes miners to hold rather than claim and sell
Like Bitcoin, Ore also has a fixed supply of 21 million tokens. On average, only 1 new ORE will be mined every minute, so by approximately 2064, the full 21 million ORE will be mined. I recommend reading kelxyz’s article on the Helius blog, which covers Ore in greater detail.
Hash Power
Hash power refers to the computational power used to mine cryptocurrency, precisely measured by the number of calculations (hashes) performed per second. A higher hash power indicates a greater computational capability, allowing miners to solve problems faster and increase their chances of earning rewards.
In this case, your device will solve the problem and send a transaction to mine ore. To check your device’s hash power, open Terminal/Command Prompt and run the ore benchmark command. Alternatively, you can check your device’s hash power by visiting Ore’s website. The screenshots below show that my device can generate 600 hashes per minute (sobs, I need a better laptop).
Drillx, the new protocol introduced by Ore v2, is CPU-based, meaning a device with more cores can compute faster. A core is a single processing unit within the CPU that can execute instructions. The more cores a CPU has, the more tasks it can handle simultaneously.
How Do I Mine Ore?
You can mine ORE through the Command-Line Interface (CLI) or the web app on the Ore website. Mining ORE is essentially solving a complex mathematical problem to find the hash and then sending the transaction. Hence, there are two ways to increase your mining rewards: a device with powerful computing and the ability to land transactions faster. Drillx, the new protocol introduced by Ore v2, is CPU-based, meaning a device with more cores can compute faster. A core is a single processing unit within the CPU that can execute instructions. The more cores a CPU has, the more tasks it can handle simultaneously.
To have better landing rates, use staked connections and priority fees. Staked connections give you prioritized access to the leader (the validator currently executing the transaction), ensuring your transactions will be processed by the leader and not be dropped beforehand. During the transaction processing stage, priority fees incentivize the validator to prioritize executing your transaction over others. Simply put, staked connections help send your transactions to the leader, and priority fees help execute your transactions faster. Refer to this article to optimize transactions, minimize confirmation latency, and maximize delivery rates.
Using the CLI will give you better access to your device's hardware and control over the RPC URL used and priority fees set. However, the website can be a good starting point for beginners.
Web
- Visit Ore’s website and connect your wallet
- It will redirect you to create a new mining account. Once you click on “Create Account,” you will be prompted to sign a transaction. If you get the “timed out” error, you might have to retry by clicking “Create Account” again. This error happens when the transaction you signed is not processed and expires
- Mining will start automatically. You will be prompted to sign the transactions once a hash is found, so it's best to avoid running this in the background
- You can return to the home page to check your balance and click “Claim” to transfer the rewards to your wallet. You can also check your Activity by switching to the Personal tab
CLI
A Command-Line Interface (CLI) is a text-based user interface used to interact with a computer system, operating system, or application in a terminal. Based on your operating system, you must open Terminal (MacOS, Linux-based OS) or Command Prompt (Windows) applications.
Pre-requisites
You can verify if the above software has been installed correctly by running these commands:
rustc --version && cargo --version && solana --version
Here && is used to run the commands in a row.
Installing on Window
Rust and Cargo
Download and run rustup-init.exe. It will start the installation in a console and display this message for successful installation: Rust is installed now. Great!
Solana CLI
Open Command Prompt and run the following command:
cmd /c "curl https://release.solana.com/v1.18.18/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs"
C:\solana-install-tmp\solana-install-init.exe v1.18.18
Installing on Linux/macOS
Rust and Cargo
curl https://sh.rustup.rs -sSf | sh
Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)"
Install Ore CLI
cargo install ore-cli
The same command can be used to update the CLI to newer versions.
Configure Network
Let’s switch the network to Mainnnet, as you can only mine ORE on Mainnet currently. By default, Ore sends all mining requests to “https://api.mainnet-beta.solana.com”. The command solana config set lets you change the configuration; using the --url flag, we can change the network configuration:
solana config set --url https://api.mainnet-beta.solana.com
The URL can be changed to any RPC URL. For example, Helius offers access to staked connections to its shared plans starting at $49/mo, which is more beneficial than using the default URL. Replace the RPC URL from the above command with the RPC URL of your choice under the double quotes:
solana config set --url "https://mainnet.helius-rpc.com/?api-key=<your-api-key>"
Setup a Wallet
Let’s create a wallet to sign the transaction, pay network fees, and earn the rewards. (If you already have a wallet on your device, you can skip this):
solana-keygen new
The above command creates a new wallet. We will need to add some SOL to this new wallet to cover our mining transaction fees. Use this command to get the wallet's public key:
solana address
Copy the address and transfer some SOL to it. You can also check the balance of this wallet using the following command:
solana balance
Your wallet is now ready to mine ORE!
Start Mining
To mine ORE with all the default configurations, use:
ore mine
And voila, it will start mining ORE.
Advance Configurations
To change the default configuration, we add flags to the command ore mine. Flags can be added using this --<command>. Multiple flags can be passed in at a time.
- RPC
If you wish to add the Mainnet endpoint of your RPC provider, you can switch your network by adding the --rpc flag followed by the network address of your RPC provider:
ore mine --rpc "https://mainnet.helius-rpc.com/?api-key=<your-api-key>"
- Priority fees
In the above screenshot of mining ORE, the Priority fee is set at 50000 microlamports. We can change this and other parameters as well. Priority fees incentivize the validator (the one currently executing transactions) when there is congestion to process your transactions. The idea is that transactions paying higher fees will be processed earlier, ensuring faster execution for users willing to pay more.
Use this flag if you want to use dynamic priority fees provided by your RPC provider (provided you set that using the --rpc flag):
ore mine --dynamic-fee
If you have another URL to find the dynamic fees, add that RPC URL in double quotes for dynamic fee estimation:
ore mine --dynamic-fee-url <DYNAMIC_FEE_URL>
You can add a fixed priority fee using the --priority-fee flag. If dynamic fees are being used, this value will be the maximum value used. Note, the default value is 500000:
ore mine --priority-fee <MICROLAMPORTS>
- Other Configs
When we create a wallet, its (fee payer) configuration is stored at a default location (example: /Users/username/.config/solana/id.json). If you wish to have another wallet stored at a different location as the fee payer, you can add that feepayer’s file path using this command:
ore mine --fee-payer <FEE_PAYER_FILEPATH>
As ORE is an SPL token, an Associated Token Account (ATA) is created where this ORE is stored. This ATA was created when we first started mining. But, if you want another account to hold the ORE, you can add their keypair file path:
ore mine --keypair <KEYPAIR_FILEPATH>
To use all the above commands, you must keep appending them after ore mine.
Alternatively, you can store all these configurations in a YML file and directly pass the file's path:
ore mine --config <PATH>
An example config.yml file will look like this:
---
json_rpc_url: https://mainnet.helius-rpc.com/?api-key=<your-key>
websocket_url: ''
keypair_path: /Users/example/.config/solana/id.json
address_labels:
'11111111111111111111111111111111': System Program
commitment: confirmed
Please note that the Ore CLI is constantly updated. Ensure you’re using the latest version of the CLI to access new commands and all the bug fixes with the command:
cargo install ore-cli
You can check the current version with the following command:
ore -V
The ore help command lists all the current flags, what they do, and their arguments.
Claiming ORE
All ORE mined is restaked. To unstake and claim this ORE, simply run the following command to send your mining rewards to your wallet:
ore claim
You can use the ore stake command to stake your ORE balance.
The End
Bitcoin showed us the way by creating a secure, decentralized way to manage digital money. Now, Ore is taking things further by making mining fairer through its new algorithm. Its new version ensures miners hold ORE instead of dumping it by introducing staking. Mining ORE can be done easily via the web app or the CLI. Backpack has also released a guide on how to mine Ore from their wallet app. The Ore CLI is constantly being upgraded with new features, and all the repositories of this project are open-source. To learn about the latest updates, I recommend following the founder and the official Ore account on Twitter / X.
If you’ve read this far, thank you, anon! Be sure to enter your email address below so you’ll never miss an update about what’s new on Solana. Ready to dive deeper? Explore the latest articles on the Helius blog and continue your Solana journey today.
Ore sites
https://github.com/regolith-labs/ore
https://ore.supply/what-is-mining
https://ore.supply/ore-tokenomics
Resources
The evolution of Bitcoin mining