The Math Behind Mining and How to Use it to Double Your Rewards

Let's suppose you were a happy little GPU, going about your business, when suddenly a program is delivered to you -- straight from your human -- for you to perform. It's a bit of an usual task. As a GPU, you're rather used to processing videos or rendering graphics for games. Instead, it seems your task for the day is some sort of a puzzle. But no matter: daunting as it may seem, you've been gifted an algorithm to help you along on your task. If all else fails and you're truly stuck on the problem, you're always welcome to revert to the tried and true route that computers do best: a tireless guess-and-check process.


See, this puzzle that your human's given you seems to matters a lot for them. The solved problem represents the digital signature of another human who's claimed they're using it to sign a payment to an address -- and as a GPU, it's your job to verify that the signature is legitimate. The signature isn't signed with a pen, or even a stylus, but rather, by a private key. Think of the private key as something that warps and distorts the numbers in a Sudoku problem to the point where it is wholly unique. Consider that, for example, if you changed a finished Sudoku problem so that all the ones were twos, all the twos were threes, etc, it would still be a valid solution to a slightly different problem. Alternatively, you can swap numbers around -- all twos can be sixes, and all sixes can be twos. You might even rotate the entire box. And out of all the possible ways of swapping around different numbers, there might be no telling what code was originally used to sign a transaction. You could use any consistent one-to-one method without loss of generality and still get a valid solution.


I think Sudoku makes for a fine analogy here because it's easy to recognize that it's NP but not P. That is, it's very easy to check that you've done it correctly -- you'll know you've done it when each row, column, and box contains exactly one of each number without repeats. But as anybody who's sat down with a Sudoku will tell you, it's often much harder to solve a puzzle than it is to check to make sure it's correct.

Worse still, this phenomena isn't limited to human comprehension. If the problem's not "difficult" enough to serve as an adequate verification method, there's always the option of simply making the puzzle even bigger. It takes a similar amount of effort to verify that a twenty-five-by-twenty-five box Sudoku puzzle is correct -- again, just check to see that numbers one through twenty-five are all present without any repeats. But it becomes exponentially harder to solve it, even for advanced computers, as the puzzles get larger.


Fortunately, for a lot of these puzzles, you're not actually required to solve the entire Sudoku puzzle -- you only need to show that it's probably legitimate by expending some minimum amount of work. This amount of work is variable, depending on the cryptocurrency, or on how many other processors are out there working on similar problems. But a valid proof of work for receiving a reward might be analogous to completing, say, just one of the boxes.


And of course, as anybody who's sat down with a family member or friend might report, it can be much easier to solve a puzzle if two or more people are working on it together. Even if one person's a lot better at Sudoku than the others, they might still miss something that others notice before them. If numbers can be filled out faster, and boxes can be solved sooner, then that means that more puzzles can be solved in a shorter period of time -- something that the humans seem to be wild about, for some reason.

This is what distinguishes pool mining from solo mining. In a share-based mining pool, each processor gets some credit in direct correlation to their processing power. It doesn't matter how many puzzles they've solved, or even how many boxes they've finished. Instead, they can be rewarded for how many numbers they contribute that ultimately help solve the problem for others. Though of course, it's important to remember that submitting numbers for a puzzle that has just recently been solved isn't all that helpful to anybody, which results in rejected shares.

And there's another catch: each Sudoku problem may only be submitted for query if the previous problem in the book has also been successfully completed. Once a puzzle's been completed, you're able to submit it, and the solution becomes the preface for the next set of puzzles. This is what makes the very essence of the blockchain. And since it's easier to verify that a puzzle's been completed correctly than it is to actually complete it, the program has been coded to not get you started on any puzzles that are preceded by a false puzzle. This prevents any old somebody from writing up a bunch of bad transactions and submitting them for verification -- they would either need to know the secret code used to sign somebody else's transaction, or they'd need to be able to verify a lot of puzzles correctly, and do so faster than anybody else at that, in order to catch up with the right spot in everybody else's puzzle book.

"Now wait a minute,"


you chime in, being a particularly clever little GPU.

"I'm just solving Sudoku problems on a nine-by-nine grid. And for a lot
of these boxes, I'm just guessing and checking each box to see
if that value works."


Well, yes. At least for me, a lot of Sudoku problems get to a point where I have to check each value -- one at a time, and for each box -- until I have a breakthrough. I find it incredibly tedious, but my GPU doesn't seem to mind.

"Is there anything preventing me from applying the same guess-and-check
process to a completely different book of puzzles? After all, if it's
the same sized grid and it's an equally valid approach for any given
box, what's the harm?"


Right you are. Let's talk a little bit about Merged Mining.

If you have two different cryptocurrencies that exist on two separate blockchains and both share the exact same hashing algorithm, then it becomes possible to mine multiple cryptocurrencies at the same time while expending almost the same exact amount of energy from your hardware. This carries a number of advantages, the most obvious being that it has the potential to double your mining rewards over the long run.


There are many examples of parent blockchain and auxiliary blockchain pairs. One example is the Scrypt hashing algorithm, present both in Litecoin and Dogecoin blockchains. This commonality is part of the reason for a pet theory of mine that these two currencies are linked to a degree -- Even at a time when the rest of the market was facing a mild downturn, both Litecoin and Dogecoin were rising steadily during the height of Dogecoin's hype.



Aside from reduced energy consumption compared to the amount of hashing performed, merged mining has a couple of other benefits. Since it allows users to engage in multiple blockchains simultaneously, the total integrity in the cryptocurrency network as a whole is strengthened. If a user can spend the same wattage on mining Bitcoin or Bitcoin and Bitcoin Cash simultaneously, since both employ SHA-256, why wouldn't they reap the benefits of both? The result is more miners verifying transaction for other currencies, thus preventing any one firm from gaining central authority and engaging in double-spending.

But this diversification of mining does more than just broaden the security of our more beloved coins that share a common algorithm. For established coins with a relatively proprietary -- but effective -- hashing algorithm, there stands an intensive to innovate. When new currencies are produced that advertise new features while securing themselves with a tried-and-true hash, there's little to lose from merge mining it along with an established token. This provides younger coins with older algorithms some security fresh out of the box. Even if some small percentage of merged mining hardware is willing to engage in their blockchains, it's still a great head-start over beginning from square one.

So if you're an established miner -- even for some smaller altcoin -- I implore you to research your merged mining potential. It might take a little bit of fiddling, but from my own experience, that shouldn't be anything foreign. I believe there's little to be lost from the process and much to be gained, not just in your personal wallets, but in the integrity of the crypto community as a whole.

And rest assured, your GPU will thank you for helping to make its hard work that much more useful.

How do you rate this article?




I've been writing short stories since 2016 or so.

General Jack's Doomsday Shenanigans
General Jack's Doomsday Shenanigans

Scroll through my crackpot ramblings, please.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.