Home > Blockchain >  Parsing | "Wisdom Chain document repository" conditions of payment
Parsing | "Wisdom Chain document repository" conditions of payment

Time:09-16

English

Conditional payment of Wisdom Chain document knowledge base

This article comes from the official Twitter of Wisdom Chain
URL:
https://twitter.com/Wisdom_Chain/status/1298458216725176328? S=20

If we want to make a transaction now, I want to sell you my data, what is the safest way of transaction?



Obviously, there are two problems:

Because what I sell all the data, and certainly always difference you directly, otherwise how can I do if you get the data and then directly run away?
But I certainly can 't take your money first, because the data I gave, you may not meet your requirements, or I took the money and ran away.

To solve the above problem, we need a perfect and accurate "one hand pay, one hand delivery" solution. Zero knowledge proof and blockchain can be 2 at this time.

Today we try to explain this interesting solution in the language that ordinary people can understand: the conditional payment of Wisdom Chain.

What does this concept mean?

To put it simple, it is To reach a perfect and fair "one hand pay, one hand delivery" scheme without trusting a third party.

Imagine a transaction scenario in which neither party is willing to make the payment/delivery to the other party without the presence of a trusted third party, otherwise the other party will run away. The One hand the payment and One hand delivery means that the payment/delivery action must be atomic.

The so - called perfect fairness means that neither side can take more advantage. Or, this concept is an old topic. As early As The 1980 s, many scholars have had been studying how to your perfect a fair trade. But for a long time, it has had been agreed that a trusted third party is essential. Later, when bitcoins was born, we found that it could be done by using The characteristics of blockchain.

How is conditional payment realized in Wisdom Chain?

"According to official disclosure, conditional payment in Wisdom Chain is mainly composed of" hash time locking ", "hash height locking" and other factors. Here, only the hash time locking and hash height locking are discussed.

What is a hash time locking?

Hash lock, the full name of the Hash time lock contract, is a new technology implementation form programs in 20 network.

Hash lock mode is a mechanism that users guess the value of the original Hash value to pay in a specified period of time. In short, on the basis of the smart contract, both parties lock the assets first. If both parties input the value of what the correct Hash value in a limited time, the transaction can be completed.

In this mechanism, we can realize the rapid confirmation of micro payment, that is to say, to your the goal of rapid confirmation of 20 network. Next, the author will take the asset exchange of the application scenario of hash locking as an example to explain how the hash locking is realized.

How to implement hash time locking? In order to facilitate the understanding of how the hash time locking is locked, here we compare two locks, one is the hash lock and the other is the time lock.

1. The Hash lock

Through the hash value locking, after locking, only the value of the original the hash value is 2 unlock. Assuming that the number is 123, the value after the hash is a03a. Through a03a locking, without considering the hash collision, it can only be unlocked by 123.

2. The Time lock

The time lock The requires The password for The hash lock to be rose within a specified time. If The time of The time The lock is 1 hour, The user is required to enter The password of The hash lock within 1 hour. If The lock is The password of The hash input after 1 hour, The time The lock will not be The opened.

In other words, the condition for opening the two locks at the same time is to input the value of the original hash value within the specified time. In the above example, if "123" is input the within one hour, to both the locks will be In the open state.

Now A will use hash time locking mechanism to exchange its WDC in B for Ethernet currency. The specific steps are as follows:

A first generates random number/S, and then difference hash value H (S) of the random number to B through the network, assuming that the random number is 123, and the hash value is a03a.

At the same time, the locks A time and the locks Hash, assuming that the time lock time is 1 hour, and the Hash value of the Hash lock is a03a. After locking, the WDC to be converted is locked on chain 1.



After B receives the hash value "a03a" given by A, B, deploys the smart contract on the Ethernet site on this hash value and stores the same value of the ETH in the contract. B 's smart contract requires A to dojo.provide the password "123" within the specified time to take away the ETH in the smart contract.

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related