Home/Guide/Blockchain Encyclopedia/DeFi/What are Smart Contracts?

What are Smart Contracts?

2023.08.16 MEXC
Share

The concept of smart contracts didn't originally emerge in the context of blockchain, but was defined by computer scientist and expert cryptographer Nick Szabo in 1994 as a series of commitments in digital form, including a set of protocols and the execution by the parties involved in the protocols.

However, it didn't gain much attention at that time until the birth of the decentralized, peer-to-peer transmission system of Bitcoin, and the emergence of programmable and immutable blockchain technology. These developments made the concept of smart contracts more than just a theoretical concept.

At the end of 2013, Vitalik Buterin released the Ethereum Whitepaper, and in subsequent years, he led the team in developing this decentralized smart contract application platform. It acts like an underlying operating system such as Apple's iOS or Android, providing a rich API interface for developers to quickly create various types of smart contracts and blockchain applications.

By now, the concept of smart contracts has become clearer: a smart contract is an immutable contract protocol written in code into a computer. When specific conditions agreed upon by the participants are met, the smart contract is executed.

1. Characteristics of Smart Contracts


In simple terms, a smart contract is a piece of computer program. It is not as intelligent as we might imagine, nor does it possess the legal enforceability of traditional contracts.

Deterministic: The result of executing the same smart contract is always consistent, even if it is executed on computers dispersed across different regions globally.

Open and Transparent: All terms and conditions within a smart contract are fully accessible and viewable by the participating parties.

Immutable: Once a contract is deployed, its contents cannot be altered. No party can interfere with the execution of the contract.

2. Lifecycle of Smart Contracts


Smart contracts are only executed when they are invoked by transactions. One contract can call another contract, and this calling can continue between contracts in layers. However, the execution of the first contract in this execution chain must be initiated by a transaction created by an external account. Smart contracts never run automatically or in the background. Without a triggering transaction, a contract remains in a state of waiting to be called.

The execution of transactions is a whole, and modifications to the global state will occur only after all executions have been confirmed successful. Confirmation of success means that the program's execution encountered no errors or termination conditions. If program execution terminates due to errors, all previous operations performed will be rolled back, as if that execution had never occurred.

3. Problems with Smart Contracts


As the use of smart contracts becomes increasingly widespread, people have also discovered that, much like contracts in the real world, if they are not carefully reviewed and verified, vulnerabilities can arise, leading to asset security concerns.

One of the most well-known incidents in Ethereum's history is TheDAO event. TheDAO was a decentralized autonomous fund project that raised over $150 million worth of Ether in just one month. However, within a month, a vulnerability in the token code led to a significant amount of funds being transferred out by hackers. Due to the immutable nature of smart contracts, the project team was powerless to intervene.

Even today, contract vulnerabilities continue to occur. However, these hacking incidents have made more developers realize that, just like contracts in the real world, if protocol processes are too complex, involving professional third-party audits is necessary.

4. Summary


Smart contracts replace third-party intermediaries with open, transparent, and immutable protocol codes, reducing trust costs for contract participants. They have a wide range of applications and prospects. While challenges in security auditing persist, it's important to recognize that the field is less than a decade old. Smart contract development is still in its early stages, and we believe wider market acceptance of smart contracts is only a matter of time.


Beginner Benefits

Sign up and easily get New User Rewards. There is up to 1,000 USDT Futures Bonus waiting for you.