Position: Home page » Currency » How to write smart contract protocol of digital currency

How to write smart contract protocol of digital currency

Publish: 2021-03-27 06:08:30
1. Smart contract & quot The term "smart contract" can be traced back to at least 1995 and was proposed by the prolific interdisciplinary legal scholar Nick Szabo. He mentioned the concept of smart contract in several articles published on his website. His definition is as follows:
& quot; A smart contract is a set of promises defined in digital form, including the agreements on which the contract participants can execute these promises& quot;
let's explore the meaning of his definition in more detail
commitment
a set of commitments refers to the (often mutual) rights and obligations agreed by contract participants. These commitments define the nature and purpose of the contract. Take a sales contract as a typical example. The seller promises to deliver the goods and the buyer promises to pay a reasonable price
digital form
digital form means that contracts have to be written into computer-readable code. This is necessary, because as long as the participants reach an agreement, the rights and obligations of smart contract establishment are executed by a computer or computer network
to further explain:
(1) when will the parties to the smart contract reach an agreement? The answer depends on the specific smart contract implementation. Generally speaking, the contract is discovered when the parties are committed to the execution of the contract by installing the contract on the contract host platform< (2) contract execution
& quot; Execute & quot; And the real meaning of it also depends on implementation. Generally speaking, implementation means active implementation through technical means
(3) computer readable code
in addition, the contract needs specific & quot; Digital form & quot; Very much depends on the agreement that the parties agree to use
protocol
protocol is technical implementation, on this basis, the contract commitment is realized, or the contract commitment is recorded. Which agreement to choose depends on many factors, the most important of which is the nature of the assets being traded ring the performance of the contract
take the sales contract as an example. Suppose that the participants agree to pay in bitcoin. The chosen protocol will obviously be bitcoin protocol, on which the smart contract will be implemented. Therefore, the contract must use & quot; Digital form & quot; It's bitcoin scripting language. Bitcoin scripting language is a non Turing complete, imperative, stack based programming language, similar to forth.
2. The program running on the blockchain is usually called smart contract. So we usually change the name of writing blockchain program to writing smart contract
although bitcoin can also write smart contracts, the syntax supported by bitcoin is only related to transactions, and there are limited things it can do
therefore, when it comes to writing smart contracts, it usually refers to Ethereum blockchain that supports the execution of Turing complete programs.
3. 1. Digital currency contract, also known as futures contract. In short, it's business in the future. A standardized contract uniformly formulated by the exchange to deliver a certain quantity and quality at a specific time and place in the future. The vast majority of users use the margin system of futures contracts, add 10 or even 20 times leverage to leverage big funds, and then use the index fluctuation to buy low and sell high trading contracts, so as to earn double profits< 2. Perpetual contracts are derivatives. From the perspective of trading, it is similar to the traditional futures contract, but there are some differences. First of all, it has no maturity or settlement date. The perpetual swap contract is similar to a margin spot market, so its trading price is close to the underlying reference index price, which is different from the futures contract. Due to the basis, the trading price difference of the futures contract may be significantly different. Secondly, the main mechanism of anchoring spot price is capital cost< At present, rolling spot futures is the main form of perpetual contracts. Rolling contract is a kind of futures contract settled on the same day and automatically extended. Profit and loss are settled on each trading day, and the contract position held by traders will be automatically extended at the end of the trading day. In addition, the cash flow of assets will be exchanged, and the long investors will pay the capital cost to the short investors to compensate the capital cost of the short investors
3. Option contract is a kind of agreement, which can give traders the right to buy or sell assets at a predetermined price before a specific date or on a specific date. Option contracts are trading derivatives that can be based on a wide range of underlying assets, including stocks and cryptocurrencies. These contracts may also come from information such as financial indicators. Generally, option contracts are used to hedge the risk of existing positions and speculative transactions.
4. In a word, the blockchain technology has realized the smart contract. Specifically, you can go to the app of lianpai community to learn about it. The lecturer in the app said that the blockchain related content is very simple, easy to understand and professional
5. Ethereum is a distributed computing platform. It generates an cryptocurrency called ether. Programmers can write "smart contracts" on the Ethereum blockchain, and these Ethereum smart contracts will be executed automatically according to the code

what is Ethereum
Ethereum is often compared with bitcoin, but the situation is different. Bitcoin is a kind of cryptocurrency and distributed payment network, which allows bitcoin to be transferred between users

related: what is bitcoin? How does it work

Ethereum has a bigger goal. As Ethereum says, "Ethereum is a distributed platform running smart contracts.". These smart contracts run on "Ethereum virtual machine", a distributed computing network composed of all devices running Ethernet nodes

"distributed platform" means that anyone can set up and run an Ethereum node just as anyone can run a bitcoin node. Anyone who wants to run "smart contracts" on nodes must pay the operators of these nodes in ether, which is a cryptocurrency related to Ethereum. Therefore, the person running the Ethernet node provides computing power and gets paid in the Ethernet, which is similar to the way that the person running the bitcoin node provides hash power and pays in bitcoin

in other words, although bitcoin is only a blockchain and payment network, Ethereum is a distributed computing network, and its blockchain can be used for many other things. Details are provided in the Ethereum white paper

what is ether
Ethernet is a digital token (or cryptocurrency) related to Ethereum blockchain. In other words, Ethereum is the token and Ethereum is the platform. But now people often use these terms alternately. For example, coinbase allows you to buy Ethereum, which stands for Ethereum

this is technically "altcoin", which actually means a non bitcoin cryptocurrency. Like bitcoin, ether is supported by distributed blockchain - in this case, Ethereum blockchain

developers who want to create applications or Ethereum smart contracts on Ethereum blockchain need Ethernet token to pay for nodes to host it, while users of Ethereum based applications may need Ethernet to pay for services in these applications. People can also sell services outside the Ethereum network and accept Ethernet payments, or they can sell Ethernet tokens in cash - just like bitcoin
6. In short, a group digs bitcoin on the computer, which is equivalent to a big mine.
7.

It's a pyramid scheme. The founder of express money has run away, so it can't be exchanged

Yao Zhiliang, deputy leader of the second brigade of the Economic Investigation Detachment of Shenzhen Public Security Bureau, told reporters that the so-called fast money can be classified as pyramid selling fraud, and it also belongs to illegal fund-raising projects. At present, the state is cracking down on such projects, and engaging in the promotion of so-called fast money will be prosecuted for organizing and leading pyramid selling

according to the introction of senior players, quick coin is likely to be the regeneration disk of Dick coin, that is to say, it was made by the original team. If Dick coin can't go on, it will find another trick instead of continuing to dig money. Early can make money, cloud mining machine is compound interest plate, static 100 days back. So in essence, the so-called decentralization and circulation are false, because it does not have the attribute of cryptocurrency

extended materials:

fast coin belongs to Shanzhai coin. Download the bitcoin source code, and slightly modify the source code (quantity, encryption method, etc.) to proce fast coin, which is also the technical basis of all Shanzhai coins

Secondly, it belongs to enterprise currency. Although express money claims not to be controlled by the central bank, every investor has a targeted investment object (purchase cloud mining machine), which means that express money is not a decentralized virtual currency

8. Comrades, try not to play with these virtual things. If you want to play, play with the public. Crude oil, gold, silver... These are public goods and will not collapse.
9. A virtual currency has not been officially recognized
I hope it can help you. If your problem is solved, please click to adopt it, thank you
10. At present, the central bank does not recognize similar currencies as digital currencies.
it is recommended not to participate in investment to avoid policy risks leading to losses.
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750