What math problems are they trying to solve when mining for crypto?

76 views
0

What kind of math problems are they solving? Is it used for anything? Why are they doing it?

In: 919

For the majority of Proof of work coins, it’s effectively just brute forcing the cryptographic hash of a collection of data so that the result is a very low value.

That’s it, just an arbitrary task designed to be difficult on purpose do that one single entity can’t control the network.

There is a special function called a cryptographic hash. Basically it takes anything as input and produces a fixed-length output. For all intents and purposes here, you can basically treat the output as being random. Meaning you can’t predict what the output is going to be for any given input without simply trying.

For miners, the input is the block they want to add to the block chain, plus a magic number they get to come up with. They then combine the two and perform the cryptographic hash. What they’re looking for is for a output of the hash that has certain properties. For example, the hash (being a number) has 32 trailing zeros.

Since the output isn’t predictable it’s basically simply a matter of choosing random magic numbers (as part of the input), combining it with the block, hashing it, and seeing what you get out of it. It’s brute force and odds go to whoever is faster (can make more guesses in a certain amount of time).

Whoever produces the correct hash output first gets to add their block to the block chain. This block will have a special transaction that creates new cryptocurrency out of thin air and adds it to their wallet. Basically they get paid. Additionally, the block main contain special transactions from other users that give money to whoever adds that block to the block chain.

In a sentence: they are looking for a number that when stuffed at the end of the block being mined and fed trough a specific process will result in a number that follows specific properties. They are essentially just looking for a verification number.

Its one purpose is to be hard to find, and to later be used to verify that the block hasn’t been changed or manipulated. Beyond that it doesn’t serve a purpose.

On mobile, so bear with me…

Crypto “proof of work” mining is not actually solving mathematical problems, it’s just making guesses until someone gets the correct answer. So what’s the “correct” answer?

Imagine you have a mysterious black box. Anything you put in the box comes out as a string of numbers, and always the same amount of numbers. When you put your stuff in the box you don’t know what the string of numbers on the other side will be, but you can add things to the box to change the output. This is what the “hashing” does.

Now imagine that you need the string of numbers on the other side to start with a zero. You have to take all the stuff you’d normally put in the box and make guesses about the other stuff to add to get a zero as the first number on the other side. Now imagine you need 2 zeroes to start, then 3, then 4… this is the “increasing difficulty” of crypto mining and it requires the “miners” to make more and more guesses for what they add to the transactions (the stuff for the next block) to get the desired output hash (the string of numbers after hashing).

When someone makes a correct guess they will send that to the crypto network so other nodes (other miners on the network) can test it for accuracy. Once more than 50% agree, it becomes the next block in the chain.

The other replies are correct, but not really ELI5.

So the short answer is: they run a program that, if you give it a number, it spits out a different, unpredictable number. When that output number matches a third number closely enough, you win. Think of it as guessing lottery numbers.