So bitcoin mining pools are very common, almost no one mines alone, because of the great difficulty in mining a block. So mining in a pool has pretty much been the standard.
However, how do people ensure that they are not getting cheated when mining with others? I can see two possible scenarios in mining pools whether the miners or the pool coordinator first confirms a valid hash for the block.
- If the miner first detects that he was lucky enough to successfully find a valid hash for the current block. Then he could configure or reverse engineer his mining software, to not tell the mining pool he has guessed the correct hash, and broadcasts the block onto the network himself with a separate address, to reap all the rewards instead of sharing it.
Or
- If the hash is first sent to the pool coordinator's servers, which then detects that the hash does validated the block, then the coordinator could broadcast that block onto the bitcoin network without telling any of the other miners that the pool was successful, so that it won't have to share any of its reward to all the miners. The pool could do this 10% of the time for all blocks mined in the pool, to not make it suspicious that the pool is not mining any/few blocks.
The bitcoin whitepaper does not speak about trustless pooled mining and I have not found any technical material that shows how a trustless mining pool can be achieved.
Bitcoin is a great trustless model for preventing reversed transactions or solving the double spending problem, but is all pooled mining based on trust or is there a cryptographical/mathematical way of preventing fraud here?
I've written this in Info Sec stack exchange instead of the bitcoin one because I believe the answer would be a technical one based on cryptography, math, hashing, proofs etc. and is not a question about the details of bitcoin.