Eight questions you must know about smart contracts
Like blockchain and Bitcoin, “Smart Contract” is one of the hottest topics today. If Bitcoin is regarded as the beginning of the blockchain 1.0 era, smart contracts are the representative product of blockchain 2.0. So what exactly is a smart contract, how does it work, and what are the risks of smart contracts? On the basis of preliminary research, the Zhide blockchain team briefly analyzes and summarizes many issues about smart contracts that are generally concerned in employment.
1 What does a smart contract look like?
Unlike normal contracts, smart contracts consist of computer code.
2 The origin of smart contracts?
The term “smart contract” was first coined by cross-disciplinary legal scholar Nick Szabo. It is worth noting that Szabo is considered to be very likely to be Satoshi Nakamoto himself.
Szabo believes that Bridge Smart Contract Development Services can not only meet the general terms of the contract, but also aim to minimize malicious and accidental anomalies and reduce the reliance on trusted intermediaries. In fact, at its root, the concept of smart contracts was not born out of nowhere. The method of “automatic execution according to instructions” was already reflected in vending machines. In the era of blockchain technology, this concept has finally developed into an on-chain concept. smart contracts. Based on research on Szabo’s articles and various speeches, we understand that Szabo expects that smart contracts will eventually transform from traditional vending machines to global financial machines, providing financial smart contracts to everyone.
3 What is the relationship between smart contracts and Ethereum?
Ethereum was the first blockchain project to implement smart contract functionality, but Ethereum is not the only platform for blockchains. Ethereum is a distributed computing platform that generates a cryptocurrency called Ether. Programmers can write “smart contracts” on the Ethereum blockchain, and these Ethereum smart contracts execute automatically based on the code.
As the Ethereum website says, Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference. A contract refers to an application that runs exactly as designed without any possibility of downtime, auditing, fraud, or third-party interference. Ethereum has its own programming language, Solidity, dedicated to encoding logic into smart contracts. Both Ethereum and Solidity are designed to be “Turing-complete,” which means they can encode any imaginable computation, and users can create as complex operations as they want. This capability is even more important as smart contracts continue to grow in complexity, especially
when one smart contract uses another smart contract as an independent source of data or verification of real-world events. For example, we can imagine that future investment transactions may also be carried out in the form of smart contracts on the blockchain, and complex mechanisms such as delivery prerequisites and post-delivery obligations may be reflected in the evolved smart contracts.
4 Features of Smart Contracts
4.1 Three Features
1) Smart contracts are automatically executed, making it difficult to cheat;
2) The result of the transaction will be all-or-nothing. Of course, with the evolution of smart contracts, when more intelligent and complex contracts appear, the result of all-or-nothing may be changed;
3) Contracts have auditable history — all data is stored in blocks (shared distributed ledger) and cannot be lost.
4.2 Comparison between smart contracts and traditional contracts
5 The operation of smart contracts
From a contract perspective, smart contracts can be thought of as “autonomous agents” designed to execute agreements by responding to specific messages or transaction codes. From a computational perspective, a “smart contract” is a program that can execute an arbitrary or open-ended user-specified array of state transition functions, including execution information and storage information. We might as well imagine the procedural mechanism of a smart contract as an encrypted box containing value or information that can only be unlocked in response to certain preset conditions.
Essentially, a smart contract works like an “if-then” statement of a computer program. The execution of smart contracts can be roughly divided into the following links:
First, the contract is compiled into the blockchain in the form of code, the identity of the signatory is anonymous, and the contract is displayed in the public ledger;
Secondly, the whole network verification node will receive the relevant contract code, Cross chain bridge development which is similar to the signature link of traditional contracts;
Finally, the trigger event (deadline, price, or specific event) is triggered, and the contract is automatically executed according to the code.
6 Questions about smart contracts
bAlthough it is called a smart contract (Smart Contract), in terms of the operation of a smart contract, it should be regarded as “deterministic” rather than “smart”, that is, after the trigger condition is reached, the contract will be automatically executed that cannot be tampered with. content.
However, in real life, various reasons such as contract revocation and invalidation may occur. In this case, the smart contract itself may not be able to deal with it, because it only runs strictly according to the programmed code.
6.2 Are smart contracts safe?
News or events such as “smart contracts have security flaws and attackers steal digital assets” have been all the time. The emergence of events such as The DAO of Ethereum and the security breaches of smart contracts in other projects has gradually raised questions about the security of smart contracts by ordinary users and investors.
Ethereum uses Turing’s complete solidity language, which can write more types and complex contracts than Bitcoin’s Script in 2009. But the high complexity also makes the complex contract itself more difficult to analyze and relatively less secure. In other words, the more complex the contract, the more vulnerabilities there will be. After The DAO incident, the use of “Turing-complete” smart contracts decreased. At present, the ERC20 and ERC721 standards that are widely used in the Ethereum ERC (“Ethereum Request for Comment”) series are “non-Turing complete”.
6.3 Are smart contracts fully disintermediated?
At this stage, the jury is still out on whether smart contracts can be fully disintermediated. In fact, at present, smart contracts can be divided into two types, one is a deterministic smart contract, and the other is a non-deterministic smart contract. Among them, deterministic smart contracts do not rely on external intermediaries, but only rely on information on the blockchain to be triggered and effectively executed, such as peer-to-peer lottery — funds are held by the blockchain, and random numbers are passed through smart The contract code is generated, and the final funds are transferred to the winning party’s account address through the blockchain; non-deterministic smart contracts refer to contracts that cannot make decisions based on the information on the blockchain alone, and need to use the oracle mechanism to connect the real world and the block The chain system requires reliable off-chain data to ensure the smooth execution of contracts, which is also known as the “Oracle problem”. For example, when A transfers the ownership of real assets to B, the contract needs to judge whether both parties of AB have really completed the transfer of assets and performed relevant procedures. This judgment seems to require the assistance or confirmation of a third party. So can smart contracts really achieve complete disintermediation?
7 Legal Issues with Smart Contracts
7.1 Legal application of smart contracts
In a sense, smart contracts are value transfer tools on a global scale. Therefore, the legal application of smart contracts deserves the attention of all parties to the contract. When developing smart contracts, care should be taken to embed applicable regulations and dispute resolution methods in advance, so that disputes can be resolved smoothly in the future.
The global nature of the blockchain determines that smart contracts will be closely related to foreign-related contracts to a large extent. When the smart contract is a foreign-related contract, it is necessary to pay attention to the different requirements for the application of different types of foreign-related contract laws, including whether the judicial region recognizes the form of smart contracts, whether the applicable law can be autonomously selected according to the will of the parties, the order of law application, restrictions Wait.
We have noticed that in the community autonomy of some token issuers, they have gradually explored the form of “blockchain arbitration”, such as EOS’s arbitration forum and arbitration group, but the validity of the ruling results of such institutions remains to be explored and acknowledge.
7.2 The relationship between smart contracts and traditional contracts
The early smart contracts were more of a format contract, but with the development of blockchain technology, smart contracts will serve as the intelligence of various types of traditional contracts, placing complex and individual traditional contracts that bear the needs of all parties involved in the contract. In the blockchain, Build a cross chain bridge different types of smart contracts are formed.
At present, the payment consideration for smart contracts is only tokens, but in the future, it is likely to develop into tokenized securities, real estate rights, etc., that is, security tokens. For example, an investor obtains the company’s security token through investment, that is, the investor uses the company’s security token to hold a corresponding proportion of the company’s equity. This involves the relationship between smart contracts and necessary written documents (such as equity transfer agreements) under certain jurisdictions, including how to accurately and properly translate or convert the written language of traditional contracts into the code language of smart contracts; When there is a conflict between traditional contracts, how to interpret the priority effect of the two? In view of the fact that traditional contracts on a global scale cannot be completely replaced for a long time in the future, how to handle the relationship between smart contracts and traditional contracts will be a matter of concern for contract parties.
7.3 Development Risks of Smart Contracts
As a global value transfer tool, smart contracts, such as fundraising, securities, gambling and other related content, will inevitably lead to judicial supervision in the regions involved around the world. As the developer of smart contracts, that is, the initiator of cross-border value transfer, it is undoubtedly necessary to assume more compliance responsibilities.
8 Applications of Smart Contracts
Despite the risks, the application scenarios of smart contracts are still being implemented, including but not limited to sharing economy, digital identity, auction, real estate, healthcare, supply chain, etc.
At present, many companies are investing in smart contract pilots to realize the digitization of the real economy by participating in the development of smart contract technology. For example, in the insurance field, Fizzy, a flight delay insurance product that utilizes the Ethereum blockchain smart contract, the smart contract is linked to the global air traffic database, and the smart contract will automatically notify the insured traveler once the flight is delayed for more than two hours. Initiate compensation.
We believe that with the continuous innovation and evolution of the blockchain industry, smart contracts will have greater potential in the digital economy with its unique advantages, but as John Wooden said, Failure to prepare is preparing to fail. In a When new business models are just emerging, it is particularly important to have a full understanding of these business models and a comprehensive risk assessment. As one of the core technological achievements in the blockchain field, we will also continue to pay attention to the dynamics of smart contracts and share compliance analysis with various industry participants.
0