In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "what are the knowledge points of the intelligent contract in Ethernet Square". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope that this article "what are the knowledge points of the intelligent contract in Ethernet Square" can help you solve the problem.
The consensus mechanism of Bitcoin
Bitcoin's core technology blockchain can be understood as a replicable and shareable ledger.
Bitcoin's core innovation: it teaches the world how to transfer value over long distances without trusting third parties.
Of course, people can transfer physical paper money face-to-face, but before Bitcoin, we couldn't: transfer value to someone remotely without the need to trust centralised third parties (post offices, banks, etc.).
It is as if the infrastructure of the traditional transfer model of banks and payment systems has been reconstructed into a peer-to-peer payment network. This transition is shown in the following figure:
Bitcoin opens the door to a peer-to-peer electronic value transfer model, which is completely different from today's banking system, central bank and payment system. However, the above diagram does not explain how Bitcoin achieves a point-to-point value transfer.
The answer is: the Bitcoin system is based on "replicable, shareable ledgers". Each participant (full node) in the Bitcoin network has a complete copy of the transaction book, and the magic of this system is how it keeps everyone's copy consistent with everyone else's copy.
Therefore, the correct diagram should be the following diagram, where each participant can obtain information from the same replicable and shareable ledger.
The trick for Bitcoin and other decentralized consensus systems is how they ensure that each has a copy of the ledger and convince everyone that their own ledger is synchronized with someone else's.
If everyone has the same copy of the ledger, then people no longer need a central body to keep track of who owns what. When your books are updated to record a new change in asset ownership, the same changes will occur in other people's books.
Intelligent contract
An intelligent contract program is not just a computer program that can be executed automatically: it is a system participant itself. It responds to the information received. It can receive and store value, and it can also send information and value to the outside.
This program is like a person who can be trusted to temporarily take care of assets and always operate in accordance with prior rules.
The following diagram is a smart contract model: a piece of code (smart contract), deployed on a shared and copied ledger, can maintain its own state. control your assets and respond to external information or assets received.
Cymbal
Intelligent contract model: it is a computer program running on a replicable and shareable ledger that can process information, receive, store, and send value.
Ethernet square system
The etherfang project draws lessons from the technology of bitcoin blockchain and expands its scope of application. If Bitcoin is a special calculator that uses blockchain technology, then Tai Fong is a general-purpose computer that uses blockchain technology. To put it simply, Yi Tai Fong = block chain + intelligent contract.
The biggest difference between ethernet and bitcoin is that it can support a more powerful scripting language (Turing's complete scripting language in technical language), allowing developers to develop arbitrary applications and implement any intelligent contract on it. This is also the most powerful thing about ethernet. As a platform, ethernet can be compared to Apple's App Store, where any developer can develop applications and sell them to users.
Financial Application of Intelligent contract in Ethernet Square
Each type of financial contract can be written as an intelligent contract in the form of program code.
Contract for difference
Financial derivatives are the most common application of "smart contracts" and one of the easiest to implement in code. The main challenge in implementing financial contracts is that most of them need to refer to an external price publisher; for example, a very demanding application is a smart contract to hedge the price fluctuations of etheric currency (or other cryptographic currencies) against the dollar, but the contract needs to know the price of the etheric currency against the dollar. The easiest way to do this is through a "data supply" contract maintained by a particular organization, such as NASDAQ, which is designed to enable the organization to update the contract as needed. and provide an interface to enable other contracts to get a reply containing price information by sending a message to the contract.
When these key elements are in place, the hedging contract will look like the following:
Wait for A to enter 1000 etheric coins.
Wait for B to enter 1000 etheric dollars.
By querying the data to provide the contract, the US dollar value of 1000 etheric coins, for example, US $x, is recorded in memory.
After 30 days, allow An or B to "reactivate" the contract to send ethercoins worth $x (re-query the data supply contract to get the new price and calculate) to An and send the remaining ethernet coins to B.
Token system (token system)
There are many applications of the token system on the blockchain, from sub-currencies representing assets such as dollars or gold to company stocks, individual tokens representing smart assets, secure unforgeable coupons, and even tokens used to reward points that have nothing to do with traditional values. It is surprisingly easy to implement a token system in Etay Square. The key point is to understand that all currency or token systems are fundamentally a database with the following operations: subtract X units from An and add X units to B. the premise is that (1) A has at least X units before the transaction and (2) the transaction is approved by A. To implement a token system is to implement such a logic into a contract.
Savings wallet
Suppose Alice wants to keep her money safe, but she is worried about losing her private key or being stolen by a hacker. She put the ethercoin in a contract with Bob, as shown below, which is a bank:
Alice alone can withdraw up to 1 per cent of its funds per day.
Bob alone can withdraw up to 1% of the funds per day, but Alice can use her private key to create a transaction to cancel Bob's withdrawal rights.
Alice and Bob together can withdraw funds at will.
Generally speaking, 1% per day is enough for Alice. If Alice wants to withdraw more money, she can contact Bob for help. If Alice's private key is stolen, she can immediately find Bob to transfer her funds to a new contract. If she loses her private key, Bob can slowly withdraw the money. If Bob shows malice, she can turn off his right to withdraw cash.
Crop insurance
One can easily use weather conditions rather than any price index as data input to create a financial derivatives contract. If an Iowa farmer buys a financial derivative that pays reverse based on rainfall in Iowa, then if there is a drought, the farmer will automatically receive compensation money, and if there is enough rain, he will be happy because his crop harvest will be good. Multi-signature intelligent contract
Multi-signature intelligent contract
Bitcoin allows trading contracts based on multiple signatures, for example, money can be used by collecting three of five private keys. Yi Tai Fong can be more detailed. For example, if you collect four keys in five private keys, you can spend all your money. If you only have three, you can spend up to 10% a day, and if you have only two, you can only spend 0.5% a day.
This is the end of the content about "what are the knowledge points of the Ethernet Square Intelligent contract". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.