Bitcoin: A game-theoretic analysis