Few emerging technologies can match cryptocurrency for pound-for-pound potential, impact, and applicability. Crypto has already begun to radically alter finance, privacy, and even gaming forever. Let's walk through some of the nuances of mining, share tracking, and how mining pools work.
This article assumes basic knowledge of blockchain technology and cryptomining. If you are a true newbie, please check out ["A Gamer's Guide to Blockchain and Crypto"]/blog/gamers-guide-blockchain-crypto) to get acquainted.
When a blockchain transaction is sent, its metadata—info about the sender, recipient, amount, and timestamp—gets encoded with a cryptographic algorithm. Using Bitcoin's SHA-256 algorithm, the resulting hash is a unique, 64-digit jumble of hexadecimal letters and numbers.
Hashing puts the "crypto" in "cryptocurrency." It's sort of like using a secret decoder ring, except that any text you enter produces a totally unique hash. Change one little character, and you would get something completely different! Blockchain protocols use hashing functions in tons of different ways. The term is used somewhat interchangeably to refer to both this act of cryptographic encoding, and the mad dash for digital dosh that comes with cryptomining.
Every cryptocurrency has its own mechanism for issuing coins and confirming the validity of transactions. With Bitcoin, the network generates a set of complex cryptographic puzzles that require a particular hash to solve. Network participants known as miners use their GPUs (and sometimes CPUs) to randomly suggest solutions to those equations. It's a lottery combined with a high-speed race.
With all the business about mining and hashing, it's hard to know whether your GPU is digging for digital gold or slinging cyber-spuds. Why don't we break it down slow with a hypothetical?
Let’s say Bob is sitting pretty with a few bitcoin in his wallet, and he spies the delicious pizza Scott just baked. Feeling a little flush, he offers Scott 1 BTC for that legendary pie. Scott agrees—and why wouldn't he? That's about 50 Gs for his secret sauce. He promise to deliver the pizza, but only once Bob's paid up.
With fiat currency, Bob could wire Scott's bank or palm him a few bills on the doorstep. But cryptocurrencies require no intermediary institution—there's no bank to insure their transaction in case Bob goes bust. How does Scott prove that Bob forked over the dough?
Blockchain is both the mechanism and the solution to this issue of trust. Bob sends a message to the network that reads: “Bob sends 1 BTC to Scott’s wallet.” This data is then encoded into a unique 256-bit hash representing the pending Bitcoin transaction.
Miners lend processing power to help sort, record, and verify transactions. What’s in it for them? Don't they have better things to do with their rigs than look after Bob’s pizza?
Bob would go hungry if it weren’t for his clever solution: bribery. Bob offers a sliver of bitcoin from his stash to any miner who “solves” the block containing his pending transaction. Now miners have a bit of incentive to set their machines to the task.
To win Bob’s block, a miner needs to guess the correct hash to “solve” the puzzle and resolve the transaction. This gets harder to do as blockchains grow and networks get crowded, as difficulty is designed to increase with competition.
Say Arlo comes along with his supercomputer and guesses the hash in seconds. Soon he'll go and broadcast his answer to the world, gloater that he is. If the other miners have a huddle and find out Arlo's right, they admit defeat. Arlo wins the block and Bob's bitcoin reward.
Once Arlo wins, Bob’s block becomes the next block in the chain. With their transaction confirmed, Scott can release his kung fu grip on the pizza, confident that his fortune is safe in his Bitcoin wallet.
In this way, all blocks are linked to one another in a permanent record of every transaction using that coin to date. Bob’s block now includes every previous transaction on the Bitcoin blockchain. And every block that comes after will include Bob’s block, cementing his pizza as part of history. Ain’t that cool?
Hashing is the process by which blocks are won, chains are established, and miners make bank. The number of tries you can make in a given period of time is known as hashrate or "hash power." In simplest terms, it’s how fast your hardware can guess the correct string of characters that solves a puzzle. This varies based on the sophistication of your hardware.
Technically you and I have our own unique hashrate. We could easily sit down and type out random strings of numbers and letters in the vain hope of winning a block—I say "vain" because we have absolutely no chance in hell of beating a machine running the same calculations. Even this Minecraft computer would blow our efforts out of the water.
The reason is simple: humans are not very good at running parallel computations. We’re quite good at figuring out 1 + 1 = 2. We can even mix it up and tell you that 1 x 1 = 1, and that 1 / 1 = 1. But if you ask the Average Joe to do all these equations at once, there’s a decent chance he have to do 'em the old-fashioned way: one at a time.
Computers, on the other hand, especially GPUs, are great at this kind of thinking. They may not be able to tell you the meaning of life (yet), but they can churn out thousands of numbers and solutions per second. This includes guesses for the hash ID of a particular block.
A miner’s GPU, CPU, or ASIC will have a specific hashrate determined by the hardware’s processing power. If you can hash more solutions than your competition, you increase your chances of winning a block. Of course, like everything else in life, luck plays a part. Which leads us to share tracking.
Suppose Joe has the biggest, baddest gaming rig in town, and he's ready to venture into cryptomining. He doesn’t care to do all the complicated bits, so he joins a mining pool to expedite the process. Now all he's got to do is sit back and dream of all the sweet cash his 2080 Ti is going to rake in. When he comes back to the keyboard, he refreshes the page and finds… a big, fat zero in his account. Looks like Eric and Kyle won all the recent blocks.
“But how?” Joe exclaims. “Eric and Kyle have plebeian 1050 Ti cards!”
Well, what Joe failed to realize is that Lady Luck plays a large part in miners' fortunes. His cards may have come up with more solutions, faster than the other GPUs, but they did not come up with the right solutions. In fact, they didn’t even submit a single share!
No mula for Joe today, because hashrate is not equivalent to earning rate. Your hashrate simply measures the number of hashes (guesses) your computer can churn out in a given period.
Earning rates are influenced by several factors, including the coin protocol, pool payout scheme, and plain ol' luck. When you add these factors together you roughly derive a coin’s mining difficulty. Difficulty varies wildly between different coin protocols.
If you were only rewarded for winning a block, then your chances for earning on a popular network would be astronomically low. Luckily, mining pools each have their own set of rules for how and when miners are rewarded. Let’s return to Joe and his big, fat zero.
Let’s say Joe was mining for Ethereum on Salad, and the target hash ID began with two zeroes. If Kyle's PC figures it out first, he wins the block—but working in a pool means he's not entitled to the full earnings from that block. Eric’s PC got very close to the number as well, and the pool wants to reward him for his efforts. The pool awards him a "share" for his proof of work. Joe’s PC, sadly, was nowhere near the right ID, and therefore he earned no shares.
Fortunately, Lady Luck hates no one—except maybe this guy. Joe's higher hashrate means he'll get to submit more shares over a longer timeline. If Joe keeps Chopping, he'll end up with more earnings than either Kyle or Eric. When share tracking is enabled on a pool, your earning rate indicates your actual earnings, not your projected or average earnings.
For a deeper look at how mining pools make money, check out our FAQ article on some of the different payout schemes mining pools use.