March 04, 2018
Incentives On The Blockchain
This time around we will take our understanding of economic incentives a step further. And see how they’re designed using game theory. Let’s dive in.
To understand how economic incentives are designed and why they work, we have to turn to game theory. Game theory is the study of strategic decision making.
In simpler terms, it looks at how people make decisions or as we covered and discussed in my last article choices to reach the best outcome, when they take into account their opponents choices as well. Let’s look at a simple example.
You and your friend are arrested for a crime and in prison. Each of you in solitary confinement with no way of communicating with each other. Each of you is given the opportunity to either betray the other by testifying against them or to cooperate with them and stay silent. If you both betray each other each of you will serve two years in prison. If you betray your friend, but stay silent you will be set free, but your friend will serve three years in prison and vice versa. And if you both remain silent, you will both serve one year in prison on a lesser charge.
Let’s look at a matrix of the possible decisions you could make in this situation. It looks like the best outcome for both of you is that none of you confess. And you both get sentenced to one year in prison. The worst outcome for both of you would be that you both confess and each of you gets sentenced to two years. So you might initially think, that you won’t confess. But you can’t communicate with your friend. You don’t know what they’ll do. If they confess and you don’t that will be the worst outcome for you. Because you’ll get sentenced to three years on the other hand, if they don’t confess and you do, that will be the best outcome for you, because you’ll be free and you do that will be the best outcome for you, because you’ll be free. So actually, the best thing for you to do regardless of what your friend does is to confess. If they confess. You’re protected. And if they don’t, you get a reward. So you decide to confess. The interesting thing is, your friend in the other room, is thinking exactly the same thing. So they’ll confess too. And you end up with the worst outcome for both of you. Where it was possible that you’d have a better outcome by cooperating.
The outcome where you both confess is called the nash equilibrium. And nash equilibrium is reached when neither player in a game has anything incentive to change their strategy.
The point of nash equilibrium, is that it could be used to predict the outcome of a game by taking into account the actions of all the players. So how does this relate to designing incentives on the block chain. As we well know by now, blockchians are decentralized networks created from many nodes that don’t know each other. The nodes don’t have have any incentive to cooperate with each other. And so each node will want to act in their own self interest.
So how can we get all these nodes to want to work together? The simple answer is, we can’t. But, if we take into account game theory, and more specifically the nash equilibrium, we can work backwards to design a game where each player working in their own self interest gives us the outcome we want. And that’s exactly what proof of work does. Let’s look at how proof of work functions as a game.
As we know, a block chain is a series of blocks. Each containing individual transactions. Each block also contains the hash of the previous block. This links each block to the previous block making a chain of blocks. You can also think of each block in the chain as having a score. The genesis block has a score of 0. And the score of each subsequent block is the score of the parent plus their proof of work. The game has two players. Users who can send and receive coins, and miners who authenticate transactions and add new blocks to the chain. What we want to achieve is that users send and receive valid transactions. To do this, we need the miners to verify the transactions and correct and post them to the block chain.
But how do we stop miners from creating their own chains?
Or adding different blocks to multiple chains?
What we want is for there to only be one chain that contains the valid transactions everybody agrees on.
So we introduce a new rule to the game.
As a miner, you get a reward if you add a block to the longest chain.
The longest chain is the chain with the highest score.
The chain with the highest score is the one that most people have added to.
So by introducing this rule, you’re getting people who have no interest in working together to come to a majority agreement.
Each person just wants the reward, so they’ll add their computing power to the chain with the highest score. Anyone who mines on a different chain is just wasting their computing power and losing money.
So now, miners want to add to the longest chain, but they could want to expand the nodes, with their blocks to increase their chances of getting the reward.
If we had all the miners flooding the system with their blocks at all times, there would be way too much noise, and we could never come to an agreement about which block is the most valid.
To combat this, we add a new element to the game.
A miner can only get a chance to add a new block to the longest chain if they complete a puzzle.
So each miner is competing with all the other miners, to complete this puzzle.
And the miner who completes the puzzle first get to add his block to the chain.
Now that they have to all compete with each other miners won’t waste their time expanding the system with new blocks.
The puzzle itself takes time and computational power to complete.
And miners know that any block without the solved puzzle won’t be added to the chain.
So it would waste their time.
An added benefit of the computation puzzle is that it’s very expensive. By making this puzzle expensive to solve, we are adding a sort of punishment for anyone who wants to cheat the system.
Miners are deincentivised from cheating because the cost to cheat will outweigh the reward.
As I discussed in the proof of work and proof of stake article. This makes proof of work a game whose hash equilibrium is all the miners contributing to the longest chain and mining only valid blocks.
There are no incentives for any one miner to change their strategy. There is no chance for them to gain more money by cheating the system. Incentives are used to make the choices that help the system more appealing while making the choices that hurt it less than appealing.
In this way, Satoshi manufactures cooperation among self-serving nodes by creating a game where best outcome for each player produces the best outcome for the network.
Other consensus algorithms like proof-of-stake use game theory in much the same way.
There are two major differences in how proof-of-stake operates as a game when compared ro proof-of-work.
The first difference is that the process for becoming a miner is slightly more selective in proof-of-stake.
In proof-of-work, all you need to become a miner is to have a computer.
But in proof-of-stake, you need to have been an active user on the block chain
More to come on this
Thanks to Niloo Ravaei Blockchain Council