Coinffeine is a company, a desktop application and, most importantly, a protocol that allows decentralized exchange of bitcoins. This is the first of a series of posts in which we will explain the basics of Coinffeine’s protocol.
Let’s start with the following scenario, by the way very cinematic, in which two people who do not trust each other want to trade. This scenario implies a risk, because if the first person surrenders his briefcase before the other person gives him the goods, he runs the risk of being left with nothing and vice versa.
Trust without a third party
This situation is analogous to what we have in an exchange of bitcoins in Coinffeine: briefcase → FIAT goods → bitcoin. It does not exist trust between the parties, because there is not a third party that both trust. The parties have been matched without knowing who is their counterpart.
This situation seems unresolvable in principle, except for the fact that we can rely on two powerful tools: The first is that we are talking about rational agents, that is, looking for their own benefit, and the second is that we assume the presence of bitcoin. To solve the first we can use game theory to analyse the problem, and thanks to the second we have mechanisms such as multisig, allowing us to use the funds in new and creative ways.
In this post we will focus on the first tool – game theory – which is a discipline midway between mathematics and economics, and applicable to situations in which rational agents make decisions in a well-defined scenario.
Although there are reminiscences of the kind of reasoning that is done in game theory in many ancient texts such as The Art of War by Sun Tzu or in the work of Charles Darwin, one can say that this concept appears in 1944 with John von Neumann and Oskar Morgenstern’s book entitled Theory of Games and Economic Behavior. Von Neumann is an old acquaintance of computer engineers because he is, along with the great Alan Turing, one of the fathers of computing.
Game theory fits well with the era in which it was formalized, and during the Cold War it seems like military terminology leaked and was adopted as the jargon of this field. The “games” can be seen as war scenarios, and the term “strategies” is frequent… The Cold War was actually brought to an end through mutual assured destruction. This is another game theory concept, which we will discuss in greater detail in the next post.
The Prisoner’s Dilemma
A good starting point to get into game theory is the prisoner’s dilemma. It is probably the best known game, and it will serve to identify the elements in the games before we can analyse them and draw conclusions. The game is set in a police station, where we have two members of a criminal gang arrested and imprisoned. Each prisoner is in solitary confinement with no means of speaking to or exchanging messages with the other. The rational actors will be, in this case, the two prisoners.
The next thing to consider in any game is the available actions of each actor. In this case, both prisoners face a difficult decision: the police are pushing them to collaborate with justice and testify (or defect, D), but they can as well keep strong and silent (and collaborate, C, with the other prisoner). The police admit they don’t have enough evidence to convict any of the prisoners on the principal charge, and plan to sentence both to a year in prison on a lesser charge. Each prisoner is given an opportunity to freedom: testifying that the other committed the crime for which he will be sentenced ten years in prison. However both prisoners have a problem. If both of them decide to collaborate with justice they will both go to jail, but only for five years each. These sentences are possible incentives or costs of this game, and is the third element to look for when characterizing a game.
We can set all the options on a table. The rows represent the possible actions of one player and the columns of the possible actions of the other player. In the cells we place the appropriate incentives to each of the scenarios. The result is known as a normal-form game, and in the specific case of the prisoner’s dilemma it looks like this:
The players actions and incentives in the prisoner’s dilemma
Now we have enough elements to analyse this game. For our example, we can apply a simple concept called dominant strategy. In other cases you have to use other solution concepts that are more complicated. Strategic dominance are those moves that are the best answer to anything the other player does, and by definition, will be the preferred strategy by the player.
To analyse the dominant strategies of the blue prisoner, we have to look at the most convenient depending on the actions of the orange prisoner:
– If the orange prisoner decides to cooperate (C), and the blue prisoner does so as well (C) both will get only one year in prison. But if the orange defects (D) he will be set free, so in this case the blue prisoner should choose D.
– If the orange prisoner decides to defect (D), the blue prisoner will prefer to do the same and spend five years in jail rather than the 10 years he would get to cooperate (C) and be betrayed.
Regardless of what the other player does, the best response for both players is to defect. This is because the game and table are symmetrical and it is said that there is an equilibrium in (D, D). This game and its solution are very interesting because it helps us to understand why it may be wise to be rational and not cooperate in certain situations, although you could gain from it.
Games in everyday situations
There are many situations around us that can be expressed through games with incentives that have different values, but with the same relationships among them and with the same practical result. This helps us understand why it is rational not get informed before voting (rational ignorance), or why it is so hard to take care of the environment (tragedy of the commons), among other situations.
Let us go back to our cinematic scenario and the exchange of bitcoins in Coinffeine. It is clear that there are rational players, who can take a number of actions and that we can conceive this situation as a game. However, we still do not have all the pieces. We have to design the possible actions so that instead of no collaboration, as in the prisoner’s dilemma, both players choose to collaborate as the only option. In order to achieve this we need to understand the concepts of mutually assured destruction and throwing away the steering wheel. But, that is the topic for the next post.
If you want to go deeper into game theory:
– Game Theory: http://en.wikipedia.org/wiki/Game_theory
– Good introductory book: http://artofstrategy.net/
– Introductory course in Coursera: http://online.stanford.edu/gametheory-wi13