Latest Articles

Dollar gains, stocks teeter as US data suggests rates to stay higher

The dollar rose and a gauge of global equities slid on Thursday after data once again highlighted persistent U.S. labor market strength, suggesting the...
HomeCryptoWhat are the key smart contracts in Defi?

What are the key smart contracts in Defi?

People often ask, what is a smart contract? You must first understand what a “contract” is.

In the daily life of the contract (cooperation agreement) is also concluded between the partners “contract”, now our life is almost inseparable from the contract, to say, the work is signed with the company labor contract, buy a house is signed with the real estate company to buy a house contract, buy insurance is signed with the insurance company insurance contract; To put it in a small way, online shopping, ordering takeout, taking a taxi and buying a lottery are all contracted with the relevant service provider. Contracts, so to speak, are used where there are people.

Even when we make a bet, it is a contract, but if one party repudiates, it becomes difficult to fulfill the contract. If there is a kind of contract, the rules are defined in advance, once the relevant provisions are triggered, the contract will be executed automatically, without human interference and without fear of repudiation. Is there such a contract? There is. It’s called a smart contract.

What is a smart contract

What are the key smart contracts in Defi?

Smart Contract is a concept proposed by cryptographer Nick Saab in the 1990s. Due to the lack of credible execution environment at that time, Smart Contract was not applied and developed until the emergence of Ethereum, which allowed Smart Contract to be “resurrected”.

So what exactly is a smart contract? In simple terms, a smart contract is a contract in which a computer language replaces the legal language to record the terms and the program executes them automatically. In other words, a smart contract is a digital version of a traditional contract that runs on a blockchain network and is automatically executed by a program.

Vending machines, ATMs, to some extent can be understood as machines that execute smart contracts, but these are not really smart contracts.

What are the features of smart contracts?

What are the key smart contracts in Defi?

Compared with traditional contracts, smart contracts have three characteristics:

  1. The contents of the contract are open and transparent

Smart contracts are deployed on the blockchain, and their contract content is naturally open and transparent.

  1. The contents of the contract shall not be altered

Also, the content of a smart contract cannot be modified because it is deployed on a blockchain.

3, permanent operation

The smart contract running on the block chain is also jointly maintained by the network nodes on the block chain. As long as the block chain exists, the smart contract can run permanently. There is a sense of “where the chain is, the contract is” brotherhood.

Compared with traditional contracts, smart contracts with the three characteristics of blockchain mainly have the following advantages:

  1. Trust.

Because smart contracts are blockchain-based, they are open, transparent and cannot be tampered with. The Code is the law, and traders can conduct transactions in a distrustful environment with peace of mind and security based on the trust in the Code.

  1. Economy and efficiency

Compared with the traditional contract, it often causes disputes due to the differences in understanding of the contract terms. Smart contracts do a good job of avoiding disagreements through computing languages, causing few disputes, and achieving consensus at a low cost. In the case of smart contracts, the arbitration result will take effect immediately. Therefore, compared with traditional contracts, smart contracts have the advantages of economy and efficiency.

  1. No third-party arbitration is required

Suppose Xiong Da and Xiong 2 bet on whether it will rain tomorrow. Whoever loses has to pay 100 yuan to the other side. If the loser denies it, the winner gets no reward. To do so, going to a third-party arbitration agency is inefficient and time-consuming. But if the bet is written on the smart contract, each person puts 100 yuan into the smart contract address when the bet is made, and the smart contract automatically executes based on the final outcome, with the winner taking all the prizes. As a result, smart contracts do not require third-party arbitration.

Are smart contracts really smart?

With all the advantages of smart contracts mentioned above, are smart contracts really smart and free of disadvantages? However, smart contracts also have their drawbacks.

As mentioned above, the immutable nature of smart contracts makes it easy to build trust. But there is also a downside. If a smart contract has a flaw, hackers can exploit it for their own profit.

Take a simple example, a vending machine, originally sold for 5 yuan of drinks, due to negligence, written 50 cents, the administrator found, can immediately correct. But if the vending machine invokes a smart contract on the blockchain, the error won’t be fixed until it runs out of drinks.

On the other hand, the smart contract itself cannot acquire (sense) external information, which involves the need for external information to adjudicate the contract, and the need to write relevant information to it before it can make a decision. For example, the smart contract itself does not know whether it will rain the next day. It needs to provide information through other information sources, such as the data of the National Meteorological Observatory. After this information, the smart contract can make a decision.

On these two points, smart contracts are neither perfect nor smart.

summary

In summary, here’s what we know about smart contracts:

A smart contract is a contract in which the terms are recorded in computer language instead of legal language and executed automatically by a program. Deployed on the block, it also has the characteristics of blockchain data open and transparent, tamper free, permanent operation.

Compared with traditional contracts, smart contracts have the advantages of de-trust, security, efficiency and no third-party arbitration. But a smart contract isn’t perfect, and it’s not smart or very smart.

It is mentioned in this paper that the execution of smart contract does not require a third-party ruling. At the same time, when the execution conditions involve external information, the smart contract cannot perceive, and relevant information needs to be input to the smart contract to trigger the smart contract to execute the ruling.