Current location - Trademark Inquiry Complete Network - Futures platform - Smart contracts demystified: Can they avoid a Russian default and a “nickel short squeeze”?
Smart contracts demystified: Can they avoid a Russian default and a “nickel short squeeze”?

· Anchor of "Blooming Arts and Sciences" ·

Xiao Xiaopao: Author of "The First Knowledge of Sheep", a practitioner in the financial industry and a serial entrepreneur The author is the host of the podcast "Wall Breaking Forum" and the manager of the public account "Xiao Xiaopao".

Wang Wei: A master of mathematics and computer science, with expertise in technology and finance. A few years ago, he “all-in” the blockchain field and became one of the well-known opinion leaders in the blockchain industry.

The four words "smart contract" seem to be a "meme": this is a term that is often heard in the financial technology industry and even in all industries related to technology and digitalization. concept - a meme that "sounds awesome but I don't know what it is" or "I don't know where the awesomeness lies". Anyway, these four words represent "technological progress", and they are all "intelligent". Isn't it awesome?

But what exactly is it? What can be done? What can't be done? There is an urgent need for smart contract experts to demystify it in a language that novices and liberal arts students can understand.

Just recently, several interesting things have happened in the real-world financial market: the default of Russian bonds and the "nickel short squeeze incident" in the metal market - so let's just make a case Analysis, let’s take a look at whether smart contracts can solve these real-world headaches.

· Outline of this issue ·

1. 365-degree panoramic “disenchantment” smart contract: Where is the “intelligence” in it? Is it a piece of code? A contract? Or a robot?

2. Can it only solve problems in the virtual world, or can it also be used in the real world?

3. Russian bond default: If smart contracts were used, would the results be different?

4. Will it be different if sovereign debt is placed on smart contracts? Can smart contracts solve the "credit" problem?

5. Nickel short squeeze incident and LME "hard fork": If the LME uses smart contracts to automatically execute, will the results be different?

6. What is the difference between a "hard fork" on the blockchain and a "hard fork" (cancellation of transactions) in the real world?

7. Can the “voting” + “cooling-off period” setting avoid the “tyranny of the majority”?

· Transcript ·

Xiaopao 02:48

The four words "smart contract" seem to have become a "meme" . It is a concept that will be heard in the financial technology industry, and even in the wider industry related to technology and digitalization - anyway, these four words represent technological progress and intelligence.

But it is still a concept of "it sounds powerful, but I don't know what it is", or "I don't know what is so powerful". Most people, including me, know little about it. So today, I asked Teacher Wang Wei to "disenchant" smart contracts for everyone in a language that novices and liberal arts students can understand.

In addition, several very interesting things happened in the real-world financial market recently - including the Russian bond default and the nickel short squeeze. Let’s use these two things as a case study today to see whether smart contracts can solve these real-world headaches.

Let me first ask Teacher Wang Wei to explain to you: What is the "intelligence" of smart contracts?

Wang Wei 04:26

Smart contracts are now the most important core in the blockchain, DeFi, and future web3 fields. When Bitcoin came out, everyone said that blockchain is a "distributed ledger"; since the birth of Ethereum, everyone has slowly seen that smart contracts are playing an increasingly important role and importance in web3.0 and even the metaverse field. high.

Let me start with a little story that happened around me. I have a junior sister who is a professor in the computer department of a university. She asked a question last year: I can understand blockchain, but there is one question that I don’t understand – where is the “intelligence” of smart contracts?

The reason why she asked this is that she must have understood "smart contract" as "smart code". Because she is engaged in technology, she must compare it with other codes, and by default, a "smart contract" should be more "smart" than other codes, so that it deserves to be called a "smart contract".

My answer is: Don't compare it to computer code, but compare it to a "contract" in the real world - it is a smart "contract", not smart "code" "It's easy to understand. Comparing it to code is a bit insulting to the word "smart". But compared with contracts signed in daily economic activities, the logic is more appropriate.

How smart is it compared to a contract?

Our daily contracts have several characteristics: first, there are two or more parties signing it; second, it has the terms of the contract, and under what circumstances it will be performed under what conditions and what will be done; third, there is a contract The subject matter is paid with one hand and delivered with the other. The contract stipulates what goods or services will be provided and how much will be paid. Fourthly, the contract probably also has a number and a mark to record which contract it is and the year, month and day it was signed. , who signed it with whom, etc.; Fifth, there must be a management method, and multiple parties who sign the contract must each hold a copy to prevent one party from changing the terms. These five characteristics basically represent the most basic conditions for daily execution of contracts.

From this perspective, smart contracts are easy to understand.

For example, Ethereum's smart contract: First, its code and stored data are actually equivalent to what conditions the contract terms meet and how they are automatically executed - everyone may be aware of this feature of smart contracts. Second, it can also enable the matter of "each signing party to hold a copy" to be realized on the chain. When both signing parties have access to the blockchain, they can actually see a copy of the contract, but the copy cannot be mastered by themselves. Or tampered with, but stored on the chain.

This is very interesting: Satoshi Nakamoto invented the blockchain to prevent "double spending" of pure digital assets such as Bitcoin. As a result, in the era of smart contracts, Ethereum suddenly gave it The magical ability to “help contract owners store countless copies and ensure they are not tampered with.” Blockchain is a global distributed storage that allows any number of people in the world to jointly sign and execute a contract without the risk of being tampered with - something that cannot be done in the traditional field. arrive. Due to technical limitations, you cannot have any number of people sign a contract at the same time.

Third, each piece of code in a smart contract has a corresponding "address", which is the entry point for executing this code. This entry can be understood as the contract number and unique identification.

Fourth, the smart contract itself can also own "other properties". Our daily contract is just a piece of paper, an accessory, and the property is still under the control of the person - even if the contract stipulates the delivery of nickel, how can the paper control the movement of nickel? The smart contract itself can control property. The contract must have a "subject matter", including "money" and "goods". This subject matter can be controlled by the smart contract, which is equivalent to being "owned" by it. In this case, so-called "automatic execution" is guaranteed, which has full execution rights over the assets.

Trot 11:30

It is equivalent to judicial and law enforcement combined into one.

Wang Wei 11:33

Yes. So there are signatories, there are countless reliable backups, there are automatic execution capabilities, there are addresses and entrances that can be found, and there is control over the subject matter of the contract - from this perspective, it is indeed "smarter" than ordinary contracts. many.

Xiaopao 12:04

In fact, I particularly understand the thoughts of Teacher Wang and his sisters. After all, they are all science students, so everyone may naturally understand it from the perspective of code. But as an ordinary person with a non-technical background, I don’t have this barrier to understanding.

When seeing the words "smart contract", people with no coding background will naturally first imagine it as a contract, a "smart contract" that does not require anyone to execute it. In the real world, for example, I signed a contract with my boss, but if he doesn’t pay me my salary into my account every month, there’s nothing I can do about it.

In addition, smart contracts are built on the blockchain, which means that I don’t need to know the person signing the contract with me. We have never done any business before and have not established any trust relationship, but we can actually sign it - because the blockchain guarantees "one copy per person" and cannot be changed. This is a bit like the SWIFT we discussed - it combines "information" and "account" into one; and smart contracts combine the "content" and "execution" of the contract into one. Once established, execution I don’t have to worry too much, the smart contract will automatically pay me my salary, and I don’t have to trust my boss anymore.

However, if you think about it carefully, it seems a bit unclear. If its execution is automatic, what should you do if something goes wrong? When we enter into a traditional contract, there may be situations where the terms are modified during the subsequent development process, or special circumstances arise that prevent the contract from being executed in accordance with the terms at the time of conclusion - if something goes wrong, will the smart contract still be executed regardless of it?

If this is the case, when everyone is "signing" a smart contract, they may have to think again the moment they press the start button - as long as they press it, there will be no room for modification later, right?

Wang Wei 15:00

Let’s talk about the first question first: The greatest value of smart contracts is that people in the world who don’t know each other or have no collaborative relationship can immediately Signing and executing this contract and obtaining the results - this is in line with the characteristics of the blockchain.

When we introduced the blockchain very early on, we would emphasize one of its features - it allows people around the world who have no previous collaborative relationships to start transfer transactions. The purpose of preventing "double spending" invented by Satoshi Nakamoto is to realize - although we don't know each other, but I transfer money to you, you know that the transfer must be real and there will be no problems. Smart contracts inherit this feature, and the contract will not be executed just because we don’t know each other or because you cheated.

But if this is the case, the signed contract will definitely be enforceable, which means that it will definitely not change. Then how dare I sign casually?

This point should be viewed from a technical perspective - smart contracts can be "changed". From a technical perspective, "change" is not much different from the upgrade of a software system.

If you must change a certain clause, it is equivalent to invalidating the original contract and signing a new contract. The same is true for smart contracts, which is equivalent to upgrading the code. It is now version 1.0. In two days, I will come to version 1.1 and replace it with version 1.0 - we will implement version 1.1 from now on - this is no problem. But the question comes again, who has the right to do this? If both parties to the contract have the right to change the contract, it will make no sense and will not be realized at all.

Smart contracts are actually equivalent to being in a "market". The contract is created by a third party, and then everyone is divided into Party A, Party B and Party C to sign and execute the contract.

The reason why I dare to sign is because as Party A, I believe that Party B, Party C and Party D cannot change this contract and must implement it. The third party is the contract publisher and creator, and it has the right to upgrade the contract code. Such a mechanism is a bit like setting up a "shopping mall" where buyers and sellers sign contracts and make transactions in the mall, but the rules of the mall cannot be changed - only the builder of the mall has the right to change it. This is also a necessity.

Are there any problems associated with this necessity?

Definitely. For example, a third party is in danger of "stealing by mistake". If he finds that changing the contract is beneficial to him, he can also tamper with the contract, causing losses to the signer. Even if he is not motivated by personal gain, but wants to improve the execution efficiency of the contract or improve the terms, does everyone agree?

An example we often give: a "lending" smart contract can stipulate an interest rate algorithm, such as an annualized rate of 5%; if it is adjusted to an annualized rate of 30% - on the surface, the interest rate is the mutual agreement between the borrower and the borrower. The cost of payment is not directly related to the interests of the party making the rules; but you cannot change the rules casually just because you are a neutral party. Therefore, you need to give both buyers and sellers a "buffer period" or "cooling off period", or a kind of The voting mechanism allows participants to make unanimous decisions. If accepted and passed by vote, the rules can be modified.

If the participants do not accept it and you still want to change it, then you give me a cooling-off period and I will leave. So in the end, the entire logic is still complete, and a third-party restriction mechanism still needs to be introduced. I think this is very similar to some rules of the existing financial market.

Trot 20:42

This is why expert interpretation is needed. If you only read these four words, you will think that it is a cold and automatically executed code; but in fact there is a series of rules behind it, and most of these rules can be mapped to the real world. For example, the example just now is very much like an "arbitration mechanism."

In this case, let’s find a few cases in the real world and analyze the head-scratching situations that went wrong in the real world. Will the results be different if we put them on smart contracts?

I found two: one was a Russian default and the other was a nickel short squeeze.

Let’s start with Russia. Russia is actually a country that often defaults on its sovereign debt. The number of defaults on its sovereign debt is very frequent: in 1918 the Tsarist Imperial Bond defaulted, in 1998 the Russian Brady Bond almost defaulted, and the recent Russia-Ukraine war has brought it into another dangerous period of default. .

On March 16th, Russia had to pay more than 100 million US dollars in interest on two US dollar bonds. A week before the interest payment, everyone began to worry, because Russia and Ukraine had started fighting, and whether it still had the ability. Pay? If payment is made in what currency? In rubles? It had depreciated by 20% at that time.

As a result, there was no default and the crisis was temporarily resolved. The Russian Ministry of Finance paid it back on March 18. Although it was one day late, it was still within the 30-day grace period. But the matter is not over yet. There is still more than 2 billion US dollars in principal repayment in April. So until now, whether a default will occur is still a huge question mark.

Usually a country is unwilling to default on its sovereign debt. The main reason is that if you default, the market will punish you in some way, such as losing your credit and being demoted as a junk bond by the rating agency, causing investors to be in trouble for a long time. If you are unwilling to touch it for a long time, it will be difficult for you to find money in the market.

But there are too many possibilities for a country to default.

A large number of sovereign bonds were issued in the last century to finance wars. Once a war breaks out, there will definitely be a default - because the money will be used to fight the war. This is the situation in Russia now, and it is even more difficult - whether it is passive sanctions or active sanctions, investors are obviously no longer willing to touch it. Russia is basically isolated from the world, and it cannot lose more credit, because it has almost no credit; its foreign exchange reserves have been frozen. Even if you want to pay them back, where can you find U.S. dollars and hard currency?

So in this context, what does the word "breach" mean?

In the real world, as a government creditor, it is actually very difficult for you to freeze or force the sale of a country's assets. This is a game of confidence and patience. If you have the ability to harass the government of this country for a long enough period of time and pursue it year after year, just like Paul Singer simply wanted to collect debts. The Argentinian ship was hijacked. Russia, a fighting nation, is different. Historical experience shows that the Russians are capable enough to defeat even the most determined creditors and block all debt collection efforts with a mentality of being a dead pig and not afraid of boiling water.

There is another very interesting point this time: there is a clause in this sovereign debt called "pari passu" - the principle of "equal treatment". This is an ancient clause that has been used in debt contracts more than a century ago. It requires the debtor to treat all creditors equally and not favor one over the other. As long as it has reached an agreement with any one of the creditors, it must also give all other creditors the same repayment treatment.

Since Paul Singer used this clause to successfully collect debts from the Argentine government, most countries have deleted this clause when issuing sovereign debt - to prevent these "nail-biters" from using this clause again when collecting debts. terms.

But Russia’s debt was not deleted—either the fighting nation was too arrogant and felt that they would never be prosecuted; or they simply forgot. Despite this, the word "future repayment" in the clause magically disappeared - it was intentional, maybe a clerical error, anyway, the result became: the principle of "equal treatment" will be followed when issuing, and all creditors will be the same, but it does not mean that The "future" is still the same.

This example tells us that the bond market is a "copy & paste" transaction completely dominated by "sample documents". Few people will actually read hundreds of pages of terms - but the devil also Right here, there is too much room for artificial "adjustment" and "default".

If bonds were issued on smart contracts, would this situation not occur?

Wang Wei 28:09

This case is particularly interesting. I was a little worried at first, because blockchain and smart contracts are actually the most unsuitable for solving the problem of debt. But after listening to many details about Russia’s debt, there are easy solutions.

First of all, "debt" is a typical "credit" process. In essence, I divide finance into two parts: "credit process" and "calculation process". Blockchain, smart contracts, DeFi, etc. actually solve the "computational process" part, and "debt" is a typical "credit process".

In fact, the matter of "bond default" is the least suitable to be solved by smart contracts. In other words, technologies such as smart contracts and blockchain are the most powerless against "bond default" - because default is a process of credit loss. Even if smart contracts are used to write debt contracts, the process of repaying the debt involves the debtor. You Assets need to be put into the smart contract before they can be executed; if they are not put in, they cannot be executed.

This brings us back to the most critical point: the prerequisite for smart contracts to guarantee automatic execution is that the contract itself has "control" over the subject matter. But if the principal and even the interest that I have to repay in the future must be placed in a smart contract and controlled by it, then why should I "borrow" money now? You have to put some interest in it.

In the DeFi field, we have also seen many projects and entrepreneurs trying to use smart contracts to solve a debt market problem or create credit products. In fact, there is no problem, because there can also be a set of other guarantee mechanisms behind smart contracts, such as voting, etc.; it is still possible to eventually transform the "credit" part into other guarantee mechanisms.

The "execution part" of credit cannot be transformed into a code-level guarantee mechanism, but this does not mean that smart contracts cannot improve the debt market.

In the case of Russia's debt, it removed the word "future" from the "equal treatment" clause. This is its right and has no way to control it; the people who bought the debt were not careful and did not notice the change. Bought - this can actually be improved at the smart contract level.

First of all, smart contracts are written as code rules, and naturally have "equal treatment" clauses, because the code can be executed by everyone. As long as there is an address and the code is solidified in it, anyone in the world can execute it, so by default it will "treat everyone equally". If you don't want to "treat everyone equally", you will have to do a lot of tricks.

Regarding "The bond market is a copy & paste market based on templates" - it reminds me that many "micro-innovations" in the field of DeFi smart contracts in the past few years have also combined certain Copy the entire code of the smart contract, and then change two or three words.

But you will find that in this case, smart contracts are valuable. Why?

Because smart contracts are precise codes. An audit agency can easily find changes. The difference in a few lines of code means that the difference in the results can be accurately deduced and judged. In the traditional market, because natural language is imprecise, even if we let lawyers try it, we don't know whether there are other meanings behind the changes in these sentences? Or lead to any unintended consequences.

The audit agency of smart contracts is a very important party in the entire ecosystem. These institutions are often experts in smart contract development or white hat hackers. Their role is much like a law firm in the real world, responsible for reviewing contracts and contract code.

So to summarize: smart contracts cannot solve all the problems of debt, but it still plays a great role in the execution of debt and the analysis of terms.

Xiaomao 35:47

So now I think it may be unrealistic to put the Russian case, or even the entire sovereign debt, on smart contracts. Because the party that originally intended to "not implement" may not sign at all.

This leads to the second case: the nickel squeeze incident that caused a lot of fuss some time ago.

A brief review: On Women’s Day, the market staged a historic event. We witnessed an epic short squeeze in the LME (London Metal Exchange) market. Nickel prices experienced the most extreme price fluctuations in history. On March 7, they soared 76% to more than US$50,000 per ton; the next day they exceeded US$100,000 per ton.

This is an obvious short squeeze. The one who was forced into a position was Tsingshan, the world's largest nickel producer, who made a wrong bet before the Russia-Ukraine war. There are 150,000 tons of nickel short positions, 50,000 tons of which are OTC (over-the-counter) positions with JP Morgan; that is to say, at this moment, Tsingshan already owes JP about US$1 billion in margin.

Regarding OTC over-the-counter transactions, there is actually room for negotiation. If extreme circumstances occur, all parties will first negotiate a solution off-site. After this liquidation, Qingshan financially advanced a deposit to the exchange, otherwise there would be huge problems in liquidation. As a result of the negotiations, the short positions were retained at first, and then the LME "made history" by canceling the transaction and halting nickel trading until mid-March.

From that moment on, from the perspective of the global market, huge question marks appeared on the "credibility" and "neutrality" of the LME - the sudden suspension affected thousands of transactions, and other transactions in the market Participants suffered huge losses.

In this case, in what aspects might the smart contract have some effect?

Wang Wei 42:10

In fact, I mentioned it just now when I introduced smart contracts: We can indeed "intervene" in smart contracts, but it is not really 100% immutable.

From this perspective, this kind of intervention by the LME can also be regarded as a case of "intervention". But there are indeed some problems here: First, the "intervention" of smart contracts must be achieved by "authorized people" to upgrade the code; or by directly modifying the parameters in the smart contract. This is different from a centralized system that "rolls back" or "cancels" transactions.

The intervention of smart contracts, whether it is code upgrades or parameter adjustments, can only be "backward intervention", changing the rules of the future, and cannot go back to a certain stage in the past - the blockchain is This type of intervention is not supported.

Of course, this does not mean that "backward intervention" cannot occur at all. For example, everyone may have heard of the DAO attack on Ethereum, for which Ethereum underwent a "hard fork" - this is indeed a "rollback". This has happened in the history of Ethereum. once. But the result of this "rollback" was that two chains, ETC and ETH, were produced at the same time.

Therefore, under the "computational" system, even if you want to "rollback", it is not a 100% rollback, because someone can still choose to execute those contracts that have not been "rolled back" by you. .

But this cannot happen in the real world. Because it is impossible for people in another parallel world to choose to continue to trade the orders that were shorted. Since there is only one exchange, a rollback is a rollback, and there will be no hard fork into two exchanges.

The real world cannot bifurcate, it cannot bifurcate into two green mountains, two Russias, one ton of nickel becomes two tons - one ton in each of the two parallel worlds. This is determined by the physical world.

Therefore, the system of smart contracts and blockchain can only have the so-called "guaranteed execution" capability for "pure digital assets".

Can LME’s “stop trading” and “cancel transactions” situations be implemented in the field of smart contracts?

Objectively speaking, it can be done. Generally, there are two methods: The first is voting. It is equivalent to LME shareholders voting collectively, and the voting results determine whether the rollback is allowed. If the vote is not passed, no changes can be made. This is why the current encryption field will implement the "token economics" system, which is a set of models similar to equity. The voting results can be bound to smart contracts and automatically execute the results.

Second, what does voting mean? Voting in the digital world is a "rigid" result - it can be changed if 51% of people agree, but won't this lead to "tyranny of the majority"? 49% of people disagree, so we can only accept it? What if voting can’t solve the problem?

The answer is to set a "cooling off" or "transition period" - it can be a few days or a few hours. Even if the vote is passed, it can only be implemented after a cooling-off period. If you don’t want to play, just exit from the system during this time. There is no problem in changing the rules, but you have to give me the freedom to leave - this is the most basic freedom.

What LME does is a typical shortcoming of a "centralized" system - even if the rules need to be changed, can we first let everyone vote? People affected by the rules must at least be given a chance to speak. Second, even if the vote is passed, some time must be given before changes can be made.

If it is implemented using smart contracts and abides by the set of governance rules just now, its credibility will definitely be higher. So from this perspective, smart contracts will be of great use in maintaining a fair, efficient, and more trustworthy market rule.

Trot 50:51

Yes. Some mechanisms in the virtual world can also be used in the real world. But how enforceable are these rules for voting, cooling-off periods, etc.?

Such as the tyranny of the majority. If everyone suddenly realizes the possibility of "tyranny of the majority", for example, I hate the rich. Anyway, everyone is a leek in the market. We win with quantity, unite to vote, and transfer all the money in the big accounts to ours - —If it were to be carried out automatically based on the voting results, wouldn’t it be equivalent to “reasonable robbery”?

However, if a cooling-off period is set and the robbery is officially carried out after 15 days, the big players will definitely leave, and they cannot wait to be robbed. But the big players have already left, who will I rob in 15 days? Does the entire game have no meaning?

Wang Wei 52:17

This is a core concept of blockchain and cryptocurrency - that is, your behavior must be economically rational.

If Xiao San does this, it will harm others and not benefit himself. Not only did they not get any money, the only result was that the value and credibility of the platform were destroyed. In this case, you will find that Xiao San is not that stupid. They know that it is meaningless to vote for them.

This goes back to what Satoshi Nakamoto mentioned in the Bitcoin white paper. You can attack with 51% of the computing power and get all the Bitcoins in your own hands, but the Bitcoins will also return to zero. ——The cost of the machines you bought can’t be recovered, so what’s the benefit to you?

So in a sense, "economic model" is the core "meme" in the blockchain field. The rationality of the economic model we maintain makes attacks meaningless and unreasonable.

Xiaopao 54:11

I now feel that any rules and mechanisms, although they may seem like remedial measures, actually work best when something happens. Before.

Under the influence of the game, everyone's behavior will automatically find the most rational and "observe the rules to maximize value" result. In other words, good prior design will lead to a rational result.

Wang Wei 55:13

The core value of smart contracts and blockchain is actually "maintaining the validity of the rules." It is more suitable for the logic of platform economy or two-sided market. The creators of blockchain and smart contracts are the makers and maintainers of rules and are not necessarily participants themselves. The participants are people who do not know each other in the world, and they all participate in the game together.

If two people know each other, sign a contract, exchange the contract text, and subsequently have the intention to ensure execution - then in this scenario, smart contracts do not make much sense.

trot 56:55

Strongly agree. You may have various ways to pass and upgrade, but the entire game rules framework can be improved using smart contracts.

— End —

Podcast "The Blooming of Arts and Sciences"