A knowledge-based course for perpetual documentary in the development of digital currency contract trading system

Hello everyone! What we are explaining today is that the smart contract of the contract transaction system can be completed and maintained on the blockchain. Like a traditional contract, it imposes the same restrictions and obligations on the agreement of the parties.

This article is organized and published by mkz888z, please feel free to communicate!

The Bitcoin blockchain stores the history of Bitcoin transactions, and that's it. The Ethereum blockchain stores Ethereum tokens in people's wallets, but it also stores the latest state of each smart contract and the code of each smart contract.

Blockchain is a distributed ledger stored in multiple locations, so this means that smart contract data is stored by those Ethereum nodes. If you create a "smart contract" (also called an application) on the blockchain, it will be stored and run in a distributed manner.

For comparison, consider the many applications we use today. This includes email applications such as Gmail, note-taking applications such as Microsoft OneNote, and any other applications that use the application and store data on the company's servers. If the company that stores the data bans your account, closes the application, or goes out of business, you will lose all the data in the application unless you have an offline backup copy.

If you are using an application built on Ethereum, the code (smart contract code) and personal data (the state of the smart contract) that make up the application will be stored in the blockchain. Whenever you use the application and change the data, all Ethereum nodes will update the state of the smart contract. This means that the absence of a central "point of failure" may prevent you from accessing data or shut down the applications you use. Your data and application code itself will be backed up globally, and no one can take all these memos offline. Of course, your data will be encrypted by the blockchain, so no one else can read it.

What is a smart contract?

Smart contracts are applications that run on the Ethereum virtual machine. This is a distributed "world computer" with computing power provided by all Ethereum nodes. Any node that provides computing power will use Ether digital currency as a resource to pay.

They are named smart contracts because you can write "contracts" that are automatically executed when the requirements are met.

For example, imagine building a Kickstarter-like crowdfunding service on top of Ethereum. Someone can build an Ethereum smart contract to pool funds to others. This smart contract can be written like this: When 100,000 USD of currency is added to the pool, it will all be sent to the recipient. Or, if the threshold of USD 100,000 is not reached within a month, all currency will be sent back to the original holder of the currency. Of course, this will use Ether instead of U.S. dollars.

All of this will be done according to the smart contract code, which can automatically execute the transaction without a trusted third party holding the currency and signing the transaction. For example, Kickstarter charges a 5% fee on top of a 5% payment processing fee, which means that a fee of $8,000 to $10,000 will be charged in a crowdfunding project of $100,000. Smart contracts do not require payment to third parties like Kickstarter.

Smart contracts can be used for many different things. Developers can create smart contracts to provide functions for other smart contracts, similar to how software libraries work. Alternatively, the smart contract can be simply used as an application to store information on the Ethereum blockchain.

In order to actually execute the smart contract code, someone must send enough Ether tokens as a transaction fee-how much depends on the required computing resources. This paid the price for the participation of Ethereum nodes and the provision of computing power.

This article is organized and published by mkz888z, please feel free to communicate!

Guess you like

Origin blog.csdn.net/mkz888z/article/details/113698583