Some questions already adressed similar issues (preventing fraud in a mining pool, what prevents a pool miner for stealing an entire block) but my question is different from those, if I understand correctly the mechanism.
Here is my point: Let's say for simplification there are only three nodes in the blockchain:
- Platform node, the only platform where you can exchange BTC for FIAT, in America
- My node, in Europe
- Bad guy's node, in Europe
My and bad guy's node are both mining, as well as Platform's node. Now, imagine I find the solution for a block at T time. At T + 1 second, my node sends the solution on the network. My solution is made of:
- My public key where I'm getting the reward
- Data = block with the solution
- Signed Data with my key
At T+ 2 seconds, bad guy's node receives the solution. But bad guy has a special code snippet: he reads my candidate solution, steals it and writes a new candidate block that he sends on the network with his public key and his signature.
Because he has better connection, CPU or whatever network tricks, Bad Guy's candidate block arrives to platform's node at T+3 seconds and my candidate block arrives at T+4 secondes.
Question: So in this situation, the reward from mining would go to the bad guy's node from the point of view of the platform's node. And I would not be able to recover them in FIAT. What mechanism prevents such a stealing?