How is the Smart Contract Performed?

MAI Public Chain
MAI Public Chain
Published in
6 min readJan 25, 2019

In 1995, a person named Nick proposed the concept of a cybersecurity smart contract. Due to the poor network environment and the immature network conditions, the smart contract was not performed in the network at that time.

Hello, I am Lee. Today I am going to share you how is the smart contract performed.

Through Blockchain 2.0, the block network of Ethereum, we learn the term smart contract, which is not a new concept. In 1995, a person named Nick proposed the concept of a cybersecurity smart contract. Due to the poor network environment and the immature network conditions, the smart contract was not performed in the network at that time.

1. The Concept of Smart Contract

What is a smart contract? A smart contract is a computer protocol designed to disseminate verification and enforce contracts in an informational manner. The smart contract allows trusted transactions to be conducted without third parties, and these transactions are traceable and irreversible.

2. Trust Mechanism of the Smart Contract

The smart contract is more secure and much cheaper than traditional contract in securing contract transaction. The smart contract does not have to be attached to the blockchain, but the development of blockchains is well suited for it because of the decentralization, data intangible modification, traceability and anonymity of the blockchain.

In the blockchain industry, the enthusiasm for the smart contract is based on the blockchain 2.0 network represented by Ethereum. The following picture describes how the smart contract evolved during the history of the Bitcoin network to the Ethernet network.

On the left, in the Bitcoin network, we can see some interface calls or some executions are executed by scripts. On the right side of the Ethereum’s structural network architecture, we can see that the smart contract is set up under the App and DAPP, which means that DAPP can only call the data on the network through the smart contract.

I think smart contracts are code sets that can be performed in a blockchain environment. To perform a smart contract, you must first release one. After the smart contract is released, the DAPP will trigger it by the RPC interface, and then the smart contract will be performed.

3. Turing Complete

When it comes to Turing complete, I have to mention Allen Turing. He is a British mathematician who designed the Turing machine, which is the greatest contribution to mankind. The Turing machine is an abstract computer model, which is mainly used to replace the process of human paper and pen operation, that is, the logic operation of any calculation can be done by the Turing machine. Next, let’s take a picture to understand the Turing machine workflow.

In the figure, the square box represents the Turing machine. There is a long strip of paper under the Turing machine. Each grid on the tape has some input parameters. When the grid goes directly below the Turing machine, the input parameters will enter the Turing machine, and then the Turing machine will perform some logic operations and return the final result to the grid. When the output is complete, the tape goes forward one space. This is how the Turing machine works. Turing complete is a process that conforms to the logic of Turing machine operations and can be calculated using rules such as instructions and programming languages.

Now you may have a question. The script on the Bitcoin network in the above figure can also be performed. Why is it not Turing-complete?

The Bitcoin scripting language is not Turing-complete because it has no looping statements and complex conditional control statements. Because of this limitation of language, we can’t use it to write infinite loops or malicious code that can cause DOS attacks, thus avoiding the DOS attack on the Bitcoin network. Each full node verifies the transaction. A scripting language with this limitation makes it impossible to view this authentication mechanism as a flaw in attacking the bitcoin network. The smart contract used in the Ethereum network contains complex loop and conditional control statements, so it is smarter than scripts, but are more likely to have infinite loops or be attacked. So scripting languages and smart contracts have their pros and cons.

MAI public chain is taking into account the shortcomings of smart contracts, using artificial intelligence to filtering out every vulnerability of the smart contracts issued by developers to protect the security of the MAI public chain.

4. EVM

EVM is a contract virtual machine that exists in every mining node and is used to perform smart contracts. Once a smart contract is triggered, the smart contract virtual machine will perform the operations in the smart contract.

5. DAPP

Distributed Application, a blockchain new species.

Dapp is a distributed application. Many people think that Dapp is a smart contract. In fact, they are different. A smart contract is equivalent to the background of a server. It is a string of code that is used to implement functions. It is very inconvenient for users. If you want to interact with the user friendly, you need to make a front page and then connect it to the background through the IP interface. And an app and a web page can also use this front page.

A complete DAPP has at least three main parts. The first one is the web page you make must be deployed to the server. Second, you must have a complete smart contract. Third, the web page must interact perfectly with the smart contract.

Many users are not very clear about whether an application is a distributed application. Here I give you several criteria of DAPP.

1) DAPP must run on a distributed network.

2) The information of the application participants is stored securely and their privacy is well protected.

3) The application must be decentralized through the network nodes.

4) The application must be completely open source and autonomous, and no entity controls more than 51% of its tokens.

5) The application data must be encrypted and stored in a public blockchain.

6. MAI Filters Smart Contracts with Limitations by AI

But now smart contracts still have some limitations. The writing of smart contracts is particularly demanding for developers. They must be rigorous when develop the smart contract, or once a smart contract is flawed, it will cause a lot of damage. For example, previously, the Ethereum’s smart contract caused a hard fork, which was not worth the loss, although the last lost currency was recovered. In addition, we also need to consider the legitimacy of smart contracts. Some time ago, there was a smart contract to chase Trump. Although this smart contract has no functional problems, it is inhuman and illegal. With the development of the blockchain, I believe that these limitations of the smart contract can be largely solved. For example, MAI examines smart contracts by artificial intelligence, and most of them with limitations can be filtered.

Well, It’s time to say goodbye, thank you. We welcome friends who are interested in technology to discuss and communicate, and I will share with you next time.

MAI Telegram (English): https://t.me/MaiEN8888

MAI Telegram (Chinese): https://t.me/MAI888888

MAI Twitter: https://twitter.com/MaiPublicChain

MAI Reddit: https://new.reddit.com/user/MAI_AI

MAI Facebook: https://www.facebook.com/MaiPublicChain/

--

--

MAI Public Chain
MAI Public Chain

Artificial Intelligence-centric Decentralized Ecological Network