Game Equilibrium#
Game equilibrium refers to a relatively static state in which all participants in a game achieve their respective maximum utility and are unwilling to make any changes that they consider to be slightly better.
Of course, in the equilibrium state where all parties are satisfied with the game results, the actual utility and satisfaction of each party are different.
Game equilibrium not only reflects the competitive relationship between the interests of the parties in the game, but also reflects the cooperative relationship between the parties. For example, the restructuring of assets between companies through acquisitions and mergers to achieve a win-win strategy is a practical manifestation of game equilibrium.
Game theory is essentially a process from dynamic competition (bargaining) to relatively static cooperation (consensus), so game equilibrium is not only a requirement for market competition, but also an inherent requirement for corporate development.
Nash Equilibrium#
Nash equilibrium (also known as non-cooperative game equilibrium) is an important term in game theory named after John Nash.
In a game process, regardless of how the other party chooses their strategies, one party will choose a certain strategy, which is called a dominant strategy.
If, under the condition that the strategies of all other participants are determined, the strategy chosen by any participant is optimal, then this combination is defined as Nash equilibrium.
A strategy combination is called Nash equilibrium when each player's equilibrium strategy is to maximize their expected payoff, while at the same time, all other players also follow such a strategy.
Strictly dominant strategy equilibrium, iterated elimination of strictly dominant strategies, pure strategy Nash equilibrium, and mixed strategy Nash equilibrium are commonly referred to as Nash equilibrium.
Strictly dominant strategy equilibrium is a special case of iterated elimination of strictly dominant strategies, iterated elimination of strictly dominant strategies is a special case of pure strategy Nash equilibrium, and pure strategy Nash equilibrium is a special case of mixed strategy Nash equilibrium.
Classic Cases#
Prisoners' Dilemma#
In 1950, Merrill Flood and Melvin Dresher of the RAND Corporation formulated the theory of relevant dilemmas, which was later presented by consultant Albert Tucker in the form of prisoners and named "Prisoners' Dilemma".
The Prisoners' Dilemma is a game theory model and a representative example of non-zero-sum games in game theory. It includes dominant strategy equilibrium, which reflects that the best choice for individuals is not necessarily the best choice for the group, or that individual rational choices often lead to collective irrationality. Similar models frequently appear in price competition and environmental protection in reality. The classic Prisoners' Dilemma is as follows.
The police arrest two suspects, A and B, but do not have enough evidence to charge them. So the police separate the suspects and meet with them separately, providing them with the following three choices.
- Option 1
If both remain silent or deny (cooperate with each other), both will be sentenced to 1 year in prison.
- Option 2
If both accuse each other or confess (betray each other), both will be sentenced to 8 years in prison.
- Option 3
If one person confesses and testifies against the other (unilateral betrayal), while the other remains silent or denies, the person who confesses will be released immediately, and the other person will be sentenced to 10 years in prison.
The Prisoners' Dilemma payoff matrix is as follows:
B denies | B confesses | |
---|---|---|
A denies | 1,1 | 10,0 |
A confesses | 0,10 | 8,8 |
"If both choose Option 1, it is the optimal choice for both, which is the Pareto optimal solution that takes into account the interests of the group. However, from the perspective of individual interests and without knowing the choice of the other party, choosing 'confess' is the most reasonable, safest, and optimal strategy." Therefore, in the end, both A and B will choose to "confess".
Thus, it is not difficult to see that choosing "confess" is a dominant strategy for either A or B, and both choosing "confess" is a set of dominant strategy equilibrium.
This example demonstrates that in non-zero-sum games, Pareto optimality and Nash equilibrium are conflicting, and Nash equilibrium is more common.
Although A and B have chosen "confess" for their own self-interest, it is not the best outcome for the group as a whole.
The Prisoners' Dilemma reflects the widespread and profound significance in real society: the conflict between individual rationality and collective rationality. The pursuit of self-interest by individuals often leads to a Nash equilibrium, which is an outcome that is not beneficial to the group as a whole. This clearly contradicts Adam Smith's view in "The Wealth of Nations": "By pursuing his own interest, he frequently promotes that of the society more effectually than when he really intends to promote it."
The Prisoners' Dilemma also provides people with an inspiration: according to Nash equilibrium, if one wants to achieve overall benefits or cooperation is a "self-interest strategy", one must follow the golden rule, which is to treat others the way one wants to be treated, and at the same time be followed by all participants, similar to "do not do to others what you would not have them do to you".
Pigs' Payoffs#
Pigs' Payoffs is a famous example of "Nash equilibrium" proposed by John Nash in 1950.
Suppose there is a large pig and a small pig in a pigsty. One end of the pigsty has a feeding trough, and the other end has a button that controls the supply of pig feed. Pressing the button will bring in 10 portions of pig feed, but pressing the button requires consuming the energy equivalent to 2 portions of pig feed. The button and the feeding trough are in opposite positions, so the pig that presses the button not only consumes energy but also loses the opportunity to eat at the trough first. There are several choices between the large pig and the small pig.
- If the small pig runs to control the button and the large pig waits at the feeding trough, then the large pig can eat 9 portions of pig feed first, leaving only 1 portion for the small pig.
- If the large pig runs to control the button and the small pig waits at the feeding trough, then the small pig can eat 4 portions of pig feed first, leaving 6 portions for the large pig.
- If both the large pig and the small pig run to control the button together, then the large pig can eat 7 portions of pig feed, and the small pig can eat 3 portions.
The payoff matrix of the Pigs' Payoffs is as follows:
Small Pig waits | Small Pig acts | |
---|---|---|
Large Pig waits | 0,0 | 9,1 (-1) |
Large Pig acts | 6 (4),4 | 7 (5),3 (1) |
If the large pig chooses to wait, what will the small pig do? In this case, if the small pig chooses to wait, the payoff is 0; if it acts, the payoff is -1. No matter how it chooses, the small pig can only starve to death, so when the large pig waits, the optimal strategy for the small pig is to wait, and they will starve together.
The large pig also knows the choice of the small pig, so the large pig can only choose to act in order not to starve to death.
Since the large pig can only act in any case, is there any need for the small pig to act? If the small pig waits, the payoff is 4; if it acts, the payoff is 1. Obviously, the best strategy for the small pig is still to wait. Therefore, it can be seen that the situation where the large pig acts and the small pig waits is the inevitable outcome of the Pigs' Payoffs, that is, Nash equilibrium.
The Pigs' Payoffs can still be explained in the context of market competition in real-world enterprise. For example, large companies are often willing to explore the market or invest in technological innovation, while small companies tend to reap the benefits and follow the large companies to make quick money. This is not because small companies lack innovative spirit, but if we analyze it from the perspective of this case game, small companies do not need to innovate. The relationship between small companies and large companies is similar to the relationship between small pigs and large pigs.
If a small company invests a lot of costs in innovation, it is like a small pig personally controlling the button. At this time, the large company can imitate and earn most of the profits with its own size advantage, while the small company will not benefit and eventually become a "starving" small pig. Therefore, based on rational decision-making, large companies can choose to innovate, while small companies generally can only choose to follow and ride the wave.
The phenomenon of "small pigs lying down while large pigs run" is caused by the game rules, and changing the core indicators of the rules will inevitably lead to changes in the results. For social rules, the behavior of "free-riding" by "small pigs" affects the optimal allocation of resources. Therefore, to achieve effective allocation of social resources, the rationalization of the core indicators of the relevant rules should be the first step.
Game Theory and Blockchain#
Blockchain integrates multiple disciplines and is a clever combination of existing mature technologies. Game theory is one of the eight pillars that make up blockchain technology and drives blockchain thinking, while the birth of blockchain provides stronger technical support and lower opportunity costs for game theory.
From a macro perspective, the ideal state achieved by various games is Nash equilibrium, and the ultimate goal is to achieve Pareto optimality. The decentralized, autonomous, and collective maintenance characteristics of blockchain strongly support the development of multi-level and multi-dimensional games. Through the cycle of game-compromise-game, a consensus mechanism is developed, which leads to smart contracts.
From a micro perspective, game theory ensures that the database encryption system is not vulnerable to internal destruction, and blockchain uses distributed open consensus and cryptography to help achieve Nash equilibrium in game theory. It is the combination of these two interesting concepts that makes game theory such a special existence in blockchain. The consensus mechanism formed by the game leads to institutionalized standardization and smart contracts, which will always exist in digital currencies.
Smart Contract Technology#
Smart contracts were first proposed in the late 20th century, but it was not until recent years with the development of blockchain technology that they gradually became familiar to the public. The concept of smart contracts includes three elements: commitment, protocol, and digital form. Therefore, it can extend the application scope of blockchain to various aspects of financial industry transactions, payments, settlements, and clearing.
A smart contract is a pre-programmed code that executes the corresponding contract terms immediately when a pre-defined condition is triggered. Its working principle is similar to the if-then statement in computer programs.
Classification of Smart Contracts#
Smart contracts are mainly classified into two categories based on whether they are Turing complete or not, namely Turing complete and non-Turing complete.
Common reasons that affect the achievement of Turing completeness include limited loops or recursion, inability to implement arrays or more complex data structures, etc.
Turing complete smart contracts have strong adaptability and can program complex logical operations, but there is a possibility of falling into infinite loops.
In contrast, non-Turing complete smart contracts cannot perform complex logical operations, but they are simpler, more efficient, and more secure.
Blockchain Platform | Turing Complete | Programming Language |
---|---|---|
BTC | Incomplete | BTC Script |
ETH | Complete | Solidity |
EOS | Complete | C++ |
Hyperledger Fabric | Complete | Go |
Hyperledger Sawtooth | Complete | Python |
R3 Corda | Complete | Kolin/Java |
Applications of Smart Contracts#
Smart contracts reduce the cost of contract signing, execution, and supervision. Therefore, they have obvious economic value for many low-value transaction-related contracts. Smart contract technology also brings some opportunities. For example, the influence of public supervision can be mixed with legal and technical codes, rather than relying solely on legal rules. In essence, technical codes can be used to ensure compliance with legal rules, thereby reducing compliance costs. This can be seen as an application case of technology to enhance supervision (RegTech), as mentioned in a FinTech report by the UK Government Technology Office.
In the field of blockchain, smart contracts are used to encapsulate various types of script codes in the blockchain system. These script codes specify how transactions in the contract are executed and the specific content of the transactions. Smart contracts make blockchain a programmable currency, which is more flexible and efficient than traditional currency transactions. Usually, the execution time and triggering rules of the contract can be set in the contract. Smart contracts are the functions that blockchain systems such as ETH are committed to achieving.
The construction and execution of smart contracts based on blockchain usually involve the following three steps.
- Contract generation: Design script codes to implement the content of the contract according to the needs of the contract participants.
- Contract storage: The script code that implements the contract needs to be stored in the blocks of the blockchain.
- Contract execution: The script code of the contract can be automatically executed without human intervention or operation. The smart contract layer is responsible for implementing, compiling, and deploying the business logic of the blockchain system, completing the condition triggering and automatic execution of established rules, and minimizing human intervention.
Risks of Smart Contract Applications#
Smart contracts mostly operate on digital assets, and their characteristics, such as being difficult to modify after being recorded on the chain and strong triggering conditions, determine that the use of smart contracts has both high value and high risk. Avoiding risks and realizing value is the difficulty of the current widespread application of smart contracts. The application of smart contracts is still in its early stages, which is the "disaster area" of blockchain security. From the security incidents caused by smart contract vulnerabilities in history, there are many security vulnerabilities in contract writing, which pose great challenges to its security.
Currently, there are several approaches to improving the security of smart contracts.
- Formal verification: Ensure that the logic expressed by the contract code conforms to the intention through rigorous mathematical proofs. This method is logically rigorous but difficult and generally requires third-party professional organizations to conduct audits.
- Encryption of smart contracts: Smart contracts cannot be read in plaintext by third parties, reducing the risk of smart contracts being attacked due to logical security vulnerabilities. This method has low cost but cannot be used for open-source applications.
- Strictly specify the syntax format of the contract language: Summarize excellent patterns of smart contracts and develop standard smart contract templates to standardize the writing of smart contracts, which can improve the quality and security of smart contracts.