I understand that every second the timestamp & potential transactions is hashed.
I guess there exists a "start time" on the block chain we can't roll the clock before because transactions with timestamps already exist on the chain. But could we roll back say just a few minutes? Could this gain us anything?
Anyway, even if we can't roll back in time, could we edit the program to try as many hashes as possible every second. For example, suppose we try 100 times to hash instead of once, for a given second, we then broadcast the block. Would other nodes on the network accept the block, even though it will be a little late? Do other nodes on the network use some API to get the actual time? Surely the system must allow a fudge factor to account for the latencies?
Even if they do reject, what about this: time is 5 seconds past six, we then repeatedly try to hash the 10 second timestamp - we get 5 whole seconds to do this. If we succeed and no one else has, we can broadcast the block.
Basically, in the PoW system it's provably impossible to gain an advantage without buying more hardware - a node can tamper with code and clocks as much as they want, they won't get an advantage. It's not clear to me how PoS systems are protected, since they must rely on code integrity & clocks?
Similarly could minting be tricked? If it uses a random number generator, where does this random number come from? Can it be forged?
I'm a technical guy, so happy for fully technical explanations - no holding back! :)