TW202141396A - Multi-party loan consumption system based on blockchain and smart contract and method thereof - Google Patents

Multi-party loan consumption system based on blockchain and smart contract and method thereof Download PDF

Info

Publication number
TW202141396A
TW202141396A TW109112740A TW109112740A TW202141396A TW 202141396 A TW202141396 A TW 202141396A TW 109112740 A TW109112740 A TW 109112740A TW 109112740 A TW109112740 A TW 109112740A TW 202141396 A TW202141396 A TW 202141396A
Authority
TW
Taiwan
Prior art keywords
host
smart contract
relationship
lending
buyer
Prior art date
Application number
TW109112740A
Other languages
Chinese (zh)
Other versions
TWI818171B (en
Inventor
王振軒
楊建民
苗華斌
Original Assignee
天宿智能科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 天宿智能科技股份有限公司 filed Critical 天宿智能科技股份有限公司
Priority to TW109112740A priority Critical patent/TWI818171B/en
Publication of TW202141396A publication Critical patent/TW202141396A/en
Application granted granted Critical
Publication of TWI818171B publication Critical patent/TWI818171B/en

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A multi-party loan consumption system based on blockchain and smart contract and method thereof is disclosed. By providing a buyer host, lending host, seller host, and intermediary host on a blockchain network, wherein the buyer host and the seller host are in a delivery relationship, the buyer host and the lending host are in a loan relationship, and the lending-end host and the seller host are in a payment relationship. When the buyer host makes loan consumption, using at least one smart contract to escrow a plurality of digital currencies and tokens, and the lending host pays the seller host after detecting that the seller host delivers assets to the buyer host, and allows the intermediary host to arbitrate transactions. The mechanism is help to improve the transparency and authenticity of borrowing purpose.

Description

基於區塊鏈與智慧合約的多方借貸消費系統及其方法Multi-party loan and consumption system and method based on block chain and smart contract

本發明涉及一種借貸消費之系統及其方法,特別是基於區塊鏈與智慧合約的多方借貸消費系統及其方法。The present invention relates to a system and method for loan consumption, in particular to a multi-party loan consumption system and method based on blockchain and smart contracts.

近年來,隨著網路的普及與蓬勃發展,各種網路借貸平台便如雨後春筍般出現。然而,如何確保借貸款項能夠專款專用,一直以來都是各家廠商亟欲解決的問題之一。In recent years, with the popularity and vigorous development of the Internet, various online lending platforms have sprung up. However, how to ensure that loans can be used for special purposes has always been one of the problems that manufacturers urgently want to solve.

一般而言,傳統的網路借貸是指個體和個體之間透過網路借貸平台直接進行借貸,其相較於傳統金融機構能夠大幅節省人力成本及管理費用,所以能夠以低廉的手續費用吸引用戶。然而,傳統的網路借貸平台難以對放款資金流向進行追蹤或確認,所以無法有效避免借貸用途與實際用途不相符的情況,舉例來說,借貸用途是為了購買電腦,但是申貸者實際取得資金後,卻將資金挪作他用,如:購買奢侈品、旅遊等等,甚至是將借貸的資金提供給他人使用。因此,在無法保證借貸用途與實際用途相符的情況下,對放貸方而言,具有借貸用途的透明性及真實性不佳的問題,不但可能影響金融秩序,同時也存在許多不確定的風險。Generally speaking, traditional online lending refers to the direct lending between individuals and individuals through online lending platforms. Compared with traditional financial institutions, it can greatly save labor and management costs, so it can attract users with low processing fees. . However, it is difficult for traditional online lending platforms to track or confirm the flow of loan funds, so it is impossible to effectively avoid the inconsistency of the borrowing use with the actual use. For example, the loan is used to purchase a computer, but the applicant actually obtains the funds Later, they embezzled the funds for other purposes, such as buying luxury goods, traveling, etc., or even providing borrowed funds for others to use. Therefore, when there is no guarantee that the loan usage matches the actual usage, for the lender, the transparency and authenticity of the loan usage are not good, which may not only affect the financial order, but also have many uncertain risks.

有鑑於此,便有廠商提出即時徵信的技術手段,其透過在撥貸後,主動偵測帳戶的資金流向及還款來源以判斷有無異常。然而,此方式需要經過申貸者授權以便正確獲取帳戶訊息,而且只根據資金流向及還款來源進行判斷仍然無法有效保證借貸用途與實際用途相符,故仍然無法有效解決借貸用途的透明性及真實性不佳的問題。In view of this, some manufacturers have proposed real-time credit investigation technical methods, which actively detect the flow of funds in the account and the source of repayment to determine whether there is an abnormality after the loan is allocated. However, this method requires the authorization of the loan applicant in order to obtain the correct account information, and only judging based on the flow of funds and the source of repayment still cannot effectively guarantee that the loan use matches the actual use, so it still cannot effectively solve the transparency and truthfulness of the loan use The problem of poor sex.

綜上所述,可知先前技術中長期以來一直存在借貸用途的透明性及真實性不佳之問題,因此實有必要提出改進的技術手段,來解決此一問題。In summary, it can be seen that the prior art has long been problematic in the transparency and authenticity of lending purposes. Therefore, it is necessary to propose improved technical means to solve this problem.

本發明揭露一種基於區塊鏈與智慧合約的多方借貸消費系統及其方法。The present invention discloses a multi-party loan and consumption system and method based on block chain and smart contract.

首先,本發明揭露一種基於區塊鏈與智慧合約的多方借貸消費系統,應用在由多個節點主機組成的區塊鏈網路,此系統包含:買方端主機、借出端主機、賣方端主機及中介端主機。其中,買方端主機作為節點主機其中之一,所述買方端主機用以在包含借貸訊息的智慧合約成功發布於區塊鏈網路之後,允許將債權通證傳送至智慧合約以進行託管;中介端主機作為節點主機其中之一,所述中介端主機用以允許直接觸發執行智慧合約的交付函式及退還函式;賣方端主機作為節點主機其中之一,所述賣方端主機在智慧合約成功發布後,將資產通證傳送至智慧合約以進行託管;以及借出端主機作為節點主機其中之一,所述借出端主機在智慧合約成功發布後,將數位貨幣或支付通證傳送至智慧合約以進行託管;其中,當資產通證以及數位貨幣或支付通證皆已託管於智慧合約時,允許買方端主機、借出端主機、賣方端主機及中介端主機其中之一觸發執行智慧合約的交付函式,使智慧合約將資產通證轉移至買方端主機、將數位貨幣或支付通證轉移至賣方端主機,以及在借貸訊息中記錄為借貸已執行,或在智慧合約存在託管的債權通證時,將債權通證轉移至借出端主機,當交付函式執行結束後,買方端主機根據借貸訊息及借出端主機持有的債權通證或兩者任一計算還款數額,以便向借出端主機進行還款。First of all, the present invention discloses a multi-party lending and consumption system based on blockchain and smart contracts, which is applied to a blockchain network composed of multiple node hosts. This system includes: a buyer-side host, a lending-side host, and a seller-side host And the intermediary end host. Among them, the buyer-side host is one of the node hosts, and the buyer-side host is used to allow the credit certificate to be sent to the smart contract for custody after the smart contract containing the loan information is successfully published on the blockchain network; The end host is one of the node hosts, and the intermediary end host is used to directly trigger the execution of the delivery function and return function of the smart contract; the seller end host is one of the node hosts, and the seller end host succeeds in the smart contract After the issuance, the asset certificate is transferred to the smart contract for custody; and the lending host serves as one of the node hosts. After the smart contract is successfully released, the lending host sends the digital currency or payment pass to the smart contract. Contract for custody; among them, when asset tokens and digital currency or payment tokens have been hosted in a smart contract, one of the buyer’s host, lender’s host, seller’s host, and intermediary host is allowed to trigger the execution of the smart contract The delivery function of the smart contract enables the smart contract to transfer the asset certificate to the buyer's host, transfer the digital currency or payment certificate to the seller's host, and record in the loan message as the loan has been executed, or there are escrow credits in the smart contract When passing the certificate, transfer the credit certificate to the lending host. When the delivery function is completed, the buyer host calculates the repayment amount based on the loan information and the credit certificate held by the lending host or both. In order to repay the loan to the host on the lending side.

接著,本發明還揭露一種基於區塊鏈與智慧合約的多方借貸消費系統,應用在由多個節點主機組成的區塊鏈網路,此系統包含:買方端主機、借出端主機、賣方端主機及中介端主機。其中,買方端主機作為節點主機其中之一,所述買方端主機用以在借貸關係智慧合約發布於區塊鏈網路之後,允許在借貸關係智慧合約中設定第一雜湊值,其中第一雜湊值係由第一解鎖密語進行雜湊計算所生成;借出端主機作為節點主機其中之一,所述借出端主機用以在支付關係智慧合約發布於區塊鏈網路之後,允許在支付關係智慧合約設定第一雜湊值,並且將數位貨幣或支付通證傳送至支付關係智慧合約以進行託管;賣方端主機作為節點主機其中之一,所述賣方端主機用以在交付關係智慧合約發布於區塊鏈網路之後,允許在交付關係智慧合約設定第一雜湊值,並且將資產通證傳送至交付關係智慧合約以進行託管;以及中介端主機作為節點主機其中之一,所述中介端主機用以在已設定第一雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約中設定第二雜湊值,此第二雜湊值係由第二解鎖密語進行雜湊計算所生成;其中,在買方端主機、借出端主機及賣方端主機之中,非最早設定第一雜湊值的二者,將第一雜湊值及第二雜湊值設定在尚未設定第一雜湊值及第二雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約之中,在進行設定時,借貸關係智慧合約允許託管來自買方端主機的債權通證,交付關係智慧合約同時託管來自賣方端主機的資產通證,支付關係智慧合約同時託管來自借出端主機的數位貨幣或支付通證;其中,在確定執行交易時,由最早設定第一雜湊值的買方端主機、賣方端主機或借出端主機將第一解鎖密語傳送至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,或由中介端主機傳送第二解鎖密語至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機、借出端主機或賣方端主機,並且公開接收到的第一解鎖密語或第二解鎖密語;其中,在買方端主機、借出端主機及賣方端主機之中,非最早設定第一雜湊值的二者,在偵測到公開的第一解鎖密語或第二解鎖密語時,允許將偵測到的第一解鎖密語或第二解鎖密語傳送至未公開第一解鎖密語或第二解鎖密語的交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使其在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機、借出端主機或賣方端主機,以及當偵測到的第一解鎖密語或第二解鎖密語傳送至借貸關係智慧合約時,允許將借貸關係智慧合約的借貸狀態記錄為借貸已執行。Next, the present invention also discloses a multi-party lending and consumption system based on blockchain and smart contracts, which is applied to a blockchain network composed of multiple node hosts. This system includes: a buyer's host, a lender's host, and a seller's end. Host and intermediary end host. Among them, the buyer-side host is one of the node hosts, and the buyer-side host is used to allow the first hash value to be set in the lending relationship smart contract after the lending relationship smart contract is published on the blockchain network, where the first hash The value is generated by the hash calculation of the first unlocking cipher; the lending host is one of the node hosts, and the lending host is used to allow the payment relationship after the payment relationship smart contract is published on the blockchain network The smart contract sets the first hash value, and sends the digital currency or payment token to the payment relationship smart contract for escrow; the seller-side host is one of the node hosts, and the seller-side host is used to publish the smart contract in the delivery relationship After the blockchain network, the first hash value is allowed to be set in the delivery relationship smart contract, and the asset token is sent to the delivery relationship smart contract for custody; and the intermediary end host serves as one of the node hosts, the intermediary end host It is used to set a second hash value in a smart contract for a lending relationship, a smart contract for a payment relationship, or a smart contract for a delivery relationship for which the first hash value has been set, and the second hash value is generated by the hash calculation of the second unlocking password; where, Among the host at the buyer's end, the host at the lender's end, and the host at the seller's end, if the first hash value is not set first, the first hash value and the second hash value are set so that the first hash value and the second hash value have not been set In the smart contract of the lending relationship, the smart contract of the payment relationship, or the smart contract of the delivery relationship, when setting, the smart contract of the lending relationship allows the escrow of the debt certificate from the buyer's side host, and the delivery relationship smart contract also escrows the assets from the seller's host Token, the payment relationship smart contract also hosts the digital currency or payment token from the lending-side host; among them, when the transaction is determined to be executed, the buyer-side host, seller-side host or lending-side host that sets the first hash value earliest Send the first unlocking password to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract, or the intermediary host sends the second unlocking password to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract to make the delivery When a relationship smart contract, a lending relationship smart contract, or a payment relationship smart contract receives the first unlocking password that matches the first hash value or the second unlocking password that matches the second hash value, the asset certificate, debt certificate, and The digital currency or payment pass is transmitted to the buyer’s host, lender’s host or seller’s host, and the received first unlocking secret or second unlocking cipher is disclosed; among them, on the buyer’s host, lender’s host and seller’s end In the host, the two that are not the first to set the first hash value are allowed to send the detected first unlocking password or second unlocking password to the unidentified Publish the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract of the first unlocking password or the second unlocking password, so that it receives the first unlocking password matching the first hash value or the second unlocking password matching the second hash value. When unlocking the passphrase, transfer the managed asset certificate, debt certificate, digital currency or payment certificate to the buyer’s host and borrow The originating host or the seller's host, and when the detected first unlocking passphrase or second unlocking passphrase is transmitted to the lending relationship smart contract, it is allowed to record the lending status of the lending relationship smart contract as the loan executed.

另外,本發明揭露一種基於區塊鏈與智慧合約的多方借貸消費方法,應用在由多個節點主機組成的區塊鏈網路,其步驟包括:提供分別作為節點主機其中之一的買方端主機、借出端主機、賣方端主機及中介端主機,其中,中介端主機允許直接觸發執行智慧合約的交付函式及退還函式;在包含借貸訊息的智慧合約成功發布於區塊鏈網路之後,買方端主機將債權通證傳送至智慧合約以進行託管、賣方端主機將資產通證傳送至智慧合約以進行託管,以及借出端主機將數位貨幣或支付通證傳送至智慧合約以進行託管;當債權通證及資產通證,以及數位貨幣或支付通證皆已託管於智慧合約時,允許買方端主機、借出端主機、賣方端主機及中介端主機其中之一觸發執行智慧合約的交付函式,使智慧合約將資產通證轉移至買方端主機、將數位貨幣或支付通證轉移至賣方端主機,以及將債權通證轉移至借出端主機;以及在交付函式執行結束後,買方端主機根據借貸訊息及借出端主機持有的債權通證計算還款數額,以便向借出端主機進行還款。In addition, the present invention discloses a multi-party lending and consumption method based on blockchain and smart contracts, which is applied to a blockchain network composed of multiple node hosts. The steps include: providing a buyer-side host as one of the node hosts. , Lending-side host, seller-side host and intermediary-side host, among which the intermediary-side host allows to directly trigger the delivery function and return function of the execution of the smart contract; after the smart contract containing the loan information is successfully published on the blockchain network , The buyer’s host sends the creditor’s rights certificate to the smart contract for custody, the seller’s host sends the asset certificate to the smart contract for custody, and the lender host sends the digital currency or payment certificate to the smart contract for custody ; When debt certificates and asset certificates, as well as digital currencies or payment certificates have been hosted in a smart contract, allow one of the buyer’s host, lender’s host, seller’s host, and intermediary host to trigger the execution of the smart contract The delivery function enables the smart contract to transfer the asset certificate to the buyer's host, digital currency or payment certificate to the seller's host, and transfer the debt certificate to the lender's host; and after the execution of the delivery function ends , The buyer’s host computer calculates the repayment amount based on the loan information and the credit card held by the lender host to repay the loan to the lender host.

另外,本發明還揭露一種基於區塊鏈與智慧合約的多方借貸消費方法,應用在由多個節點主機組成的區塊鏈網路,其步驟包括:提供買方端主機、借出端主機、賣方端主機及中介端主機以分別作為節點主機其中之一;買方端主機或賣方端主機在區塊鏈網路發布交付關係智慧合約、買方端主機或借出端主機在區塊鏈網路發布借貸關係智慧合約,借出端主機或賣方端主機在區塊鏈網路發布支付關係智慧合約;在交付關係智慧合約、借貸關係智慧合約及支付關係智慧合約皆成功發布後,由所述買方端主機在借貸關係智慧合約中設定第一雜湊值,或由借出端主機在支付關係智慧合約中設定第一雜湊值,或由賣方端主機在交付關係智慧合約中設定第一雜湊值,其中第一雜湊值係由第一解鎖密語進行雜湊計算所生成;中介端主機在已設定第一雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約中設定第二雜湊值,所述第二雜湊值係由第二解鎖密語進行雜湊計算所生成;在買方端主機、借出端主機及賣方端主機之中,非最早設定第一雜湊值的二者,將第一雜湊值及第二雜湊值設定在尚未設定第一雜湊值及第二雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約之中,其中,在進行設定時,借貸關係智慧合約允許託管來自買方端主機的債權通證,交付關係智慧合約同時託管來自賣方端主機的資產通證,支付關係智慧合約同時託管來自借出端主機的數位貨幣或支付通證;在確定執行交易時,由最早設定第一雜湊值的買方端主機、賣方端主機或借出端主機將第一解鎖密語傳送至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,或由中介端主機傳送第二解鎖密語至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機、借出端主機或賣方端主機,並且公開接收到的第一解鎖密語或第二解鎖密語;在買方端主機、借出端主機及賣方端主機之中,非最早設定第一雜湊值的二者,在偵測到公開的第一解鎖密語或第二解鎖密語時,允許將偵測到的第一解鎖密語或第二解鎖密語傳送至未公開第一解鎖密語或第二解鎖密語的交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使其在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機、借出端主機或賣方端主機,以及當偵測到的第一解鎖密語或第二解鎖密語傳送至借貸關係智慧合約時,允許將借貸關係智慧合約的借貸狀態記錄為借貸已執行。In addition, the present invention also discloses a multi-party loan and consumption method based on blockchain and smart contracts, which is applied to a blockchain network composed of multiple node hosts. The steps include: providing a buyer-side host, a lending-side host, and a seller The host and the intermediary host respectively serve as one of the node hosts; the buyer host or the seller host publishes the delivery relationship smart contract on the blockchain network, and the buyer host or the lender host issues loans on the blockchain network The relationship smart contract, the lending-side host or the seller-side host publishes the payment relationship smart contract on the blockchain network; after the delivery relationship smart contract, the lending relationship smart contract, and the payment relationship smart contract are successfully released, the buyer-side host Set the first hash value in the lending relationship smart contract, or the lending host set the first hash value in the payment relationship smart contract, or the seller host set the first hash value in the delivery relationship smart contract, where the first The hash value is generated by the hash calculation of the first unlocking passphrase; the intermediary host sets the second hash value in the lending relationship smart contract, payment relationship smart contract, or delivery relationship smart contract that has set the first hash value. The hash value is generated by the hash calculation of the second unlocking passphrase; among the buyer-side host, lender-side host, and seller-side host, the first hash value is not the earliest set of the first hash value, and the first hash value and the second hash value are combined The value is set in the lending relationship smart contract, payment relationship smart contract, or delivery relationship smart contract for which the first hash value and the second hash value have not been set. Among them, when setting, the lending relationship smart contract allows hosting from the buyer's host Debt tokens, the delivery relationship smart contract also hosts the asset tokens from the seller's host, and the payment relationship smart contract also hosts the digital currency or payment tokens from the lending host; when determining the execution of the transaction, the first hash is set at the earliest The valued buyer’s host, seller’s host, or lender host sends the first unlocking secret to the delivery relationship smart contract, lending relationship smart contract or payment relationship smart contract, or the intermediary host sends the second unlocking secret to the delivery relationship smart contract Contract, lending relationship smart contract, or payment relationship smart contract, so that the delivery relationship smart contract, lending relationship smart contract, or payment relationship smart contract receives the first unlocking cipher that matches the first hash value or the second unlocking that matches the second hash value During the passphrase, transfer the managed asset pass, debt pass, digital currency or payment pass to the buyer's host, lender's host or seller's host, and publicly receive the first unlocking passphrase or the second unlocking passphrase; Among the host at the buyer's end, the host at the lending end, and the host at the seller's end, if the first hash value is not set first, when the first or second unlocking passphrase is detected, the detected The first unlocking passphrase or the second unlocking passphrase is sent to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract that has not disclosed the first unlocking password or the second unlocking password, so that it will receive the first or second unlocking password that matches the first hash value. When the first unlocking passphrase or the second unlocking passphrase matching the second hash value, the asset pass, debt pass, digital currency or payment under custody The payment pass is sent to the buyer's host, the lender's host or the seller's host, and when the detected first unlocking passphrase or second unlocking passphrase is sent to the lending relationship smart contract, the lending status of the lending relationship smart contract is allowed It is recorded that the loan has been executed.

本發明所揭露之系統與方法如上,與先前技術的差異在於本發明是透過在區塊鏈網路提供買方端主機、借出端主機、賣方端主機及中介端主機,其中買方端主機與賣方端主機為交付關係,買方端主機與借出端主機為借貸關係,借出端主機與賣方端主機為支付關係,接著當買方端主機進行借貸消費時,使用智慧合約託管數位貨幣及通證,並且在偵測到賣方端主機交付資產給買方端主機後,再由借出端主機向賣方端主機進行支付,以及允許中介端主機仲裁交易。The system and method disclosed in the present invention are as above. The difference from the prior art is that the present invention provides the buyer-side host, lending-side host, seller-side host, and intermediary-side host on the blockchain network, wherein the buyer-side host and the seller The host at the end is a delivery relationship, the host at the buyer’s end and the host at the lending end are in a lending relationship, and the host at the lending end is in a payment relationship with the seller’s host. Then when the buyer’s host performs loan and consumption, the smart contract is used to host the digital currency and tokens. And after detecting that the seller-side host has delivered the assets to the buyer-side host, the lending-side host will then make payment to the seller-side host, and allow the intermediary-side host to arbitrate the transaction.

透過上述的技術手段,本發明可以達成提高借貸用途的透明性及真實性之技術功效。Through the above-mentioned technical means, the present invention can achieve the technical effect of improving the transparency and authenticity of lending applications.

以下將配合圖式及實施例來詳細說明本發明之實施方式,藉此對本發明如何應用技術手段來解決技術問題並達成技術功效的實現過程能充分理解並據以實施。The following describes the implementation of the present invention in detail with the drawings and embodiments, so as to fully understand and implement the implementation process of how the present invention uses technical means to solve technical problems and achieve technical effects.

在說明本發明所揭露之基於區塊鏈與智慧合約的多方借貸消費系統及其方法之前,先對本發明所自行定義的名詞作說明,本發明所述的「智慧合約」、「借貸關係智慧合約」、「交付關係智慧合約」及「支付關係智慧合約」均是指發布(Deploy)在區塊鏈網路上的智慧合約(Smart Contract)。實際上,所述智慧合約是指依據既定的條件及傳輸的資訊來驅動執行指令的電腦程式,具體而言,所述智慧合約係透過程式語言,例如:Solidity、Serpent、LLL、EtherScript、Sidechain等等來撰寫,其可包含各種不同的函式(Function)、事件(Event)、參數狀態等等,以「Ethereum」的環境為例,其智慧合約是經編譯後得到二進位編碼及應用二進位介面(Application Binary Interface, ABI),以便將智慧合約廣播至區塊鏈網路,等候礦工(Miner)或驗證者(Validator)將智慧合約放上區塊鏈並得到相應的地址(或稱為合約地址),至此即透過區塊鏈交易完成智慧合約的發布。之後,各節點主機便可根據此地址執行相應的智慧合約,並且藉由不同的指令來改變智慧合約在區塊鏈上的狀態以及偵測事件是否被觸發。另外,所述「債權通證」、「支付通證」及「資產通證」等等,均是指運行在區塊鏈網路上的「通證」(Token)。在實際實施上,這些通證可透過各種標準,如:「ERC20」、「ERC721」等等來實現,也就是說,以智慧合約建立運行在區塊鏈,並且能夠透過區塊鏈交易進行轉移的通證。Before describing the multi-party lending and consumption system and method based on the blockchain and smart contract disclosed in the present invention, the self-defined terminology of the present invention will be explained. "," "Delivery Relationship Smart Contract" and "Payment Relationship Smart Contract" all refer to the smart contract (Deploy) on the blockchain network (Smart Contract). In fact, the smart contract refers to a computer program that drives the execution of instructions based on established conditions and transmitted information. Specifically, the smart contract uses programming languages such as Solidity, Serpent, LLL, EtherScript, Sidechain, etc. It can include various functions, events, parameter states, etc. Take the environment of "Ethereum" as an example, the smart contract is compiled to get binary code and apply binary Interface (Application Binary Interface, ABI) to broadcast the smart contract to the blockchain network, waiting for the miner or validator to put the smart contract on the blockchain and get the corresponding address (or contract Address), so far, the release of the smart contract is completed through the blockchain transaction. After that, each node host can execute the corresponding smart contract according to this address, and use different commands to change the state of the smart contract on the blockchain and whether the detection event is triggered. In addition, the "debt pass", "payment pass" and "asset pass", etc., all refer to the "Token" (Token) running on the blockchain network. In actual implementation, these tokens can be realized through various standards, such as: "ERC20", "ERC721", etc., that is to say, they are built and run on the blockchain with smart contracts and can be transferred through blockchain transactions. Of tokens.

以下配合圖式對本發明基於區塊鏈與智慧合約的多方借貸消費系統及其方法做進一步說明,請先參閱「第1圖」,「第1圖」為本發明基於區塊鏈與智慧合約的多方借貸消費系統的第一實施例之系統方塊圖,應用在多個節點主機組成的區塊鏈網路100,此系統包含:買方端主機110、借出端主機120、賣方端主機130及中介端主機140。其中,買方端主機110作為節點主機其中之一,所述買方端主機110用以在包含借貸訊息的智慧合約成功發布於區塊鏈網路100之後,允許將債權通證傳送至智慧合約以進行託管。在實際實施上,所述節點主機可為具有網路功能的計算機裝置,如:個人電腦、筆記型電腦、伺服器等等,而且彼此之間透過點對點(Peer to Peer, P2P)方式相互連線以組成區塊鏈網路100。因此,買方端主機110即是位於買方(或稱為申貸方)的計算機裝置,買方依照其消費應支付的量而與借出方(或稱為放貸方)成立借貸關係。另外,所述智慧合約可由買方端主機110、借出端主機120、賣方端主機130及中介端主機140中的任一方建立並發布在區塊鏈網路100,至於判斷智慧合約是否成功發布可以透過偵測其智慧合約的合約地址是否存在來實現,倘若存在代表成功發布,反之則代表尚未成功發布。The following diagrams will further illustrate the multi-party lending and consumption system and method of the present invention based on blockchain and smart contracts. Please refer to "Figure 1" first. The system block diagram of the first embodiment of the multi-party lending and consumption system is applied to a blockchain network 100 composed of multiple node hosts. This system includes: a buyer-side host 110, a lending-side host 120, a seller-side host 130, and an intermediary端host 140. Among them, the buyer host 110 is one of the node hosts, and the buyer host 110 is used to allow the credit certificate to be sent to the smart contract after the smart contract containing the loan information is successfully published on the blockchain network 100. Hosting. In actual implementation, the node host may be a computer device with network functions, such as a personal computer, a notebook computer, a server, etc., and they are connected to each other through a peer-to-peer (P2P) method. To form a blockchain network 100. Therefore, the buyer-side host 110 is a computer device located at the buyer (or called the lender), and the buyer establishes a loan relationship with the lender (or called the lender) according to the amount payable for consumption. In addition, the smart contract can be established and published on the blockchain network 100 by any one of the buyer's host 110, the lender's host 120, the seller's host 130, and the intermediary host 140. As for determining whether the smart contract is successfully issued, it can be It is achieved by detecting whether the contract address of its smart contract exists. If it exists, it means that it has been successfully released, otherwise it means it has not been successfully released.

借出端主機120作為節點主機其中之一,所述借出端主機120在智慧合約成功發布後,將數位貨幣或支付通證傳送至智慧合約以進行託管。實際上,借出端主機120是位於借出方的計算機裝置,能夠依照借貸關係的量交付數位貨幣或通證給賣方。The lending host 120 serves as one of the node hosts. After the smart contract is successfully issued, the lending host 120 transmits the digital currency or payment pass to the smart contract for custody. In fact, the lending end host 120 is a computer device located on the lending side, and can deliver digital currency or tokens to the seller in accordance with the amount of the lending relationship.

賣方端主機130作為節點主機其中之一,所述賣方端主機130在智慧合約成功發布後,將資產通證傳送至智慧合約以進行託管。實際上,賣方端主機130是位於賣方的計算機裝置,此賣方會將應交付的商品/服務交付給買方。The seller-side host 130 serves as one of the node hosts. After the smart contract is successfully issued, the seller-side host 130 transmits the asset certificate to the smart contract for custody. In fact, the seller-side host 130 is a computer device located in the seller, and the seller will deliver the goods/services that should be delivered to the buyer.

中介端主機140作為節點主機其中之一,所述中介端主機140用以允許直接觸發執行智慧合約的交付函式及退還函式。換句話說,中介端主機140是位於中介方的計算機裝置,其作為監督角色,用以在發生交易糾紛時進行仲裁,假設仲裁結果為「需交付」則直接執行智慧合約的交付函式,反之,假設仲裁結果為「取消交易」,則將直接執行智慧合約的退還函式。The intermediary host 140 serves as one of the node hosts, and the intermediary host 140 is used to directly trigger the execution of the delivery function and the return function of the smart contract. In other words, the intermediary host 140 is a computer device located on the intermediary party, which acts as a supervisory role for arbitration in the event of a transaction dispute. If the arbitration result is "delivery required", it will directly execute the delivery function of the smart contract, and vice versa. , Assuming that the result of the arbitration is "Cancel transaction", the refund function of the smart contract will be executed directly.

承上所述,當資產通證以及數位貨幣或支付通證皆已託管於智慧合約時,允許買方端主機110、借出端主機120、賣方端主機130及中介端主機140其中之一觸發執行智慧合約的交付函式,使智慧合約將資產通證轉移至買方端主機110、將數位貨幣或支付通證轉移至賣方端主機130,以及在借貸訊息中記錄為借貸已執行,或是在智慧合約存在託管的債權通證時,將債權通證轉移至借出端主機120,當交付函式執行結束後,買方端主機110根據借貸訊息及借出端主機120持有的債權通證或兩者任一計算還款數額,以便向借出端主機120進行還款。As mentioned above, when asset tokens and digital currency or payment tokens have been hosted in the smart contract, one of the buyer’s host 110, the lender host 120, the seller host 130, and the intermediary host 140 is allowed to trigger execution The delivery function of the smart contract enables the smart contract to transfer the asset certificate to the buyer’s host 110, transfer the digital currency or payment certificate to the seller’s host 130, and record in the loan message as the loan has been executed, or in the wisdom When there is a custodial credit card in the contract, the credit card will be transferred to the lending host 120. When the delivery function is completed, the buyer host 110 will use the loan information and the credit card held by the lending host 120 or two Anyone can calculate the repayment amount so as to repay the loan to the lending-end host 120.

請參閱「第2圖」,「第2圖」為本發明基於區塊鏈與智慧合約的多方借貸消費方法的第一實施例之方法流程圖,應用在由多個節點主機組成的區塊鏈網路100,其步驟包括:提供分別作為節點主機其中之一的買方端主機110、借出端主機120、賣方端主機130及中介端主機140,其中,中介端主機140允許直接觸發執行智慧合約的交付函式及退還函式(步驟210);在包含借貸訊息的智慧合約成功發布於區塊鏈網路100之後,允許買方端主機110將債權通證傳送至智慧合約以進行託管、賣方端主機130將資產通證傳送至智慧合約以進行託管,以及借出端主機120將數位貨幣或支付通證傳送至智慧合約以進行託管(步驟220);當債權通證及資產通證,以及數位貨幣或支付通證皆已託管於智慧合約時,允許買方端主機110、借出端主機120、賣方端主機130及中介端主機140其中之一觸發執行智慧合約的交付函式,使智慧合約將資產通證轉移至買方端主機110、將數位貨幣或支付通證轉移至賣方端主機130,以及在借貸訊息中記錄為借貸已執行,或在智慧合約存在託管的所述債權通證時,將債權通證轉移至借出端主機120(步驟230);以及在交付函式執行結束後,買方端主機110根據借貸訊息及借出端主機120持有的債權通證或兩者任一計算還款數額,以便向借出端主機120進行還款(步驟240)。透過上述步驟,即可透過在區塊鏈網路100提供買方端主機110、借出端主機120、賣方端主機130及中介端主機140,其中買方端主機110與賣方端主機130為交付關係,買方端主機110與借出端主機120為借貸關係,借出端主機120與賣方端主機130為支付關係,接著當買方端主機110進行借貸消費時,使用智慧合約託管數位貨幣及通證,並且在偵測到賣方端主機130交付資產給買方端主機110後,再由借出端主機120向賣方端主機130進行支付,以及允許中介端主機140仲裁交易。Please refer to "Figure 2". "Figure 2" is a flowchart of the first embodiment of the multi-party lending and consumption method based on the blockchain and smart contract of the present invention. It is applied to a blockchain composed of multiple node hosts. The network 100 includes the steps of providing a buyer-side host 110, a lending-side host 120, a seller-side host 130, and an intermediary-side host 140 as one of the node hosts, wherein the intermediary-side host 140 allows the execution of smart contracts to be directly triggered The delivery function and return function (step 210); after the smart contract containing the loan information is successfully published on the blockchain network 100, the buyer-side host 110 is allowed to send the credit certificate to the smart contract for custody and the seller-side The host 130 transmits the asset certificate to the smart contract for custody, and the lending host 120 transmits the digital currency or payment certificate to the smart contract for custody (step 220); when the debt certificate and asset certificate, and digital When currency or payment tokens have been hosted in the smart contract, one of the buyer’s host 110, lender host 120, seller host 130, and intermediary host 140 is allowed to trigger the execution of the delivery function of the smart contract, so that the smart contract will be Asset tokens are transferred to the buyer’s host 110, digital currency or payment tokens are transferred to the seller’s host 130, and the loan is recorded in the loan message as the loan has been executed, or when the smart contract has the custodial debt token, the The debt certificate is transferred to the lending host 120 (step 230); and after the execution of the delivery function, the buyer host 110 calculates the repayment based on the loan information and the debt certificate held by the lending host 120 or either The amount of the loan is to be repaid to the lending-end host 120 (step 240). Through the above steps, the buyer host 110, the lender host 120, the seller host 130 and the intermediary host 140 can be provided on the blockchain network 100. The buyer host 110 and the seller host 130 are in a delivery relationship. The buyer-side host 110 and the lending-side host 120 have a lending relationship, and the lending-side host 120 and the seller-side host 130 have a payment relationship. Then, when the buyer-side host 110 performs loan and consumption, the smart contract is used to host the digital currency and tokens, and After detecting that the seller-side host 130 has delivered the assets to the buyer-side host 110, the lending-side host 120 then makes a payment to the seller-side host 130 and allows the intermediary-side host 140 to arbitrate the transaction.

另外,在步驟240之後,當超過逾時時間未執行交付函式時,由智慧合約觸發執行退還函式,或由買方端主機110、借出端主機120、賣方端主機130或中介端主機140觸發執行此退還函式,用以允許買方端主機110取回託管的債權通證、允許賣方端主機130取回託管的資產通證,以及允許借出端主機120取回託管的數位貨幣或支付通證(步驟250)。In addition, after step 240, when the delivery function is not executed within the timeout period, the smart contract triggers the execution of the refund function, or the buyer's host 110, the lender's host 120, the seller's host 130, or the intermediary host 140 Trigger the execution of this refund function to allow the buyer's host 110 to retrieve the escrow token, allow the seller's host 130 to retrieve the custodial asset token, and allow the lender host 120 to retrieve the escrowed digital currency or payment Pass (step 250).

接著,請參閱「第3圖」,「第3圖」為本發明基於區塊鏈與智慧合約的多方借貸消費系統的第二實施例之系統方塊圖,應用在多個節點主機組成的區塊鏈網路300,此系統包含:買方端主機310、借出端主機320、賣方端主機330及中介端主機340。其中,買方端主機310作為節點主機其中之一,所述買方端主機310用以在借貸關係智慧合約發布於區塊鏈網路300之後,允許在借貸關係智慧合約中設定第一雜湊值,其中第一雜湊值係由第一解鎖密語進行雜湊計算所生成。舉例來說,假設第一解鎖密語為「abc」,那麼可透過雜湊函式(如:MD5、SHA1、SHA256等等)對第一解鎖密語進行雜湊計算,用以生成相應的第一雜湊值。在實際實施上,借貸關係智慧合約中需記錄使用的雜湊函式、借出端主機地址、欲借款量及賣方端主機地址等等,而且所述借貸關係智慧合約可以由買方端主機310或借出端主機320建立並發布在區塊鏈網路300。另外,除了買方端主機310可設定第一雜湊值之外,借出端主機320及賣方端主機330同樣也可以設定第一雜湊值,只不過差異在於借出端主機320是在支付關係智慧合約中設定第一雜湊值,而賣方端主機330則是在交付關係智慧合約中設定第一雜湊值。特別要說明的是,當買方端主機310、借出端主機320及賣方端主機330其中之一成為最早在智慧合約中設定第一雜湊值的一方,而且中介端主機340也在同一個智慧合約設定第二雜湊值之後,其餘二方會使尚未設定第一雜湊值及第二雜湊值的另外二個智慧合約跟隨相同的設定,換句話說,三個智慧合約中的第一雜湊值及第二雜湊值均會相同。稍後將分別以買方端主機310、借出端主機320及賣方端主機330成為最早設定第一雜湊值的一方為例來做進一步說明。Next, please refer to "Figure 3". "Figure 3" is the system block diagram of the second embodiment of the multi-party lending and consumption system based on blockchain and smart contracts of the present invention, which is applied to a block composed of multiple node hosts The chain network 300 includes a host 310 at the buyer end, a host 320 at the lending end, a host 330 at the seller end, and a host 340 at the intermediary end. The buyer host 310 is one of the node hosts, and the buyer host 310 is used to allow the first hash value to be set in the lending relationship smart contract after the lending relationship smart contract is published on the blockchain network 300, where The first hash value is generated by hash calculation of the first unlocking cipher. For example, assuming that the first unlocking passphrase is "abc", the hashing function (such as MD5, SHA1, SHA256, etc.) can be used to hash the first unlocking passphrase to generate the corresponding first hash value. In actual implementation, the smart contract for the lending relationship needs to record the hash function used, the host address of the lender, the amount to be borrowed and the address of the seller’s host, etc., and the smart contract for the lending relationship can be used by the buyer’s host 310 or borrowing The output host 320 is established and published on the blockchain network 300. In addition, in addition to the buyer-side host 310 that can set the first hash value, the lending-side host 320 and the seller-side host 330 can also set the first hash value. The only difference is that the lending-side host 320 is in the payment relationship smart contract. The first hash value is set in, and the seller-side host 330 sets the first hash value in the delivery relationship smart contract. In particular, when one of the buyer-side host 310, the lending-side host 320, and the seller-side host 330 becomes the first party to set the first hash value in the smart contract, and the intermediary host 340 is also in the same smart contract After setting the second hash value, the other two parties will make the other two smart contracts that have not yet set the first hash value and the second hash value to follow the same settings. In other words, the first hash value and the first hash value of the three smart contracts Both hash values will be the same. A further explanation will be given later by taking the buyer-side host 310, the lending-side host 320, and the seller-side host 330 as the first party to set the first hash value as an example.

借出端主機320作為節點主機其中之一,此借出端主機320用以在支付關係智慧合約發布於區塊鏈網路300之後,允許在支付關係智慧合約設定第一雜湊值,並且將數位貨幣或支付通證傳送至支付關係智慧合約以進行託管。在實際實施上,支付關係智慧合約包含賣方端主機地址及欲支付量,而且所述支付關係智慧合約可由借出端主機320或賣方端主機330建立並發布在區塊鏈網路300。The lending host 320 is one of the node hosts. The lending host 320 is used to allow the payment relationship smart contract to set the first hash value after the payment relationship smart contract is published on the blockchain network 300, and the digital The currency or payment pass is sent to the payment relationship smart contract for custody. In actual implementation, the payment relationship smart contract includes the seller's host address and the amount to be paid, and the payment relationship smart contract can be established by the lender host 320 or the seller host 330 and published on the blockchain network 300.

賣方端主機330作為節點主機其中之一,所述賣方端主機330用以在交付關係智慧合約發布於區塊鏈網路300之後,允許在交付關係智慧合約設定第一雜湊值,並且將資產通證傳送至交付關係智慧合約以進行託管。在實際實施上,所述交付關係智慧合約可由買方端主機310或賣方端主機330建立並發布在區塊鏈網路300,假設交付關係智慧合約是由賣方端主機330建立並發布的情況下,此交付關係智慧合約可包含買方端主機地址、欲購買資產及應支付量,反之,假設所述交付關係智慧合約是由買方端主機310建立並發布的情況下,則前述交付關係智慧合約所包含的買方端主機地址則需改為賣方端主機地址,換句話說,交付關係智慧合約若由賣方建立則需在其中指定買方,反之若由買方建立則需在其中指定賣方。The seller-side host 330 is one of the node hosts. The seller-side host 330 is used to allow the first hash value to be set in the delivery relationship smart contract after the delivery relationship smart contract is published on the blockchain network 300, and to transfer the asset The certificate is sent to the delivery relationship smart contract for custody. In actual implementation, the delivery relationship smart contract can be established and published on the blockchain network 300 by the buyer-side host 310 or the seller-side host 330. Assuming that the delivery relationship smart contract is established and released by the seller-side host 330, This delivery relationship smart contract can include the address of the buyer’s host, the assets to be purchased and the amount payable. On the contrary, assuming that the delivery relationship smart contract is established and issued by the buyer’s host 310, the aforementioned delivery relationship smart contract includes The host address of the buyer side needs to be changed to the host address of the seller side. In other words, if the delivery relationship smart contract is established by the seller, the buyer needs to be specified in it, and if it is established by the buyer, the seller needs to be specified in it.

中介端主機340作為節點主機其中之一,所述中介端主機340用以在已設定第一雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約中設定第二雜湊值,此第二雜湊值係由第二解鎖密語進行雜湊計算所生成。假設第二解鎖密語為「123」,那麼可透過雜湊函式對第二解鎖密語進行雜湊計算,用以生成相應的第二雜湊值,而借貸關係智慧合約中也會記錄第二雜湊值透過哪一種雜湊函式所生成。在實際實施上,中介端主機340可以透過提供第二解鎖密語來使交付關係智慧合約執行交付流程,以及使支付關係智慧合約執行支付流程,除此之外,當借貸關係智慧合約、交付關係智慧合約及支付關係智慧合約分別具有一個逾時時間時,例如:借貸關係智慧合約具有第一逾時時間、交付關係智慧合約具有第二逾時時間及支付關係智慧合約具有第三逾時時間,中介端主機340也可在買方端主機310不提供第一解鎖密語的情況下,同樣不提供第二解鎖密語,進而使交付關係智慧合約無法在第二逾時時間內接收到第一解鎖密語及第二解鎖密語,導致賣方端主機330能夠取回託管的資產通證,以及使支付關係智慧合約無法在第三逾時時間內接收到第一解鎖密語及第二解鎖密語,導致借出端主機320能夠取回託管的數位貨幣或支付通證,甚至在已託管債權通證的情況下,使借貸關係智慧合約無法在第一逾時時間內接收到第一解鎖密語及第二解鎖密語,導致買方端主機310能夠從借貸關係智慧合約取回託管的債權通證。The intermediary host 340 serves as one of the node hosts. The intermediary host 340 is used to set the second hash value in the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract for which the first hash value has been set. The second hash value is generated by the hash calculation of the second unlocking cipher. Assuming that the second unlocking passphrase is "123", then the second unlocking passphrase can be hashed through the hash function to generate the corresponding second hash value, and the smart contract for the loan relationship will also record where the second hash value passes. Generated by a hash function. In actual implementation, the intermediary host 340 can enable the delivery relationship smart contract to execute the delivery process and the payment relationship smart contract to execute the payment process by providing the second unlocking secret. The contract and the payment relationship smart contract each have a time-out time. For example, the lending relationship smart contract has a first time-out time, the delivery relationship smart contract has a second time-out time, and the payment relationship smart contract has a third time-out time. Intermediary The end host 340 may also not provide the second unlocking passphrase when the buyer end host 310 does not provide the first unlocking passphrase, so that the delivery relationship smart contract cannot receive the first unlocking passphrase and the first unlocking passphrase within the second timeout period. 2. Unlocking the secret words, causing the seller-side host 330 to be able to retrieve the asset tokens under custody, and preventing the payment relationship smart contract from receiving the first unlocking secret words and the second unlocking secret words within the third timeout period, resulting in the lending-side host 320 The ability to retrieve the escrow digital currency or payment token, and even in the case of the custodial debt token, prevents the smart contract of the lending relationship from receiving the first unlocking passphrase and the second unlocking passphrase within the first timeout period, causing the buyer The end host 310 can retrieve the custodial credit certificate from the smart contract of the lending relationship.

承上所述,在買方端主機310、借出端主機320及賣方端主機330之中,非最早設定第一雜湊值的二者會從已設定第一雜湊值及第二雜湊值的智慧合約中獲得第一雜湊值及第二雜湊值,再將獲得的第一雜湊值及第二雜湊值設定在尚未設定第一雜湊值及第二雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約之中,在進行設定時,借貸關係智慧合約允許託管來自買方端主機310的債權通證,交付關係智慧合約同時託管來自賣方端主機330的資產通證,支付關係智慧合約同時託管來自借出端主機320的數位貨幣或支付通證。接著,在確定執行交易時,由最早設定第一雜湊值的買方端主機310、賣方端主機330或借出端主機320將第一解鎖密語傳送至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,或由中介端主機340傳送第二解鎖密語至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機310、借出端主機320或賣方端主機330,並且公開接收到的第一解鎖密語或第二解鎖密語。接下來,在買方端主機310、借出端主機320及賣方端主機330之中,非最早設定第一雜湊值的二者,在偵測到公開的第一解鎖密語或第二解鎖密語時,允許將偵測到的第一解鎖密語或第二解鎖密語傳送至未公開第一解鎖密語或第二解鎖密語的交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使其在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機310、借出端主機320或賣方端主機330,以及當偵測到的第一解鎖密語或第二解鎖密語傳送至借貸關係智慧合約時,允許將借貸關係智慧合約的借貸狀態記錄為借貸已執行或將託管的債權通證傳送至借出端主機320。In summary, among the buyer-side host 310, the lending-side host 320, and the seller-side host 330, the two that is not the earliest set of the first hash value will be converted from the smart contract that has set the first hash value and the second hash value. Obtain the first hash value and the second hash value, and then set the obtained first hash value and second hash value in the lending relationship smart contract, payment relationship smart contract or delivery for which the first and second hash values have not been set In the relationship smart contract, when setting, the lending relationship smart contract allows the escrow of the credit certificate from the buyer's host 310, the delivery relationship smart contract also escrows the asset certificate from the seller's host 330, and the payment relationship smart contract also escrows from The digital currency or payment pass of the host 320 on the lending side. Then, when the transaction is determined to be executed, the buyer-side host 310, the seller-side host 330, or the lending-side host 320 that sets the first hash value first transmits the first unlocking secret to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship Smart contract, or the intermediary host 340 sends the second unlocking secret to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract, so that the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract will match the first When a hash value of the first unlocking passphrase or a second hashing value of the second unlocking passphrase is matched, the custodial asset pass, debt pass, digital currency or payment pass is sent to the buyer's host 310 and the lender's host 320 Or the seller's host 330 and publish the received first unlocking secret word or second unlocking secret word. Next, among the buyer-side host 310, the lending-side host 320, and the seller-side host 330, which are not the earliest set of the first hash value, when the public first unlocking passphrase or the second unlocking passphrase is detected, It is allowed to send the detected first unlocking password or second unlocking password to the delivery relationship smart contract, lending relationship smart contract, or payment relationship smart contract that has not disclosed the first unlocking password or the second unlocking password, so that it can be matched when it is received When the first unlocking passphrase of the first hash value or the second unlocking passphrase that matches the second hash value, the escrow asset pass, debt pass, digital currency or payment pass are sent to the buyer's host 310 and the lender's host 320 or the seller’s host 330, and when the detected first unlocking passphrase or second unlocking passphrase is transmitted to the lending relationship smart contract, it is allowed to record the lending status of the lending relationship smart contract as the loan executed or the escrow bond The certificate is sent to the lending end host 320.

以下分別以買方端主機310、借出端主機320及賣方端主機330成為最早設定第一雜湊值的一方為例,進一步說明多方(即:買方端主機310、借出端主機320、賣方端主機330及中介端340)之間的處理流程:In the following, the buyer-side host 310, the lending-side host 320, and the seller-side host 330 are the first to set the first hash value as an example to further illustrate the multiple parties (ie: the buyer-side host 310, the lending-side host 320, and the seller-side host). The processing flow between 330 and the intermediary end 340):

首先,以買方端主機310先在借貸關係智慧合約中設定第一雜湊值為例,中介端主機340會在同一個智慧合約中設定第二雜湊值,當進行交易時,買方端主機310會將第一解鎖密語傳送至交付關係智慧合約,以便對第一解鎖密語進行雜湊運算,用以與交付關係智慧合約中的第一雜湊值進行比對,當比對相符便在交付關係智慧合約公開第一解鎖密語,同時交付託管的資產通證。當借出端主機320及賣方端主機330偵測到交付關係智慧合約公開的第一解鎖密語時,借出端主機320會取得此第一解鎖密語以提交至借貸關係智慧合約解鎖,以便獲得借貸關係智慧合約託管的債權通證或將借貸關係智慧合約的借貸狀態記錄為借貸已執行;賣方端主機330則會取得此第一解鎖密語以提交至支付關係智慧合約解鎖,以便獲得支付關係智慧合約託管的數位貨幣或支付通證。此處所述的解鎖是指解開雜湊鎖定(Hash-locking),使智慧合約交付/支付其託管的資產、通證或數位貨幣以完成交易。First, taking the buyer-side host 310 first set the first hash value in the lending relationship smart contract, the intermediary host 340 will set the second hash value in the same smart contract. When a transaction is performed, the buyer-side host 310 will The first unlocking passphrase is sent to the delivery relationship smart contract, so that the first unlocking passphrase can be hashed and compared with the first hash value in the delivery relationship smart contract. When the comparison matches, it will be published in the delivery relationship smart contract. Once the secret words are unlocked, the asset tokens under custody are delivered at the same time. When the lending-side host 320 and the seller-side host 330 detect the first unlocking password disclosed in the delivery relationship smart contract, the lending-side host 320 will obtain the first unlocking password and submit it to the lending relationship smart contract for unlocking in order to obtain the loan The credit certificate hosted by the relationship smart contract may record the loan status of the lending relationship smart contract as the loan executed; the seller-side host 330 will obtain this first unlocking secret and submit it to the payment relationship smart contract for unlocking, so as to obtain the payment relationship smart contract Custodial digital currency or payment pass. The unlocking mentioned here refers to unlocking the hash-locking, so that the smart contract can deliver/pay the assets, tokens or digital currency under its custody to complete the transaction.

接著,以借出端主機320先在支付關係智慧合約中設定第一雜湊值為例,中介端主機340會在此支付關係智慧合約中設定第二雜湊值,當進行交易時,借出端主機320會將第一解鎖密語傳送至借貸關係智慧合約,以便對第一解鎖密語進行雜湊運算,用以與借貸關係智慧合約中的第一雜湊值進行比對,當比對相符便在借貸關係智慧合約公開第一解鎖密語,同時獲得借貸關係智慧合約託管的債權通證或將借貸關係智慧合約的借貸狀態記錄為借貸已執行。當買方端主機310及賣方端主機330偵測到借貸關係智慧合約公開的第一解鎖密語時,買方端主機310會取得此第一解鎖密語以提交至交付關係智慧合約解鎖,以便獲得交付關係智慧合約託管的資產通證;賣方端主機330則會取得此第一解鎖密語以提交至支付關係智慧合約解鎖,以便獲得支付關係智慧合約託管的數位貨幣或支付通證。Next, taking the lending host 320 first set the first hash value in the payment relationship smart contract, the intermediary host 340 will set the second hash value in the payment relationship smart contract. When the transaction is performed, the lending host 320 will send the first unlocking password to the lending relationship smart contract to perform a hash operation on the first unlocking password for comparison with the first hash value in the lending relationship smart contract. When the comparison matches, it will be in the lending relationship wisdom The contract discloses the first unlocking cipher, and at the same time obtains the credit certificate hosted by the smart contract of the lending relationship or records the lending status of the smart contract of the lending relationship as the lending has been executed. When the buyer-side host 310 and the seller-side host 330 detect the first unlocking password disclosed in the lending relationship smart contract, the buyer-side host 310 will obtain the first unlocking password and submit it to the delivery relationship smart contract for unlocking, so as to obtain the delivery relationship wisdom The asset certificate under contract escrow; the seller-side host 330 will obtain this first unlocking secret and submit it to the payment relationship smart contract for unlocking, so as to obtain the digital currency or payment certificate escrowed by the payment relationship smart contract.

最後,以賣方端主機330先在交付關係智慧合約中設定第一雜湊值為例,中介端主機340會在此交付關係智慧合約中設定第二雜湊值,當進行交易時,賣方端主機330會將第一解鎖密語傳送至支付關係智慧合約,以便對第一解鎖密語進行雜湊運算,用以與支付關係智慧合約中的第一雜湊值進行比對,當比對相符便在支付關係智慧合約公開第一解鎖密語,同時獲得支付關係智慧合約託管的數位貨幣或支付通證。當借出端主機320及買方端主機310偵測到支付關係智慧合約公開的第一解鎖密語時,借出端主機320會取得此第一解鎖密語以提交至借貸關係智慧合約解鎖,以便獲得借貸關係智慧合約託管的債權通證或將借貸關係智慧合約的借貸狀態記錄為借貸已執行;買方端主機310則會取得此第一解鎖密語以提交至交付關係智慧合約解鎖,以便獲得交付關係智慧合約託管的資產通證。Finally, taking the seller-side host 330 first set the first hash value in the delivery relationship smart contract, the intermediary host 340 will set the second hash value in the delivery relationship smart contract. When a transaction is performed, the seller-side host 330 will Send the first unlocking passphrase to the payment relationship smart contract so that the first unlocking passphrase can be hashed for comparison with the first hash value in the payment relationship smart contract. When the comparison matches, it will be disclosed in the payment relationship smart contract First unlock the secret words, and at the same time obtain the digital currency or payment token escrowed by the smart contract of the payment relationship. When the lending-side host 320 and the buyer-side host 310 detect the first unlocking password disclosed in the payment relationship smart contract, the lending-side host 320 will obtain the first unlocking password and submit it to the lending relationship smart contract for unlocking in order to obtain the loan The credit certificate hosted by the relationship smart contract may record the loan status of the lending relationship smart contract as the loan executed; the buyer-side host 310 will obtain this first unlocking secret and submit it to the delivery relationship smart contract for unlocking, so as to obtain the delivery relationship smart contract Custody of asset certificates.

請參閱「第4A圖」及「第4B圖」,「第4A圖」及「第4B圖」為本發明基於區塊鏈與智慧合約的多方借貸消費方法的第二實施例之方法流程圖,應用在由多個節點主機組成的區塊鏈網路300,其步驟包括:提供買方端主機310、借出端主機320、賣方端主機330及中介端主機340以分別作為節點主機其中之一(步驟410);買方端主機310或賣方端主機330在區塊鏈網路300發布交付關係智慧合約、買方端主機310或借出端主機320在區塊鏈網路300發布借貸關係智慧合約,借出端主機320或賣方端主機330在區塊鏈網路300發布支付關係智慧合約(步驟420);在交付關係智慧合約、借貸關係智慧合約及支付關係智慧合約皆成功發布後,由所述買方端主機310在借貸關係智慧合約中設定第一雜湊值,或由借出端主機320在支付關係智慧合約中設定第一雜湊值,或由賣方端主機330在交付關係智慧合約中設定第一雜湊值,其中第一雜湊值係由第一解鎖密語進行雜湊計算所生成(步驟430);中介端主機340在已設定第一雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約中設定第二雜湊值,所述第二雜湊值係由第二解鎖密語進行雜湊計算所生成(步驟440);在買方端主機310、借出端主機320及賣方端主機330之中,非最早設定第一雜湊值的二者,將第一雜湊值及第二雜湊值設定在尚未設定第一雜湊值及第二雜湊值的借貸關係智慧合約、支付關係智慧合約或交付關係智慧合約之中,其中,在進行設定時,借貸關係智慧合約允許託管來自買方端主機310的債權通證,交付關係智慧合約同時託管來自賣方端主機330的資產通證,支付關係智慧合約同時託管來自借出端主機320的數位貨幣或支付通證(步驟450);在確定執行交易時,由最早設定第一雜湊值的買方端主機310、賣方端主機330或借出端主機320將第一解鎖密語傳送至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,或由中介端主機340傳送第二解鎖密語至交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機310、借出端主機320或賣方端主機330,並且公開接收到的第一解鎖密語或第二解鎖密語(步驟460);在買方端主機310、借出端主機320及賣方端主機330之中,非最早設定第一雜湊值的二者,在偵測到公開的第一解鎖密語或第二解鎖密語時,允許將偵測到的第一解鎖密語或第二解鎖密語傳送至未公開第一解鎖密語或第二解鎖密語的交付關係智慧合約、借貸關係智慧合約或支付關係智慧合約,使其在接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的資產通證、債權通證、數位貨幣或支付通證傳送至買方端主機310、借出端主機320或賣方端主機330,以及當偵測到的第一解鎖密語或第二解鎖密語傳送至借貸關係智慧合約時,允許以將借貸關係智慧合約的借貸狀態記錄為借貸已執行(步驟470)。透過上述步驟,即可透過在區塊鏈網路300提供買方端主機310、借出端主機320、賣方端主機330及中介端主機340,其中買方端主機310與賣方端主機330為交付關係,買方端主機310與借出端主機320為借貸關係,借出端主機320與賣方端主機330為支付關係,接著當買方端主機310進行借貸消費時,使用智慧合約託管數位貨幣及通證,並且在偵測到賣方端主機330交付資產給買方端主機310後,再由借出端主機320向賣方端主機330進行支付,以及允許中介端主機340仲裁交易。Please refer to "Figure 4A" and "Figure 4B". "Figure 4A" and "Figure 4B" are the method flowcharts of the second embodiment of the multi-party lending and consumption method based on blockchain and smart contracts in the present invention. Applied to a blockchain network 300 composed of multiple node hosts, the steps include: providing a buyer-side host 310, a lending-side host 320, a seller-side host 330, and an intermediary-side host 340 as one of the node hosts ( Step 410); the buyer-side host 310 or the seller-side host 330 publishes the delivery relationship smart contract on the blockchain network 300, and the buyer-side host 310 or the lending-end host 320 publishes the lending relationship smart contract on the blockchain network 300, and borrow The output host 320 or the seller host 330 publishes the payment relationship smart contract on the blockchain network 300 (step 420); after the delivery relationship smart contract, the lending relationship smart contract, and the payment relationship smart contract are all successfully released, the buyer The host 310 sets the first hash value in the lending relationship smart contract, or the lending host 320 sets the first hash value in the payment relationship smart contract, or the seller host 330 sets the first hash value in the delivery relationship smart contract Value, where the first hash value is generated by the hash calculation of the first unlocking passphrase (step 430); the intermediary host 340 sets the first hash value in the lending relationship smart contract, payment relationship smart contract, or delivery relationship smart contract Set a second hash value, the second hash value is generated by the hash calculation of the second unlocking cipher (step 440); among the buyer-side host 310, the lending-side host 320, and the seller-side host 330, it is not the earliest setting For both the first hash value, the first hash value and the second hash value are set in the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract for which the first and second hash values have not been set, where , When setting up, the lending relationship smart contract allows the escrow of the credit certificate from the buyer's host 310, the delivery relationship smart contract also escrows the asset tokens from the seller's host 330, and the payment relationship smart contract also escrows from the lender's host 320 Digital currency or payment pass (step 450); when the transaction is determined to be executed, the buyer host 310, seller host 330, or lender host 320 that sets the first hash value first transmits the first unlocking secret to the delivery relationship Smart contract, lending relationship smart contract, or payment relationship smart contract, or the intermediary host 340 transmits the second unlocking secret to the delivery relationship smart contract, lending relationship smart contract, or payment relationship smart contract to make the delivery relationship smart contract, lending relationship smart contract Or when the payment relationship smart contract receives the first unlocking passphrase that matches the first hash value or the second unlocking passphrase that matches the second hash value, it sends the asset certificate, debt certificate, digital currency or payment certificate under custody to The buyer-side host 310, the lending-side host 320 or the seller-side host 330, and the received first unlocking secret word or the second unlocking secret word are disclosed (step 460); in the buyer's host 310, the borrowing Among the outgoing host 320 and the seller host 330, which are not the first to set the first hash value, when the first or second unlocking passphrase that is public is detected, the detected first unlocking passphrase is allowed to be changed Or the second unlocking password is sent to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract that has not disclosed the first unlocking password or the second unlocking password, so that it receives the first unlocking password or matching the first hash value. When matching the second unlocking passphrase of the second hash value, the escrow asset pass, debt pass, digital currency or payment pass are sent to the buyer's host 310, the lender's host 320 or the seller's host 330, and when investigating When the measured first unlocking password or second unlocking password is transmitted to the lending relationship smart contract, it is allowed to record the lending status of the lending relationship smart contract as the lending has been executed (step 470). Through the above steps, the buyer-side host 310, the lending-side host 320, the seller-side host 330, and the intermediary-side host 340 can be provided on the blockchain network 300, where the buyer-side host 310 and the seller-side host 330 have a delivery relationship. The buyer-side host 310 and the lending-side host 320 have a loan relationship, and the lending-side host 320 and the seller-side host 330 have a payment relationship. Then, when the buyer-side host 310 performs loan and consumption, the smart contract is used to host the digital currency and tokens, and After detecting that the seller-side host 330 has delivered the assets to the buyer-side host 310, the lending-side host 320 then makes payment to the seller-side host 330 and allows the intermediary-side host 340 to arbitrate the transaction.

另外,在步驟470之後,倘若在借貸關係智慧合約、支付關係智慧合約及交付關係智慧合約中分別設定有一個逾時時間,當未在此逾時時間內接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,允許賣方端主機330取回託管的資產通證、允許買方端主機310取回託管的債權通證,以及允許借出端主機320取回託管的數位貨幣或支付通證(步驟480)。換句話說,當超過逾時時間未收到匹配的解鎖密語,則各智慧合約會退還其託管的資產、通證或數位貨幣。In addition, after step 470, if an overtime time is set in the lending relationship smart contract, payment relationship smart contract, and delivery relationship smart contract respectively, when the first time matching the first hash value is not received within the timeout period When the unlocking passphrase or the second unlocking passphrase matching the second hash value is allowed, the seller-side host 330 is allowed to retrieve the escrowed asset token, the buyer-side host 310 is allowed to retrieve the escrowded credit token, and the lending-side host 320 is allowed to retrieve it Escrow digital currency or payment token (step 480). In other words, when the matching unlocking passphrase is not received after the expiration time, each smart contract will return the assets, tokens or digital currencies under its custody.

特別要說明的是,在實際實施上,本發明所述的各種主機皆可利用各種方式來實現,包含軟體、硬體或其任意組合,例如,在某些實施方式中,各主機可利用軟體(如:虛擬機器、容器等等)及硬體或其中之一來實現,除此之外,本發明亦可部分地或完全地基於硬體來實現,例如,系統中的一個或多個主機可以透過積體電路晶片、系統單晶片(System on Chip, SoC)、複雜可程式邏輯裝置(Complex Programmable Logic Device, CPLD)、現場可程式邏輯閘陣列(Field Programmable Gate Array, FPGA)等來實現。本發明可以是系統、方法及/或電腦程式。電腦程式可以包括電腦可讀儲存媒體,其上載有用於使處理器實現本發明的各個方面的電腦可讀程式指令,電腦可讀儲存媒體可以是可以保持和儲存由指令執行設備使用的指令的有形設備。電腦可讀儲存媒體可以是但不限於電儲存設備、磁儲存設備、光儲存設備、電磁儲存設備、半導體儲存設備或上述的任意合適的組合。電腦可讀儲存媒體的更具體的例子(非窮舉的列表)包括:硬碟、隨機存取記憶體、唯讀記憶體、快閃記憶體、光碟、軟碟以及上述的任意合適的組合。此處所使用的電腦可讀儲存媒體不被解釋爲瞬時信號本身,諸如無線電波或者其它自由傳播的電磁波、通過波導或其它傳輸媒介傳播的電磁波(例如,通過光纖電纜的光信號)、或者通過電線傳輸的電信號。另外,此處所描述的電腦可讀程式指令可以從電腦可讀儲存媒體下載到各個計算/處理設備,或者通過網路,例如:網際網路、區域網路、廣域網路及/或無線網路下載到外部電腦設備或外部儲存設備。網路可以包括銅傳輸電纜、光纖傳輸、無線傳輸、路由器、防火牆、交換器、集線器及/或閘道器。每一個計算/處理設備中的網路卡或者網路介面從網路接收電腦可讀程式指令,並轉發此電腦可讀程式指令,以供儲存在各個計算/處理設備中的電腦可讀儲存媒體中。執行本發明操作的電腦程式指令可以是組合語言指令、指令集架構指令、機器指令、機器相關指令、微指令、韌體指令、或者以一種或多種程式語言的任意組合編寫的原始碼或目的碼(Object Code),所述程式語言包括物件導向的程式語言,如:Common Lisp、Python、C++、Objective-C、Smalltalk、Delphi、Java、Swift、C#、Perl、Ruby與PHP等,以及常規的程序式(Procedural)程式語言,如:C語言或類似的程式語言。所述電腦程式指令可以完全地在電腦上執行、部分地在電腦上執行、作爲一個獨立的軟體執行、部分在客戶端電腦上部分在遠端電腦上執行、或者完全在遠端電腦或伺服器上執行。In particular, it should be noted that, in actual implementation, the various hosts described in the present invention can be implemented in various ways, including software, hardware, or any combination thereof. For example, in some embodiments, each host can use software (Such as: virtual machine, container, etc.) and hardware or one of them. In addition, the present invention can also be implemented partially or completely based on hardware, for example, one or more hosts in the system It can be realized through integrated circuit chips, System on Chip (SoC), Complex Programmable Logic Device (CPLD), Field Programmable Gate Array (FPGA), etc. The invention can be a system, a method and/or a computer program. The computer program may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present invention. The computer-readable storage medium may be a tangible that can hold and store instructions used by an instruction execution device. equipment. The computer-readable storage medium can be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer-readable storage media include hard disks, random access memory, read-only memory, flash memory, optical disks, floppy disks, and any suitable combination of the foregoing. The computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, optical signals through fiber optic cables), or through wires Transmission of electrical signals. In addition, the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. To an external computer device or external storage device. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, hubs and/or gateways. The network card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device middle. The computer program instructions that perform the operations of the present invention can be combined language instructions, instruction set architecture instructions, machine instructions, machine-related instructions, micro instructions, firmware instructions, or source code or object code written in any combination of one or more programming languages (Object Code), the programming language includes object-oriented programming languages, such as: Common Lisp, Python, C++, Objective-C, Smalltalk, Delphi, Java, Swift, C#, Perl, Ruby, PHP, etc., as well as conventional programs Procedural programming language, such as C language or similar programming language. The computer program instructions can be executed entirely on the computer, partly executed on the computer, executed as an independent software, partly executed on the client computer and partly executed on the remote computer, or entirely on the remote computer or server Executed on.

以下配合「第5圖」及「第6圖」以實施例的方式進行如下說明,請先參閱「第5圖」,「第5圖」為應用本發明進行借貸消費之示意圖。首先,買方端主機110(可簡稱為買方)、中介端主機140(可簡稱為中介方)、賣方端主機130(可簡稱為賣方)及借出端主機120(可簡稱為借出方)可以視為四方主機。在這四方主機中,買方端主機110與賣方端主機130之間為交付關係,即:賣方交付商品/服務給買方;買方端主機110與借出端主機120之間為借貸關係,即:買方向借出方申貸;賣方端主機130與借出端主機120之間為支付關係,即:借出方支付數位貨幣或支付通證給賣方,至於中介端主機140則是獨立於買方端主機110、賣方端主機130及借出端主機120之外的監督角色,用以在需要仲裁時決定執行交付或退還。在實際實施上,假設如第一實施例使用單一智慧合約來實現,並且使用債權通證來記錄借貸的債權債務關係的情況下,其整體借貸消費流程如下:The following description will be given in conjunction with "Figure 5" and "Figure 6" by means of an embodiment. Please refer to "Figure 5" first. "Figure 5" is a schematic diagram of applying the present invention to lending and spending. First, the buyer host 110 (may be referred to as the buyer for short), the intermediary host 140 (which may be referred to as the intermediary party), the seller's host 130 (which may be referred to as the seller), and the lending host 120 (which may be referred to as the lender for short) can Treated as a Quartet host. Among the four-party hosts, the buyer-side host 110 and the seller-side host 130 have a delivery relationship, that is: the seller delivers goods/services to the buyer; the buyer-side host 110 and the lending-end host 120 have a loan relationship, that is, buy Apply for a loan to the lender; the seller-side host 130 and the lender-side host 120 have a payment relationship, that is: the lender pays digital currency or payment tokens to the seller, and the intermediary-side host 140 is independent of the buyer-side host 110. A supervisory role other than the seller-side host 130 and the lending-side host 120 is used to decide whether to perform delivery or refund when arbitration is required. In actual implementation, assuming that a single smart contract is used for implementation as in the first embodiment, and the creditor's rights certificate is used to record the creditor's rights and debt relationship of the loan, the overall loan consumption process is as follows:

1. 在初始時,可由四方中的任一方建立一個智慧合約,並且在此智慧合約中指定其餘三方,以及包含欲購買資產、應支付量(即:應借量)及逾時時間等等。1. At the initial stage, any one of the four parties can establish a smart contract, and specify the remaining three parties in this smart contract, and include the assets to be purchased, the amount to be paid (that is, the amount to be borrowed), and the timeout period, etc.

2. 依照智慧合約的指示內容,買方將債權通證託管給智慧合約;賣方將資產通證託管給智慧合約;借出方將數位貨幣或支付通證託管給智慧合約。2. In accordance with the instructions of the smart contract, the buyer entrusts the credit certificate to the smart contract; the seller entrusts the asset certificate to the smart contract; the lender entrusts the digital currency or payment certificate to the smart contract.

3. 倘若在逾時時間之前,買方、賣方及借出方皆已在智慧合約中託管相應此次交易的數位貨幣或通證(如:債權通證、資產通證及支付通證)。那麼,可由四方中的任一方執行智慧合約的交付函式,使智慧合約將本身託管的數位貨幣或通證轉移至相應的對象,例如:將資產通證轉移給買方、將數位貨幣或支付通證轉移給賣方,以及將債權通證轉移給借出方。3. If before the timeout, the buyer, seller and lender have already hosted the digital currency or tokens (such as debt tokens, asset tokens and payment tokens) corresponding to this transaction in the smart contract. Then, any one of the four parties can execute the delivery function of the smart contract, so that the smart contract can transfer the digital currency or tokens it escrows to the corresponding object, such as: transferring asset tokens to the buyer, transferring digital currency or payment tokens Transfer the certificate to the seller and transfer the credit certificate to the lender.

如此一來,後續買方可依照智慧合約中的借貸訊息與借出方持有的債權通證計算還款數額,以便向借出方進行還款。特別要說明的是,假設超過逾時時間,即代表交易未完成,故允許買方從智慧合約中取回託管的債權通證、允許賣方從智慧合約中取回託管的資產通證,以及允許借出方從智慧合約中取回託管的數位貨幣或支付通證。另外,除了上述使用債權通證之外,也可在智慧合約中的借貸訊息記錄為借貸已執行。In this way, the subsequent buyer can calculate the repayment amount based on the loan information in the smart contract and the debt certificate held by the lender in order to repay the lender. In particular, if the timeout expires, it means that the transaction is not completed. Therefore, the buyer is allowed to retrieve the escrow token from the smart contract, the seller is allowed to retrieve the custodial asset token from the smart contract, and the loan is allowed. The sender retrieves the escrow digital currency or payment token from the smart contract. In addition, in addition to the above-mentioned use of the credit certificate, the loan information in the smart contract can also be recorded as the loan has been executed.

接著,假設如第二實施例使用多個智慧合約來實現,並且買方為最早設定第一雜湊值的情況下,其整體借貸消費流程如下:Next, assuming that the second embodiment uses multiple smart contracts to implement, and the buyer sets the first hash value for the earliest time, the overall loan and consumption process is as follows:

1. 買方建立一個交付關係智慧合約,並且在其中指定賣方、欲購買資產、應支付量等等,再發布至區塊鏈網路100。在實際實施上,所述交付關係智慧合約亦可由賣方建立並指定買方。1. The buyer establishes a delivery relationship smart contract, and specifies the seller, the assets to be purchased, the amount to be paid, etc., and then publishes it to the blockchain network 100. In actual implementation, the delivery relationship smart contract can also be established by the seller and designated the buyer.

2. 買方根據交付關係智慧合約的內容,發布一個借貸關係智慧合約,並且在其中指定借出方、欲借款量及賣方。在實際實施上,所述借貸關係智慧合約亦可由借出方建立,而原本指定借出方則需改為指定買方。2. The buyer publishes a lending relationship smart contract based on the content of the delivery relationship smart contract, and specifies the lender, the amount to borrow, and the seller in it. In actual implementation, the smart contract for the lending relationship can also be established by the lender, and the original designated lender needs to be changed to a designated buyer.

3. 借出方根據交付關係智慧合約及借貸關係智慧合約的資訊發布一個支付關係智慧合約,並且在其中指定賣方及欲支付量。所述支付關係智慧合約亦可由賣方建立,而原本指定賣方則需改為指定借出方(也就是實際的支付方)。3. The lender publishes a payment relationship smart contract based on the information of the delivery relationship smart contract and the lending relationship smart contract, and specifies the seller and the amount to be paid in it. The payment relationship smart contract can also be established by the seller, and the originally designated seller needs to be changed to the designated lender (that is, the actual payer).

4. 當上述三個智慧合約皆建立後,買方對借貸關係智慧合約設定第一雜湊值與第一逾時時間;中介方對借貸關係智慧合約設定第二雜湊值;賣方對交付關係智慧合約設定第一雜湊值、第二雜湊值及第二逾時時間;借出方對支付關係智慧合約設定第一雜湊值、第二雜湊值及第三逾時時間。之後,若任何人提供第一解鎖密語或第二解鎖密語給所述借貸關係智慧合約,則所述借貸關係智慧合約會記錄為借貸已執行,此時,債權及債務成立。特別要說明的是,為了使中介方能夠作為監督角色以避免交易糾紛(如:鏈外交付行為的糾紛),所以需要在借貸關係智慧合約中設定對應第二解鎖密語的第二雜湊值,如此一來,當發生交易糾紛導致買方不願提供第一解鎖密語時,能夠由中介方判斷是否應執行交易,並且在應執行交易時,提供第二解鎖密語來強制執行交易。4. After the above three smart contracts are established, the buyer sets the first hash value and the first timeout time for the lending relationship smart contract; the intermediary sets the second hash value for the lending relationship smart contract; the seller sets the delivery relationship smart contract The first hash value, the second hash value and the second time-out time; the lender sets the first hash value, the second hash value and the third time-out time to the payment relationship smart contract. After that, if anyone provides the first unlocking passphrase or the second unlocking passphrase to the lending relationship smart contract, the lending relationship smart contract will be recorded as the lending has been executed. At this time, the creditor's rights and debts are established. In particular, in order to enable the intermediary to act as a supervisor to avoid transaction disputes (such as disputes over off-chain delivery behavior), it is necessary to set the second hash value corresponding to the second unlocking cipher in the lending relationship smart contract. First, when a transaction dispute occurs and the buyer is unwilling to provide the first unlocking passphrase, the intermediary can determine whether the transaction should be executed, and when the transaction should be executed, the second unlocking passphrase can be provided to enforce the transaction.

5. 賣方對所述交付關係智慧合約託管要交付的資產通證,同時設置第一雜湊值、第二雜湊值及第二逾時時間於所述交付關係智慧合約中;借出方對所述支付關係智慧合約託管要支付的數位貨幣或支付通證,同時設置第一雜湊值、第二雜湊值及第三逾時時間於所述支付關係智慧合約中。5. The seller escrows the asset tokens to be delivered in the delivery relationship smart contract, and sets the first hash value, the second hash value and the second overtime in the delivery relationship smart contract at the same time; The payment relationship smart contract escrows the digital currency or payment token to be paid, and at the same time sets the first hash value, the second hash value and the third overtime in the payment relationship smart contract.

6. 在確定執行交易時,由買方傳送第一解鎖密語至交付關係智慧合約,或由中介方傳送第二解鎖密語至交付關係智慧合約,使交付關係智慧合約在第二逾時時間內,接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的所述資產通證傳送至買方,並且公開接收到的第一解鎖密語或第二解鎖密語。6. When confirming the execution of the transaction, the buyer sends the first unlocking password to the delivery relationship smart contract, or the intermediary sends the second unlocking password to the delivery relationship smart contract, so that the delivery relationship smart contract will receive within the second timeout period When the first unlocking passphrase that matches the first hash value or the second unlocking passphrase that matches the second hash value is reached, the asset pass in escrow is transmitted to the buyer, and the received first unlocking passphrase or second unlocking passphrase is made public .

7. 當賣方及借出方在交付關係智慧合約中偵測到公開的第一解鎖密語或第二解鎖密語時,賣方將偵測到的第一解鎖密語或第二解鎖密語傳送至支付關係智慧合約,使支付關係智慧合約在第三逾時時間內,接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,將託管的數位貨幣或支付通證傳送至賣方,以及借出方將偵測到的第一解鎖密語或第二解鎖密語傳送至借貸關係智慧合約以將借貸關係智慧合約的借貸狀態記錄為借貸已執行。7. When the seller and the lender detect the first unlocking password or the second unlocking password disclosed in the delivery relationship smart contract, the seller sends the detected first unlocking password or second unlocking password to the payment relationship smart The contract enables the payment relationship smart contract to receive the first unlocking password matching the first hash value or the second unlocking password matching the second hash value within the third timeout period, and transmit the escrow digital currency or payment token To the seller and the lender, the detected first unlocking passphrase or second unlocking passphrase is sent to the lending relationship smart contract to record the lending status of the lending relationship smart contract as the loan executed.

同樣地,後續買方可依照所述借貸關係智慧合約中的借貸狀態判斷是否需要向借出方進行還款。特別要說明的是,交付關係智慧合約未在第二逾時時間內或支付關係智慧合約未在第三逾時時間內接收到匹配第一雜湊值的第一解鎖密語或匹配第二雜湊值的第二解鎖密語時,允許賣方取回託管的資產通證,以及允許借出方取回託管的數位貨幣或支付通證,此時買方的債務不成立。Similarly, the subsequent buyer can determine whether it needs to repay the lender according to the lending status in the lending relationship smart contract. In particular, the delivery relationship smart contract did not receive the first unlocking passphrase that matches the first hash value or the second hash value within the second timeout period or the payment relationship smart contract did not receive the first unlocking passphrase that matches the first hash value within the third timeout period. In the second unlocking passphrase, the seller is allowed to retrieve the asset token in custody, and the lender is allowed to retrieve the digital currency or payment token in custody. At this time, the buyer's debt is not established.

如「第6圖」所示意,「第6圖」為應用本發明設定智慧合約之示意圖。前面提到,智慧合約係由買方端主機110、中介端主機140、賣方端主機130及借出端主機120其中之一進行建立及發布,借貸訊息包含買方端主機110、賣方端主機130、借出端主機120及中介端主機140之中,並非建立及發布此智慧合約的其中三者的地址,以及欲購買資產、應支付量及逾時時間。在實際實施上,欲建立智慧合約的一方為買方端主機110,其可開啟設定視窗600,並且在其中的輸入區塊(611~613)分別鍵入指定的賣方端主機130、借出端主機120及中介端主機140的地址。接著,再於借貸消費輸入區塊(621~623)鍵入欲購買資產、應支付量及逾時時間。最後,點選確認元件630建立並發布智慧合約於區塊鏈網路。另外,在多個智慧合約的情況下,各智慧合約的建立及發布方式也大同小異,其差異僅在於指定的內容有所不同,例如:由買方建立及發布智慧合約需指定借出方、欲借款量及賣方;由借出方建立及發布則需將原本指定的借出方改為指定買方。另外,由借出方建立及發布的智慧合約需在其中指定賣方及欲支付量,而改由賣方建立時,則原本指定賣方需改為指定借出方。As shown in "Figure 6", "Figure 6" is a schematic diagram of applying the present invention to set up a smart contract. As mentioned earlier, the smart contract is created and published by one of the buyer’s host 110, the intermediary host 140, the seller’s host 130, and the lender’s host 120. The loan information includes the buyer’s host 110, the seller’s host 130, and the lender. The outbound host 120 and the intermediate host 140 are not the addresses of the three of the smart contracts that created and released the smart contract, as well as the assets to be purchased, the amount to be paid, and the time-out time. In actual implementation, the party that wants to establish a smart contract is the buyer's host 110, which can open the setting window 600 and enter the designated seller's host 130 and lender's host 120 in the input block (611~613). And the address of the intermediate host 140. Then, enter the assets to be purchased, the amount to be paid, and the overtime time in the loan consumption input block (621 ~ 623). Finally, click the confirmation component 630 to create and publish a smart contract on the blockchain network. In addition, in the case of multiple smart contracts, the creation and release methods of each smart contract are similar. The difference is only in the specified content. For example, the buyer needs to specify the lender and want to borrow to establish and release the smart contract. The amount and the seller; the establishment and release by the lender must change the originally designated lender to the designated buyer. In addition, the smart contract established and released by the lender needs to specify the seller and the amount to be paid in it. When it is established by the seller, the original designated seller needs to be changed to the designated lender.

綜上所述,可知本發明與先前技術之間的差異在於透過在區塊鏈網路提供買方端主機、借出端主機、賣方端主機及中介端主機,其中買方端主機與賣方端主機為交付關係,買方端主機與借出端主機為借貸關係,借出端主機與賣方端主機為支付關係,接著當買方端主機進行借貸消費時,使用智慧合約託管數位貨幣及通證,並且在偵測到賣方端主機交付資產給買方端主機後,再由借出端主機向賣方端主機進行支付,以及允許中介端主機仲裁交易,藉由此一技術手段可以解決先前技術所存在的問題,進而達成提高借貸用途的透明性及真實性之技術功效。In summary, it can be seen that the difference between the present invention and the prior art is that the buyer-side host, the lender-side host, the seller-side host, and the intermediary-side host are provided on the blockchain network, where the buyer-side host and the seller-side host are Delivery relationship, the buyer’s host and the lender’s host have a loan relationship, and the lender’s host and the seller’s host have a payment relationship. Then, when the buyer’s host performs lending and consumption, the smart contract is used to host the digital currency and tokens, and is under investigation. After detecting that the seller-side host delivers the assets to the buyer-side host, the lending-side host pays the seller-side host, and allows the intermediary-side host to arbitrate the transaction. This technical means can solve the problems of the previous technology, and then Achieve technical effects that improve the transparency and authenticity of lending purposes.

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。Although the present invention is disclosed in the foregoing embodiments as above, it is not intended to limit the present invention. Anyone familiar with similar art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of patent protection shall be determined by the scope of the patent application attached to this specification.

100,300:區塊鏈網路 110,310:買方端主機 120,320:借出端主機 130,330:賣方端主機 140,340:中介端主機 600:設定視窗 611~613:輸入區塊 621~623:借貸消費輸入區塊 630:確認元件 步驟210:提供分別作為節點主機其中之一的一買方端主機、一借出端主機、一賣方端主機及一中介端主機,其中,該中介端主機允許直接觸發執行該智慧合約的一交付函式及一退還函式 步驟220:在包含一借貸訊息的一智慧合約成功發布於區塊鏈網路之後,允許該買方端主機將至少一債權通證傳送至該智慧合約以進行託管、該賣方端主機將至少一資產通證傳送至該智慧合約以進行託管,以及該借出端主機將至少一數位貨幣或至少一支付通證傳送至該智慧合約以進行託管 步驟230:當所述債權通證及所述資產通證,以及所述數位貨幣或所述支付通證皆已託管於該智慧合約時,允許該買方端主機、該借出端主機、該賣方端主機及該中介端主機其中之一觸發執行該智慧合約的該交付函式,使該智慧合約將所述資產通證轉移至該買方端主機、將所述數位貨幣或所述支付通證轉移至該賣方端主機,以及在該借貸訊息中記錄為借貸已執行,或在該智慧合約存在託管的所述債權通證時,將所述債權通證轉移至該借出端主機 步驟240:在該交付函式執行結束後,該買方端主機根據該借貸訊息及該借出端主機持有的所述債權通證或兩者任一計算還款數額,以便向該借出端主機進行還款 步驟250:當超過逾時時間未執行該交付函式時,由該智慧合約觸發執行一退還函式,或由該買方端主機、該借出端主機、該賣方端主機或該中介端主機觸發執行該退還函式,用以允許該買方端主機取回託管的所述債權通證、允許該賣方端主機取回託管的所述資產通證,以及允許該借出端主機取回託管的所述數位貨幣或所述支付通證 步驟410:提供一買方端主機、一借出端主機、一賣方端主機及一中介端主機以分別作為所述節點主機其中之一 步驟420:該買方端主機或該賣方端主機在該區塊鏈網路發布一交付關係智慧合約,該買方端主機或該借出端主機在該區塊鏈網路發布一借貸關係智慧合約,該借出端主機或該賣方端主機在該區塊鏈網路發布一支付關係智慧合約 步驟430:在該交付關係智慧合約、該借貸關係智慧合約及該支付關係智慧合約皆成功發布後,由該買方端主機在該借貸關係智慧合約中設定一第一雜湊值,或由該借出端主機在該支付關係智慧合約中設定該第一雜湊值,或由該賣方端主機在該交付關係智慧合約中設定該第一雜湊值,其中該第一雜湊值係由一第一解鎖密語進行雜湊計算所生成 步驟440:該中介端主機在已設定該第一雜湊值的該借貸關係智慧合約、該支付關係智慧合約或該交付關係智慧合約中設定一第二雜湊值,該第二雜湊值係由一第二解鎖密語進行雜湊計算所生成 步驟450:在該買方端主機、該借出端主機及該賣方端主機之中,非最早設定該第一雜湊值的二者,將該第一雜湊值及該第二雜湊值設定在尚未設定該第一雜湊值及該第二雜湊值的該借貸關係智慧合約、該支付關係智慧合約或該交付關係智慧合約之中,其中,在設定時,該借貸關係智慧合約允許託管來自該買方端主機的至少一債權通證,該交付關係智慧合約同時託管來自該賣方端主機的至少一資產通證,該支付關係智慧合約同時託管來自該借出端主機的至少一數位貨幣或至少一支付通證 步驟460:在確定執行交易時,由最早設定該第一雜湊值的該買方端主機、該借出端主機或該賣方端主機將該第一解鎖密語傳送至該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,或由該中介端主機傳送該第二解鎖密語至該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,使該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約在接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,將託管的所述資產通證、所述債權通證、所述數位貨幣或至少一支付通證傳送至該買方端主機、該借出端主機或該賣方端主機,並且公開接收到的該第一解鎖密語或該第二解鎖密語 步驟470:在該買方端主機、該借出端主機及該賣方端主機之中,非最早設定該第一雜湊值的二者,在偵測到公開的該第一解鎖密語或該第二解鎖密語時,允許將偵測到的該第一解鎖密語或該第二解鎖密語傳送至未公開該第一解鎖密語或該第二解鎖密語的該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,使其在接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,將託管的所述資產通證、所述債權通證、所述數位貨幣或所述支付通證傳送至該買方端主機、該借出端主機或該賣方端主機,以及當偵測到的該第一解鎖密語或該第二解鎖密語傳送至該借貸關係智慧合約時,允許將該借貸關係智慧合約的一借貸狀態記錄為借貸已執行 步驟480:在該借貸關係智慧合約、該支付關係智慧合約及該交付關係智慧合約中分別設定一逾時時間,當未在該逾時時間內接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,允許該賣方端主機取回託管的所述資產通證、允許買方端主機取回託管的所述債權通證,以及允許該借出端主機取回託管的所述數位貨幣或所述支付通證100,300: Blockchain network 110,310: Buyer-side hosting 120, 320: Lending host 130,330: Seller-side host 140,340: Intermediary host 600: Setting window 611~613: Input block 621~623: Input block of loan consumption 630: Confirm component Step 210: Provide a buyer's host, a lender's host, a seller's host, and an intermediary host as one of the node hosts, wherein the intermediary host allows to directly trigger a delivery letter for executing the smart contract And a refund function Step 220: After a smart contract containing a loan message is successfully released on the blockchain network, the buyer-side host is allowed to send at least one credit certificate to the smart contract for custody, and the seller-side host is allowed to transfer at least one asset The pass is sent to the smart contract for custody, and the lending host sends at least one digital currency or at least one payment pass to the smart contract for custody Step 230: When the debt certificate and the asset certificate, as well as the digital currency or the payment certificate have been escrowed in the smart contract, allow the buyer's host, the lender's host, and the seller One of the host and the intermediate host triggers the execution of the delivery function of the smart contract, so that the smart contract transfers the asset certificate to the buyer host, and transfers the digital currency or the payment certificate To the seller's host, and record in the loan message as the loan has been executed, or transfer the credit to the lending host when the smart contract has the credit certificate under custody Step 240: After the execution of the delivery function is completed, the buyer-side host calculates the repayment amount based on the loan information and the debt certificate held by the lending-side host or both, so as to send the loan to the lending-side Host repayment Step 250: When the delivery function is not executed within the timeout period, the smart contract triggers the execution of a refund function, or is triggered by the buyer's host, the lender's host, the seller's host, or the intermediary host The return function is executed to allow the buyer-side host to retrieve the escrow credit certificate, allow the seller-side host to retrieve the custodial asset certificate, and allow the lending-side host to retrieve the escrow Said digital currency or said payment pass Step 410: Provide a buyer's host, a lender's host, a seller's host, and an intermediary host as one of the node hosts, respectively Step 420: The buyer-side host or the seller-side host publishes a delivery relationship smart contract on the blockchain network, and the buyer-side host or the lending-end host publishes a lending relationship smart contract on the blockchain network. The lender host or the seller host publishes a payment relationship smart contract on the blockchain network Step 430: After the delivery relationship smart contract, the lending relationship smart contract, and the payment relationship smart contract are successfully released, the buyer-side host sets a first hash value in the lending relationship smart contract, or the lending The end host sets the first hash value in the payment relationship smart contract, or the seller end host sets the first hash value in the delivery relationship smart contract, where the first hash value is performed by a first unlocking secret Generated by hash calculation Step 440: The intermediary host sets a second hash value in the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract for which the first hash value has been set, and the second hash value is determined by a first hash value. 2. Unlock the secret words generated by hash calculation Step 450: Among the buyer-side host, the lending-side host, and the seller-side host, which are not the earliest set of the first hash value, set the first hash value and the second hash value to not yet set The first hash value and the second hash value in the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract, wherein, when set, the lending relationship smart contract allows escrow to come from the buyer's host At least one debt certificate of the delivery relationship, the delivery relationship smart contract also hosts at least one asset certificate from the seller-side host, and the payment relationship smart contract also hosts at least one digital currency or at least one payment certificate from the lending host Step 460: When the transaction is determined to be executed, the buyer host, the lender host, or the seller host that sets the first hash value first transmits the first unlocking secret to the delivery relationship smart contract and the lending relationship The smart contract or the payment relationship smart contract, or the intermediary host transmits the second unlocking secret to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract, so that the delivery relationship smart contract, the lending relationship When the smart contract or the payment relationship smart contract receives the first unlocking secret word matching the first hash value or the second unlocking secret word matching the second hash value, it transfers the asset certificate and the creditor's rights under trust The pass, the digital currency, or at least one payment pass is transmitted to the buyer's host, the lender's host, or the seller's host, and the received first unlocking passphrase or the second unlocking passphrase is made public Step 470: Among the buyer-side host, the lending-side host, and the seller-side host, whichever is not the earliest to set the first hash value, when the first unlocking secret or the second unlocking is detected During the passphrase, the detected first unlocking passphrase or the second unlocking passphrase is allowed to be sent to the delivery relationship smart contract, the lending relationship smart contract, or the payment that has not disclosed the first unlocking passphrase or the second unlocking passphrase The relationship smart contract enables it to transfer the asset certificate and the creditor’s rights certificate under custody when the first unlocking passphrase matching the first hash value or the second unlocking passphrase matching the second hash value is received , The digital currency or the payment pass is sent to the buyer's host, the lender's host or the seller's host, and when the first unlocking password or the second unlocking password is detected, it is sent to the lending In the case of a relationship smart contract, it is allowed to record a loan status of the loan relationship smart contract as a loan executed Step 480: Set an expiration time in the lending relationship smart contract, the payment relationship smart contract, and the delivery relationship smart contract. When the first unlock that matches the first hash value is not received within the timeout period When the passphrase or the second unlock passphrase that matches the second hash value, the seller-side host is allowed to retrieve the asset token under custody, the buyer-side host is allowed to retrieve the creditor’s rights token under custody, and the lending is allowed The end host retrieves the hosted digital currency or the payment token

第1圖為本發明基於區塊鏈與智慧合約的多方借貸消費系統的第一實施例之系統方塊圖。 第2圖為本發明基於區塊鏈與智慧合約的多方借貸消費方法的第一實施例之方法流程圖。 第3圖為本發明基於區塊鏈與智慧合約的多方借貸消費系統的第二實施例之系統方塊圖。 第4A圖及第4B圖為本發明基於區塊鏈與智慧合約的多方借貸消費方法的第二實施例之方法流程圖。 第5圖為應用本發明進行借貸消費之示意圖。 第6圖為應用本發明設定智慧合約之示意圖。Figure 1 is a system block diagram of the first embodiment of a multi-party lending and consumption system based on blockchain and smart contracts of the present invention. Figure 2 is a method flowchart of the first embodiment of the multi-party lending and consumption method based on the blockchain and smart contracts of the present invention. Figure 3 is a system block diagram of the second embodiment of the multi-party lending and consumption system based on the blockchain and smart contracts of the present invention. 4A and 4B are the method flowcharts of the second embodiment of the multi-party lending and consumption method based on the blockchain and smart contract of the present invention. Figure 5 is a schematic diagram of applying the present invention to loan consumption. Figure 6 is a schematic diagram of applying the present invention to set up a smart contract.

100:區塊鏈網路100: Blockchain network

110:買方端主機110: Buyer-side host

120:借出端主機120: Lending host

130:賣方端主機130: Seller-side host

140:中介端主機140: Intermediary host

Claims (10)

一種基於區塊鏈與智慧合約的多方借貸消費系統,應用在多個節點主機組成的一區塊鏈網路中,該系統包含: 一買方端主機,作為所述節點主機其中之一,該買方端主機用以在包含一借貸訊息的一智慧合約成功發布於該區塊鏈網路之後,允許將至少一債權通證傳送至該智慧合約以進行託管; 一借出端主機,作為所述節點主機其中之一,該借出端主機在該智慧合約成功發布後,將至少一數位貨幣或至少一支付通證傳送至該智慧合約以進行託管; 一賣方端主機,作為所述節點主機其中之一,該賣方端主機在該智慧合約成功發布後,將至少一資產通證傳送至該智慧合約以進行託管;以及 一中介端主機,作為所述節點主機其中之一,該中介端主機用以允許直接觸發執行該智慧合約的一交付函式及一退還函式; 其中,當所述資產通證以及所述數位貨幣或所述支付通證皆已託管於該智慧合約時,允許該買方端主機、該借出端主機、該賣方端主機及該中介端主機其中之一觸發執行該智慧合約的該交付函式,使該智慧合約將所述資產通證轉移至該買方端主機、將所述數位貨幣或所述支付通證轉移至該賣方端主機,以及在該借貸訊息中記錄為借貸已執行,或在該智慧合約存在託管的所述債權通證時,將所述債權通證轉移至該借出端主機,當該交付函式執行結束後,該買方端主機根據該借貸訊息及該借出端主機持有的所述債權通證或兩者任一計算還款數額,以便向該借出端主機進行還款。A multi-party lending and consumption system based on blockchain and smart contracts, which is applied in a blockchain network composed of multiple node hosts. The system includes: A buyer-side host, as one of the node hosts, the buyer-side host is used to allow at least one credit card to be sent to the blockchain network after a smart contract containing a loan message is successfully published Smart contract for escrow; A lending host, as one of the node hosts, the lending host sends at least one digital currency or at least one payment pass to the smart contract for custody after the smart contract is successfully released; A seller-side host, as one of the node hosts, the seller-side host sends at least one asset pass to the smart contract for custody after the smart contract is successfully released; and An intermediary host, as one of the node hosts, the intermediary host is used to allow a delivery function and a return function of the smart contract to be directly triggered; Wherein, when the asset pass and the digital currency or the payment pass are all hosted in the smart contract, the buyer host, the lender host, the seller host, and the intermediary host are allowed to be among them One triggers the execution of the delivery function of the smart contract, so that the smart contract transfers the asset certificate to the buyer's host, transfers the digital currency or the payment certificate to the seller's host, and The loan message records that the loan has been executed, or when the smart contract has the credit card under custody, the credit card is transferred to the lending end host. When the delivery function is completed, the buyer The host computer calculates the repayment amount according to the loan information and the credit certificate held by the lending host, or both, so as to repay the loan to the lending host. 如請求項1之基於區塊鏈與智慧合約的多方借貸消費系統,其中該智慧合約係由該買方端主機、該借出端主機、該賣方端主機及該中介端主機其中之一進行建立及發布,該借貸訊息包含該買方端主機、該賣方端主機、該借出端主機及該中介端主機之中,並非建立及發布該智慧合約的其中三者的地址,以及一欲購買資產、一應支付量及一逾時時間。For example, the multi-party lending and consumption system based on blockchain and smart contract in claim 1, wherein the smart contract is established by one of the buyer's host, the lender's host, the seller's host, and the intermediary host, and Released, the loan message includes the addresses of the buyer-side host, the seller-side host, the lending-side host, and the intermediary-side host, but not the addresses of three of them that created and issued the smart contract, as well as an asset to be purchased, an address The amount to be paid and an overtime period. 如請求項2之基於區塊鏈與智慧合約的多方借貸消費系統,其中該交付函式未執行且超過該逾時時間時,觸發執行該智慧合約的該退還函式,用以允許該買方端主機取回託管的所述債權通證、允許該賣方端主機取回託管的所述資產通證,以及允許該借出端主機取回託管的所述數位貨幣或所述支付通證。For example, in the multi-party lending and consumption system based on blockchain and smart contract in Request 2, where the delivery function is not executed and the timeout time is exceeded, the refund function of the smart contract is triggered to execute the smart contract to allow the buyer The host retrieves the hosted creditor's rights certificate, allows the seller-side host to retrieve the hosted asset certificate, and allows the lending-end host to retrieve the hosted digital currency or the payment certificate. 一種基於區塊鏈與智慧合約的多方借貸消費系統,應用在多個節點主機組成的一區塊鏈網路中,該系統包含: 一買方端主機,作為所述節點主機其中之一,該買方端主機用以在一借貸關係智慧合約發布於該區塊鏈網路之後,允許在該借貸關係智慧合約中設定一第一雜湊值,其中該第一雜湊值係由一第一解鎖密語進行雜湊計算所生成; 一借出端主機,作為所述節點主機其中之一,該借出端主機用以在一支付關係智慧合約發布於該區塊鏈網路之後,允許在該支付關係智慧合約設定該第一雜湊值,並且將至少一數位貨幣或至少一支付通證傳送至該支付關係智慧合約以進行託管; 一賣方端主機,作為所述節點主機其中之一,該賣方端主機用以在一交付關係智慧合約發布於該區塊鏈網路之後,允許在該交付關係智慧合約設定該第一雜湊值,並且將至少一資產通證傳送至該交付關係智慧合約以進行託管;以及 一中介端主機,作為所述節點主機其中之一,該中介端主機用以在已設定該第一雜湊值的該借貸關係智慧合約、該支付關係智慧合約或該交付關係智慧合約中設定一第二雜湊值,該第二雜湊值係由一第二解鎖密語進行雜湊計算所生成; 其中,在該買方端主機、該借出端主機及該賣方端主機之中,非最早設定該第一雜湊值的二者,將該第一雜湊值及該第二雜湊值設定在尚未設定該第一雜湊值及該第二雜湊值的該借貸關係智慧合約、該支付關係智慧合約或該交付關係智慧合約之中,在進行設定時,該借貸關係智慧合約允許託管來自該買方端主機的至少一債權通證,該交付關係智慧合約同時託管來自該賣方端主機的至少一資產通證,該支付關係智慧合約同時託管來自該借出端主機的至少一數位貨幣或至少一支付通證; 其中,在確定執行交易時,由最早設定該第一雜湊值的該買方端主機、該賣方端主機或該借出端主機將該第一解鎖密語傳送至該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,或由該中介端主機傳送該第二解鎖密語至該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,使該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約在接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,將託管的所述資產通證、所述債權通證、所述數位貨幣或至少一支付通證傳送至該買方端主機、該借出端主機或該賣方端主機,並且公開接收到的第一解鎖密語或第二解鎖密語;以及 其中,在該買方端主機、該借出端主機及該賣方端主機之中,非最早設定該第一雜湊值的二者,在偵測到公開的該第一解鎖密語或該第二解鎖密語時,允許將偵測到的該第一解鎖密語或該第二解鎖密語傳送至未公開該第一解鎖密語或該第二解鎖密語的該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,使其在接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,將託管的所述資產通證、所述債權通證、所述數位貨幣或所述支付通證傳送至該買方端主機、該借出端主機或該賣方端主機,以及當偵測到的該第一解鎖密語或該第二解鎖密語傳送至該借貸關係智慧合約時,允許將該借貸關係智慧合約的一借貸狀態記錄為借貸已執行。A multi-party lending and consumption system based on blockchain and smart contracts, which is applied in a blockchain network composed of multiple node hosts. The system includes: A buyer-side host as one of the node hosts, the buyer-side host is used to allow a first hash value to be set in the lending relationship smart contract after a lending relationship smart contract is published on the blockchain network , Wherein the first hash value is generated by hash calculation of a first unlocking cipher; A lending-side host, as one of the node hosts, the lending-side host is used to allow the payment relationship smart contract to set the first hash after a payment relationship smart contract is published on the blockchain network Value, and at least one digital currency or at least one payment pass is sent to the payment relationship smart contract for custody; A seller-side host as one of the node hosts, the seller-side host is used to allow the first hash value to be set in the delivery relationship smart contract after a delivery relationship smart contract is published on the blockchain network, And transmit at least one asset pass to the delivery relationship smart contract for custody; and An intermediary-side host, as one of the node hosts, the intermediary-side host is used to set a first in the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract for which the first hash value has been set A second hash value, the second hash value is generated by hash calculation of a second unlocking cipher; Wherein, among the buyer-side host, the lending-side host, and the seller-side host, the first hash value and the second hash value are set at the time that the first hash value is not set at the earliest In the first hash value and the second hash value of the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract, when setting, the lending relationship smart contract allows hosting at least A debt certificate, the delivery relationship smart contract also hosts at least one asset certificate from the seller-side host, and the payment relationship smart contract also hosts at least one digital currency or at least one payment certificate from the lending host; Wherein, when the transaction is determined to be executed, the buyer-side host, the seller-side host, or the lending-side host that sets the first hash value first transmits the first unlocking secret to the delivery relationship smart contract and the lending relationship smart Contract or the payment relationship smart contract, or the intermediary host transmits the second unlocking secret to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract, so that the delivery relationship smart contract, the lending relationship smart When the contract or the payment relationship smart contract receives the first unlocking passphrase matching the first hash value or the second unlocking passphrase matching the second hash value, it transfers the asset pass and the creditor’s rights under custody to The certificate, the digital currency or at least one payment pass is transmitted to the buyer-side host, the lending-side host or the seller-side host, and the received first unlocking passphrase or second unlocking passphrase is made public; and Among them, among the buyer-side host, the lending-side host, and the seller-side host, whichever is not the earliest to set the first hash value, when the first unlocking secret or the second unlocking secret is detected When the detected first unlocking password or the second unlocking password is allowed to be transmitted to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship that has not disclosed the first unlocking password or the second unlocking password The smart contract enables it to transfer the asset certificate, the credit certificate, The digital currency or the payment pass is transmitted to the buyer-side host, the lending-side host or the seller-side host, and when the first unlocking password or the second unlocking password is detected, it is sent to the lending relationship In the case of a smart contract, a loan status of the smart contract of the loan relationship is allowed to be recorded as the loan has been executed. 如請求項4之基於區塊鏈與智慧合約的多方借貸消費系統,其中該借貸關係智慧合約、該支付關係智慧合約及該交付關係智慧合約更包含一逾時時間,當未在該逾時時間內接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,允許該賣方端主機取回託管的所述資產通證、允許買方端主機取回託管的所述債權通證,以及允許該借出端主機取回託管的所述數位貨幣或所述支付通證。For example, the multi-party lending and consumption system based on blockchain and smart contracts in claim 4, wherein the lending relationship smart contract, the payment relationship smart contract, and the delivery relationship smart contract further include an overtime time, when it is not within the overtime time When receiving the first unlocking password matching the first hash value or the second unlocking password matching the second hash value within, the seller-side host is allowed to retrieve the asset certificate under custody, and the buyer-side host is allowed to obtain Return the escrow of the creditor's rights certificate, and allow the lending end host to retrieve the escrowd digital currency or the payment certificate. 一種基於區塊鏈與智慧合約的多方借貸消費方法,應用在由多個節點主機組成的一區塊鏈網路,其步驟包括: 提供分別作為所述節點主機其中之一的一買方端主機、一借出端主機、一賣方端主機及一中介端主機,其中,該中介端主機允許直接觸發執行該智慧合約的一交付函式及一退還函式; 在包含一借貸訊息的一智慧合約成功發布於該區塊鏈網路之後,允許該買方端主機將至少一債權通證傳送至該智慧合約以進行託管、該賣方端主機將至少一資產通證傳送至該智慧合約以進行託管,以及該借出端主機將至少一數位貨幣或至少一支付通證傳送至該智慧合約以進行託管; 當所述資產通證以及所述數位貨幣或所述支付通證皆已託管於該智慧合約時,允許該買方端主機、該借出端主機、該賣方端主機及該中介端主機其中之一觸發執行該智慧合約的該交付函式,使該智慧合約將所述資產通證轉移至該買方端主機、將所述數位貨幣或所述支付通證轉移至該賣方端主機,以及在該借貸訊息中記錄為借貸已執行,或在該智慧合約存在託管的所述債權通證時,將所述債權通證轉移至該借出端主機;以及 在該交付函式執行結束後,該買方端主機根據該借貸訊息及該借出端主機持有的所述債權通證或兩者任一計算還款數額,以便向該借出端主機進行還款。A multi-party lending and consumption method based on blockchain and smart contracts is applied to a blockchain network composed of multiple node hosts. The steps include: Provide a buyer host, a lender host, a seller host, and an intermediate host as one of the node hosts, wherein the intermediate host allows to directly trigger a delivery function for executing the smart contract And a refund function; After a smart contract containing a loan message is successfully published on the blockchain network, the buyer-side host is allowed to send at least one debt certificate to the smart contract for custody, and the seller-side host is allowed to transfer at least one asset certificate Send to the smart contract for custody, and the lending host sends at least one digital currency or at least one payment pass to the smart contract for custody; When the asset token and the digital currency or the payment token are all hosted in the smart contract, one of the buyer-side host, the lending-side host, the seller-side host, and the intermediary-side host is allowed Trigger execution of the delivery function of the smart contract, so that the smart contract will transfer the asset token to the buyer's host, transfer the digital currency or the payment token to the seller's host, and make the loan It is recorded in the message that the loan has been executed, or when the smart contract has the credit card under custody, the credit card is transferred to the lending end host; and After the execution of the delivery function ends, the buyer-side host calculates the repayment amount based on the loan information and the debt certificate held by the lending-side host or either of them, so as to repay the lending-side host payment. 如請求項6之基於區塊鏈與智慧合約的多方借貸消費方法,其中該借貸訊息包含該買方端主機、該賣方端主機、該借出端主機及該中介端主機之中,並非建立及發布該智慧合約的其中三者的地址,以及一欲購買資產、一應支付量及一逾時時間。For example, the multi-party loan consumption method based on blockchain and smart contract in claim 6, where the loan message includes the buyer's host, the seller's host, the lender's host, and the intermediary host, but is not created and released The addresses of three of the smart contracts, as well as an asset to be purchased, an amount to be paid, and an overtime period. 如請求項7之基於區塊鏈與智慧合約的多方借貸消費方法,其中該方法更包含下列步驟: 當超過該逾時時間未執行該交付函式時,由該智慧合約觸發執行一退還函式,或由該買方端主機、該中介端主機、該賣方端主機或該借出端主機觸發執行該退還函式,用以允許該買方端主機取回託管的所述債權通證、允許該賣方端主機取回託管的所述資產通證,以及允許該借出端主機取回託管的所述數位貨幣或所述支付通證。For example, the multi-party loan and consumption method based on blockchain and smart contract in claim 7, wherein the method further includes the following steps: When the delivery function is not executed after the timeout period, the smart contract triggers the execution of a refund function, or the buyer host, the intermediary host, the seller host or the lender host triggers the execution of the The return function is used to allow the buyer-side host to retrieve the escrow credit certificate, allow the seller-side host to retrieve the custodial asset certificate, and allow the lending-side host to retrieve the escrow Currency or said payment pass. 一種基於區塊鏈與智慧合約的多方借貸消費方法,應用在由多個節點主機組成的一區塊鏈網路,其步驟包括: 提供一買方端主機、一借出端主機、一賣方端主機及一中介端主機以分別作為所述節點主機其中之一; 該買方端主機或該賣方端主機在該區塊鏈網路發布一交付關係智慧合約,該買方端主機或該借出端主機在該區塊鏈網路發布一借貸關係智慧合約,該借出端主機或該賣方端主機在該區塊鏈網路發布一支付關係智慧合約; 在該交付關係智慧合約、該借貸關係智慧合約及該支付關係智慧合約皆成功發布後,由該買方端主機在該借貸關係智慧合約中設定一第一雜湊值,或由該借出端主機在該支付關係智慧合約中設定該第一雜湊值,或由該賣方端主機在該交付關係智慧合約中設定該第一雜湊值,其中該第一雜湊值係由一第一解鎖密語進行雜湊計算所生成; 該中介端主機在已設定該第一雜湊值的該借貸關係智慧合約、該支付關係智慧合約或該交付關係智慧合約中設定一第二雜湊值,該第二雜湊值係由一第二解鎖密語進行雜湊計算所生成; 在該買方端主機、該借出端主機及該賣方端主機之中,非最早設定該第一雜湊值的二者,將該第一雜湊值及該第二雜湊值設定在尚未設定該第一雜湊值及該第二雜湊值的該借貸關係智慧合約、該支付關係智慧合約或該交付關係智慧合約之中,其中,在進行設定時,該借貸關係智慧合約允許託管來自該買方端主機的至少一債權通證,該交付關係智慧合約同時託管來自該賣方端主機的至少一資產通證,該支付關係智慧合約同時託管來自該借出端主機的至少一數位貨幣或至少一支付通證; 在確定執行交易時,由最早設定該第一雜湊值的該買方端主機、該借出端主機或該賣方端主機將該第一解鎖密語傳送至該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,或由該中介端主機傳送該第二解鎖密語至該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,使該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約在接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,將託管的所述資產通證、所述債權通證、所述數位貨幣或至少一支付通證傳送至該買方端主機、該借出端主機或該賣方端主機,並且公開接收到的該第一解鎖密語或該第二解鎖密語;以及 在該買方端主機、該借出端主機及該賣方端主機之中,非最早設定該第一雜湊值的二者,在偵測到公開的該第一解鎖密語或該第二解鎖密語時,允許將偵測到的該第一解鎖密語或該第二解鎖密語傳送至未公開該第一解鎖密語或該第二解鎖密語的該交付關係智慧合約、該借貸關係智慧合約或該支付關係智慧合約,使其在接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,將託管的所述資產通證、所述債權通證、所述數位貨幣或所述支付通證傳送至該買方端主機、該借出端主機或該賣方端主機,以及當偵測到的該第一解鎖密語或該第二解鎖密語傳送至該借貸關係智慧合約時,允許將該借貸關係智慧合約的一借貸狀態記錄為借貸已執行。A multi-party lending and consumption method based on blockchain and smart contracts is applied to a blockchain network composed of multiple node hosts. The steps include: Provide a buyer's host, a lender's host, a seller's host, and an intermediary host as one of the node hosts; The buyer-side host or the seller-side host publishes a delivery relationship smart contract on the blockchain network, the buyer-side host or the lending-end host publishes a lending relationship smart contract on the blockchain network, the lending The end host or the seller end host publishes a payment relationship smart contract on the blockchain network; After the delivery relationship smart contract, the lending relationship smart contract, and the payment relationship smart contract are successfully released, the buyer-side host sets a first hash value in the lending relationship smart contract, or the lending-side host The first hash value is set in the payment relationship smart contract, or the seller host sets the first hash value in the delivery relationship smart contract, where the first hash value is calculated by a first unlocking password generate; The intermediary host sets a second hash value in the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract for which the first hash value has been set, and the second hash value is a second unlocking passphrase Generated by hash calculation; Among the buyer-side host, the lending-side host, and the seller-side host, if the first hash value is not set earliest, the first hash value and the second hash value are set to a value that has not yet been set for the first hash value. The hash value and the second hash value of the lending relationship smart contract, the payment relationship smart contract, or the delivery relationship smart contract, wherein, when setting, the lending relationship smart contract allows hosting at least A debt certificate, the delivery relationship smart contract also hosts at least one asset certificate from the seller-side host, and the payment relationship smart contract also hosts at least one digital currency or at least one payment certificate from the lending host; When the transaction is determined to be executed, the buyer-side host, the lender-side host, or the seller-side host that sets the first hash value first transmits the first unlocking secret to the delivery relationship smart contract, the lending relationship smart contract or The payment relationship smart contract, or the intermediary host transmits the second unlocking secret to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract, so that the delivery relationship smart contract, the lending relationship smart contract or When the payment relationship smart contract receives the first unlocking passphrase matching the first hash value or the second unlocking passphrase matching the second hash value, it will escrow the asset certificate, the credit certificate, The digital currency or at least one payment pass is transmitted to the buyer's host, the lender's host or the seller's host, and the received first unlocking passphrase or the second unlocking passphrase is made public; and In the buyer-side host, the lending-side host, and the seller-side host, if the first hash value is not set earliest, when the first unlocking secret or the second unlocking secret is detected, It is allowed to transmit the detected first unlocking password or the second unlocking password to the delivery relationship smart contract, the lending relationship smart contract, or the payment relationship smart contract that has not disclosed the first unlocking password or the second unlocking password , So that when receiving the first unlocking passphrase matching the first hash value or the second unlocking passphrase matching the second hash value, the asset pass, the credit pass, and the Digital currency or the payment pass is sent to the buyer's host, the lender's host, or the seller's host, and when the first unlocking password or the second unlocking password is detected, it is sent to the lending relationship smart contract At the time, it is allowed to record a loan status of the smart contract of the loan relationship as the loan has been executed. 如請求項9之基於區塊鏈與智慧合約的多方借貸消費方法,其中該方法更包含在該借貸關係智慧合約、該支付關係智慧合約及該交付關係智慧合約中分別設定一逾時時間,當未在該逾時時間內接收到匹配該第一雜湊值的該第一解鎖密語或匹配該第二雜湊值的該第二解鎖密語時,允許該賣方端主機取回託管的所述資產通證、允許買方端主機取回託管的所述債權通證,以及允許該借出端主機取回託管的所述數位貨幣或所述支付通證的步驟。For example, the multi-party lending consumption method based on blockchain and smart contract in claim 9, wherein the method further includes setting an expiration time in the lending relationship smart contract, the payment relationship smart contract, and the delivery relationship smart contract. When the first unlocking password matching the first hash value or the second unlocking password matching the second hash value is not received within the timeout period, the seller-side host is allowed to retrieve the asset token under trust Steps of allowing the buyer-side host to retrieve the hosted creditor's rights pass, and allowing the lending-side host to retrieve the hosted digital currency or the payment pass.
TW109112740A 2020-04-16 2020-04-16 Multi-party loan consumption system based on blockchain and smart contract and method thereof TWI818171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109112740A TWI818171B (en) 2020-04-16 2020-04-16 Multi-party loan consumption system based on blockchain and smart contract and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109112740A TWI818171B (en) 2020-04-16 2020-04-16 Multi-party loan consumption system based on blockchain and smart contract and method thereof

Publications (2)

Publication Number Publication Date
TW202141396A true TW202141396A (en) 2021-11-01
TWI818171B TWI818171B (en) 2023-10-11

Family

ID=80783207

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109112740A TWI818171B (en) 2020-04-16 2020-04-16 Multi-party loan consumption system based on blockchain and smart contract and method thereof

Country Status (1)

Country Link
TW (1) TWI818171B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025602A (en) * 2017-02-24 2017-08-08 杭州象链网络技术有限公司 A kind of financial asset transaction system construction method based on alliance's chain
TWI629658B (en) * 2017-05-08 2018-07-11 富邦金融控股股份有限公司 Know your customer (kyc) data sharing system based on smart contract on blockchain and method thereof
US10574453B2 (en) * 2018-01-10 2020-02-25 Ranjit Notani System and computer program product for certified confidential data collaboration using blockchains
CN108648056A (en) * 2018-05-10 2018-10-12 中链科技有限公司 A kind of house lease contract processing method and system based on block chain
CN110223172B (en) * 2019-05-20 2021-04-13 创新先进技术有限公司 Conditional receipt storage method and node combining code labeling and type dimension
CN110992007A (en) * 2019-11-22 2020-04-10 肖光昱 Asset digital voucher payment clearing method, device and medium based on block chain

Also Published As

Publication number Publication date
TWI818171B (en) 2023-10-11

Similar Documents

Publication Publication Date Title
TWI726468B (en) Asset rights management system based on blockchain and method thereof
US20200258159A1 (en) System and method of providing a contract-creator application
WO2019100865A1 (en) Resource transfer and capital transfer method and apparatus
KR20180101355A (en) Systems and methods for improving security in exchanges of block-chain assets
TWI772654B (en) Escrowing system for cross-blockchain third-party settlement and method thereof
US20230222495A1 (en) Systems and methods for executing electronic transactions and tokenizations with distributed settlement platform
US20230083351A1 (en) System and method for providing patent title insurance with centralized and distributed data architectures
TWM566363U (en) Intermediary system for lending consumption based on blockchain
TWI716236B (en) Electronic receipt/invoice confirming and escrow system based on blockchain and method thereof
US20230098169A1 (en) System and method for providing patent title insurance with centralized and distributed data architectures
TWM593602U (en) Cross-chain and non-custodial entity performance guarantee transaction system
TWI818171B (en) Multi-party loan consumption system based on blockchain and smart contract and method thereof
CN113449340B (en) Stock house transaction fund supervision method and device based on alliance chain
US20220084128A1 (en) System and method for providing patent title insurance with centralized and distributed data architectures
US20220147993A1 (en) Secure peer-to-peer transctions using a blockchain network
TWI702555B (en) Dividend distribution system based on security token and method thereof
JPWO2019246565A5 (en)
TWI682347B (en) Crowdfunding system based on security token and method thereof
TWI794444B (en) Offering and trading system for security token and method thereof
TW202125368A (en) Shares transfer system based on security token and method thereof
TWI832119B (en) Creating and trading system for tokenized open-end funds and method thereof
TWI664596B (en) Intermediary system for lending consumption based on blockchain and method thereof
CN114298841A (en) Investment and financing match transaction technical scheme based on block chain
CN116882992A (en) Business transaction method and system based on WebRTC and related products
KR20210008235A (en) System for fin tech based on block chain