I'm a ethereum beginner. I can't understand some of its concept.
for example, a contract should be executed by everyone on the network as a way to verify a block.
what about synchronization among all executions of the same program?
suppose I write a program to transfer $10 from my account to a friends as a penalty if I lost his book.
in this case, I only want one $10 transferred. but if my contract will be executed multiple times, then how to prevent multiple transfer?