What is a smart contract?

From Google's keyword search trend chart , we can see that smart contract development is receiving more and more attention, so we need a clearer definition. Currently, the excitement around smart contracts is accompanied by confusion over what the term means. Peter Todd – one of the developers of Bitcoin Core – summed up the current state of smart contracts very accurately:

Untitled 1

"The takeaway from the smart contract discussion: No one understands what a smart contract is, and if we're going to implement a smart contract, we should need oracles."

In this article, I try to further clarify the nature of smart contracts. My overarching goal is to clarify the assumptions behind smart contracts and clarify misconceptions about mysterious phenomena associated with the legal system. However, this is just my first attempt to find a way to systematize the idea of ​​smart contracts. I hope to get feedback from the community so that we can get a clearer understanding than we have now.

statement

Speaking of legal terminology, I should point out that although I am a lawyer, I am not familiar with legal terminology in the English-speaking world, nor with the Anglo-American common law system. I am a scholar of the German legal system. I have studied German law and worked in the legal field for nearly ten years. Although, with the help of my googling ability, I choose the best words I know, but imprecision is inevitable. If you are able, please point out my misuse of terminology. On a positive note, German's harshness of legalese may help here.

Also, I'm not a computer scientist, although I've been writing code for 12 years personally. If you find a bug in the computer field, please point it out. Thanks!

Traceability

The term "smart contract" dates back to at least 1995, coined by the prolific cross-disciplinary legal scholar Nick Szabo. He mentioned the idea of ​​smart contracts in several articles published on his website. His definition is as follows:

"A smart contract is a set of digitally defined promises, including agreements on which contract participants can execute those promises."

Let us explore in more detail what his definition means.

promise

A set of commitments refers to the (often mutual) rights and obligations agreed upon by the parties to a contract. These commitments define the nature and purpose of the contract. Take a sales contract as a typical example. The seller promises to send the goods, and the buyer promises to pay a reasonable payment.

digital form

The digital form means the contract has to be written in computer-readable code. This is necessary because as long as the parties reach an agreement, the rights and obligations established by the smart contract are executed by a computer or computer network.

To explain further:

(1) reach an agreement

When will the participants of the smart contract reach an agreement? The answer depends on the specific smart contract implementation. Generally speaking, a contract is discovered when a party commits to its execution by installing the contract on the contract hosting platform.

(2) Contract execution

What "execute" really means also depends on the implementation. Generally speaking, implementation means active implementation through technical means.

(3) Computer readable code

In addition, the specific "digital form" required for a contract is very dependent on the protocol the parties agree to use.

protocol

Protocols are technical implementations on which contract promises are fulfilled, or contract promise fulfillments are recorded. The choice of which protocol to use depends on many factors, the most important being the nature of the asset being traded during the execution of the contract.

Take the example of a sales contract again. Suppose, the parties agree to pay for the goods in Bitcoin. The chosen protocol will obviously be the Bitcoin protocol, on which smart contracts are implemented. Therefore, the "digital form" that the contract must use is the Bitcoin scripting language. The Bitcoin Scripting Language is a non-Turing-complete, imperative, stack-based programming language similar to Forth.

From theory to practice

Spoiler: If you understand the concept of Bitcoin protocol, Bitcoin currency and smart property, you can skip this chapter.

When Szabo came up with the theory of smart contracts in the web nearly two decades ago, practice had been lagging the theory badly. There has been no clear path on how to turn this idea into reality.

Now that technology has caught up with Saab's visionary minds, smart contracts are starting to become feasible. What has happened in these twenty years?

In short, the protocol Saab established in his smart contract definition, has been developed further. They have come in the form of Bitcoin protocols, or more generally, protocols that enable Nakamoto consensus.

While these protocols were being developed, we acquired another required building block: the first true, native digital asset, Bitcoin as money. Without this asset, smart contracts would not be viable either, as the financial sector has been extremely hostile to any innovation over the past few decades.

Finally, another concept that has yet to bear fruit is smart property. We are entering an era of ubiquitous computing and connectivity, colloquially known as the Internet of Things. Physical entities can retrieve information from and send information to the Internet, and they can also control their own use through software (think digital rights management), which allows us to create what Szabo refers to as embedded contracts .

"The basic idea of ​​smart contracts is that many contract terms can be embedded in hardware and software."

Saab believes that the initial application examples of embedded contracts are vending machines, point-of-sale terminals, electronic data interchange between large companies, and payment networks SWIFT, ACH, and FedWire for transfers and clearing between banks. Another example of an embedded contract is a digital rights management mechanism in the area of ​​digital content consumption – such as music, movies, and e-books.

In this sense, a smart contract is a bridge between cyberspace (virtual space) and physical space (physical space).

Smart vs Legal

The most confusion about the concept of a smart contract stems from its name and the language used to describe it. People seem to deduce from the term "contract" that a smart contract must be somehow related to a contract in the legal concept. Then, according to this logic, a smart contract is a legally binding agreement plus other factors (X) that make the agreement "smart".

From a legal point of view, this conjecture is wrong. Depending on the smart contract implementation chosen by the participants, it is entirely possible for two or more parties to enter a "smart contract" that does not meet the necessary conditions for a legal contract.

However, it is undeniable that smart contracts must be classified as legally relevant actions. We live in a world governed and controlled by law, and all possible economic transactions are governed and controlled by law. Contract law is only one possible tool for organizing economic transactions. The schematic diagram is as follows:

 1-WWtCLYSV4T5ml_L-gn-aIA

Legally relevant behaviour: behavior related to law; contract law: contract law; smart contracts: smart contract

 

Let's look at the intersection of contract law and smart contracts. Can we discover a generalization that describes the contractual behavior of these two systems? To quote Szabo's paper:

“Contracts – a set of agreements to agree on – are the traditional way of forming relationships.”

What Szabo is telling us is that the abstract notion of a "contract" is a recognized tool for forming relationships between individuals, institutions, and what they own (property). However, the above quotation is not clear, how the parties reached an agreement, how to form an agreement, did not mention.

I suggest the following general contract model:

1-wdlFcTIAuYElZkRGupEb0g 

Agreement: Agreement; Formalization: Formalization; Execution/Enforcement: Execution

If this model is applied to smart contracts and contracts in the legal sense, let's see how it works.

agreement

A contract is a complete ideal, abstracted from its implementation in a formal system. Of course, in fact this is a fragile abstraction. In the legal system, in many cases, it is legally binding and does not require the formation of an agreement. In contrast, for smart contracts, in many cases, there is no prior agreement before formalization.

formalize

Formal here means the behavior of implementing the desired contract in a formal system. There are two related formal systems. One is contract law and the other is the smart contract system of your choice. Both systems serve the same purpose: to enable agreements to be enforced when a breach occurs.

From a general point of view, the question of how the contract is formalized is seen as an implementation detail. However, it turns out that the implementation of the contract does matter a lot.

There are now two fundamentally different ways of forming a contractual relationship. The two approaches are distinct because they require different implementations.

 

implement

Since a picture is worth a thousand words, here’s an infographic I “plagiarized” from Lawrence Lessig, slightly modified for the purposes of this article.

1-Qr6DFyNGAH0Cf3t-1PC8lg

Market: market; contract: contract; Norms: convention, routine; Architecture: structure; law: law; ex ante: before the event; ex post: after the event

In the original version of Lessig, it was a person in the middle of the infographic, not a contract. With his infographic, this amazing thinker strives to teach us mortals that there are four fundamental constraints that affect a person's life. These four constraints are distinct in nature, but intertwined in complex ways.

I modified the original infographic to replace people with contracts, which are agreements between two or more parties. Interestingly, after making changes, this infographic still works. These four constraints govern contractual relationships just as they govern people.

Also, I highlight two of the four constraints, architecture and law. These two constraints are the two most basic motivations for contracts to be executed. Contracts will be enforced through the legal system, or through the architecture, depending on the agreed-upon system chosen by the parties. The two contract execution modes are significantly different.

Lessig recognizes two characteristics of contract execution that can help us talk about the difference between the two contract execution modes. One is agency and the other is temporality. In the legal sense, the execution of the contract will only happen if some people choose to do so. Furthermore, enforcement occurs only after the breach, eg ex post.

The execution of smart contracts is fundamentally different from traditional contracts in these two aspects. To understand how that is different, we need to first understand what Lessig means by architecture.

In his book Code: The Law of Cyberspace, Lessig introduces the concept of architecture in order to explain the role of code in cyberspace. The shape of a physical space, the space your body travels through, is determined by its architecture, such as the built environment (buildings, streets, etc.). Similarly, the shape of the cyberspace is determined by the code on which the applications and protocols people use are built. So code is the architecture of cyberspace.

Both the law and the architecture have ways to govern the behavior of the parties involved. The law relies on individuals to internalize rules, individuals adjust their behavior accordingly, or the system allows legal recourse (such as a court of law). Architecture, however, manages behavior by shaping the space itself. Architecture is not about what is allowed, but what is possible. The architecture relies neither on individuals to internalize the rules nor on the prosecution system.

Based on the criteria we measure the quality of contract execution, such as agency and timeliness, the architecture is distinctly different from the law. Architecture enforces contracts without any individual or organization (agent, agency) deciding how to enforce contracts. You can call architecture enforcement self-enforcing, although I don't like it. In addition, the structure is executed in advance, and default is not even possible.

future outlook

One thing is for sure: smart contracts have taken root. They are the building blocks of a truly global economy that anyone can access without prior vetting and high up-front costs. They remove the need for trust in third parties from many economic transactions, and in other cases transfer trust to people and institutions that can be trusted.

The idea I have tried to illustrate in this blog is how smart contracts can coexist with contract law. Essentially, they are two different ways of solving the same problem - forming a relationship in a way that makes promises enforceable. In this regard, smart contracts seem to be the better solution: smart contracts are executed ex-ante, unlike legal systems, which are executed ex-post. However, this is a fallacy. One final quote from the almighty Saab:

“The success of contract law and the high cost of replacing it makes preserving and leveraging appropriate principles still valuable. However, the digital revolution is dramatically changing the kinds of relationships we can have. In this age of cyberspace , which part of our hard-earned legal tradition will still have value? What is the best way to apply these legal principles to our online relationship design?”

In contract law, there are many established principles that are still worth preserving. These include the legal default rule, which I will write about in another blog post.

Therefore, in order to achieve optimal results, it seems advantageous to utilize both contract law and smart contracts. I'll show you how to do this in another blog post.

If you think this article has inspired you, welcome to the author ( 1HT7q3HtDYLSeMTkMcsjsRcExBAjsnKHws  ) and translator ( 1JtgQcqAoU65VY2NZy25FT9dAcuXrUKhfG ).

----

----

If you want to learn Ethereum DApp development efficiently , you can visit the most popular online interactive tutorials provided by Huizhi.com:

1.  An introductory tutorial for Ethereum DApps for blockchain newbies
2.  Blockchain +IPFS+Node.js+ MongoDB+Express decentralized Ethereum e-commerce application development practice

3. Other more content can also visit this Ethereum blog .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326035887&siteId=291194637