JP6959649B2 - Cryptocurrency trading device, trading server device, cryptocurrency trading system, cryptocurrency trading method and program - Google Patents
Cryptocurrency trading device, trading server device, cryptocurrency trading system, cryptocurrency trading method and program Download PDFInfo
- Publication number
- JP6959649B2 JP6959649B2 JP2018132286A JP2018132286A JP6959649B2 JP 6959649 B2 JP6959649 B2 JP 6959649B2 JP 2018132286 A JP2018132286 A JP 2018132286A JP 2018132286 A JP2018132286 A JP 2018132286A JP 6959649 B2 JP6959649 B2 JP 6959649B2
- Authority
- JP
- Japan
- Prior art keywords
- virtual currency
- transaction
- user
- remittance
- information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Landscapes
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Description
本発明は、仮想通貨を利用者間で取引するための仮想通貨取引装置に関し、特に、異なる仮想通貨を交換取引するための仮想通貨取引装置に関する。 The present invention relates to a virtual currency trading device for trading virtual currencies between users, and more particularly to a virtual currency trading device for exchanging different virtual currencies.
近年、P2Pネットワーク上で分散型台帳管理を実現するブロックチェーンと呼ばれる技術が知られている。
そして、このブロックチェーンを取引の台帳として活用した仮想通貨(暗号通貨)(特許文献1)が知られており、現金に代わる新たな決算手段や送金手段などに用いられてきている。
このような仮想通貨として、当初はBitcoin(ビットコイン)(登録商標)のみが知られていたが、現在では、同様の仕組みを利用した様々な仮想通貨(アルトコインと呼ばれる)が利用されている。例えば、アルトコインとしてMonacoin(モナコイン)(登録商標)、Litecoin(ライトコイン)などが知られている。
従来、仮想通貨の利用者は、自己の保有する仮想通貨を別の仮想通貨に交換したいと考えたとき、取引所を利用するか、異なる仮想通貨を保持する利用者間で、それぞれの仮想通貨が有する仕組みを利用して相互で送金取引を行う他は選択肢がなかった。
In recent years, a technology called a blockchain that realizes distributed ledger management on a P2P network has been known.
A virtual currency (cryptocurrency) (Patent Document 1) that utilizes this blockchain as a transaction ledger is known, and has been used as a new settlement method or remittance method instead of cash.
Initially, only Bitcoin (registered trademark) was known as such a virtual currency, but nowadays, various virtual currencies (called altcoin) using the same mechanism are used. .. For example, Monacoin (registered trademark), Litecoin (Litecoin) and the like are known as altcoin.
Conventionally, when a virtual currency user wants to exchange his / her own virtual currency for another virtual currency, he / she uses an exchange or between users who hold different virtual currencies. There was no choice but to carry out mutual remittance transactions using the mechanism that Cryptocurrency has.
取引所を利用した仮想通貨の取引では、第三者である取引所を信頼し、取引所に仮想通貨を預けるかたちとなる。
預けた仮想通貨を悪意ある取引所に「持ち逃げ」されるリスクはもちろんあるが、善意の取引所であっても、それらが狙われ、預けた仮想通貨がクラッキングなどによって流出するという懸念がある。
In the transaction of virtual currency using an exchange, the virtual currency is deposited on the exchange by trusting the exchange which is a third party.
Of course, there is a risk that the deposited virtual currency will be "taken away" to a malicious exchange, but even if it is a well-meaning exchange, there is a concern that they will be targeted and the deposited virtual currency will be leaked due to cracking or the like.
また、異なる仮想通貨を保持する利用者間で仮想通貨を「交換」する方法では、例えば、利用者Aが利用者Bにビットコインを送金し、利用者Bが上記のモナコインを利用者Aが送金するという手順がとられる。その場合、ビットコインを受け取った利用者Bが、約束通りにモナコインを利用者Aに送金せず、ビットコインを「持ち逃げ」するおそれがある。 Further, in the method of "exchange" virtual currency between users holding different virtual currencies, for example, user A remits bitcoin to user B, and user B transfers the above MonaCoin to user A. The procedure of sending money is taken. In that case, the user B who receives the bitcoin may not send the monacoin to the user A as promised, and may "take away" the bitcoin.
このようなセキュリティ上の問題を解決するための技術として、「Atomic Swap(以下、アトミックスワップと記載する)」と呼ばれる、取引所を介さず、且つ利用者間の相対取引のリスクをも解消した仮想通貨の取引手法が提案されている(非特許文献1)。
この「アトミックスワップ」では、取引所を介さずに「トラストレス(取引所を信用せず)」にセキュアな取引が行えることはもちろん、特殊なトランザクションを介して非直接的に(間接的に)通貨の交換を行うことで、「トラストレス(相対取引の相手となる利用者を信用せず)」にセキュアな取引を行うことが出来る。「特殊なトラザクション」とは、受取人に加え、有効期限と、当事者の一方がランダムに生成(決定)した秘密の値のハッシュ値と、を指定したトランザクションである。
「アトミックスワップ」の参加者は、上記の特殊なトランザクションを互いに作成する。そして、受取人が上記ランダムに選択された秘密の値を知る場合にのみ、その受取人が特殊なトランザクションに接続するトランザクションを作成して仮想通貨を受け取ることが可能である。
なお、「秘密の値」は取引の過程で開示される必要があるため、参加者の一方のみが仮想通貨を受け取れるということがない。また、一般的には有効期限を指定した上で差出人が仮想通貨を取り戻すことが可能なようトランザクションを作成するため、アトミックスワップに失敗しても、どちらかが仮想通貨を失うということはない。
従って「アトミックスワップ」は、特殊なトランザクションを介して、間接的且つ安全な取引を行うことが出来る。
As a technology for solving such security problems, the risk of bilateral transactions between users, which is called "Atomic Swap" (hereinafter referred to as "atomic swap"), has been eliminated without going through an exchange. A virtual currency transaction method has been proposed (Non-Patent Document 1).
This "atomic swap" allows secure transactions "trustless" (without trusting the exchange) without going through an exchange, as well as indirectly (indirectly) through special transactions. By exchanging currencies, it is possible to carry out secure transactions with "trustless (without trusting the user who is the partner of the bilateral transaction)". A "special transaction" is a transaction that specifies, in addition to the recipient, an expiration date and a hash value of a secret value randomly generated (determined) by one of the parties.
Participants in "atomic swaps" create the above special transactions with each other. Then, only when the recipient knows the above-mentioned randomly selected secret value, it is possible for the recipient to create a transaction to connect to a special transaction and receive the virtual currency.
Since the "secret value" needs to be disclosed in the process of transaction, it is not possible for only one of the participants to receive the virtual currency. Also, in general, a transaction is created so that the sender can recover the virtual currency after specifying the expiration date, so even if the atomic swap fails, either one will not lose the virtual currency.
Therefore, "atomic swap" can carry out indirect and secure transactions through special transactions.
上記のように「アトミックスワップ」では、利用者間で直接の取引が可能であり、取引所を介した取引のリスクを回避出来る。
しかしながら、「アトミックスワップ」を用いて仮想通貨の売買をしようとした場合、仮想通貨の利用者同士が、希望する売買条件を交換可能なインターフェイスが従来存在せず、条件のあった取引相手を見つけることは容易ではい、という問題があった。
本発明は、以上の問題を鑑みてなされたものであり、利用者が希望する仮想通貨の取引条件をマッチングし、容易に、且つ安全に仮想通貨の取引を開始可能な仮想通貨取引装置を提供することを目的とする。
As mentioned above, with "atomic swap", direct transactions are possible between users, and the risk of transactions via exchanges can be avoided.
However, when trying to buy or sell virtual currency using "atomic swap", there is no conventional interface that allows virtual currency users to exchange desired trading conditions, and find a trading partner with conditions. There was a problem that it was not easy.
The present invention has been made in view of the above problems, and provides a virtual currency trading device capable of matching virtual currency transaction conditions desired by a user and easily and safely starting a virtual currency transaction. The purpose is to do.
本発明は、上記の課題を解決するためになされたものであり、以下の形態により実現することができる。
本発明に係る第1の形態は、第1の仮想通貨と第2の仮想通貨とを交換する取引を行う仮想通貨取引装置であって、当該仮想通貨取引装置の利用者が所望する数量の前記第1の仮想通貨と交換する前記第2の仮想通貨の数量を指定した注文内容を入力させる入力手段と、該入力手段によって入力された前記注文内容を含む、前記第1の仮想通貨の売り注文をネットワークに送出する売り注文送出手段と、ネットワークに送出された売り注文を含む板情報を表示する板情報表示手段と、を備え、前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、前記板情報表示手段は、ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に基づいた当該利用者に係る前記取引の成功の可能性を付与した前記板情報を表示する、仮想通貨取引装置を特徴とする。
本発明に係る第2の形態は、複数の仮想通貨取引装置間の仮想通貨の取引を仲介する取引サーバ装置であって、各仮想通貨取引装置は、仮想通貨の交換数量を指定した売り注文及び買い注文をネットワークに送出し、前記取引は、一の利用者からの第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、前記ネットワークに送出された売り注文に応じた板情報を生成する板情報生成手段と、前記板情報を前記仮想通貨取引装置に配信する板情報配信手段と、前記第2の送金情報に係る前記第2の仮想通貨の数量に応じて、前記取引の実行中に前記一の利用者に対して前記第2の仮想通貨を貸し付ける貸付手段と、ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に応じて、当該利用者に係る前記取引の成功の可能性を評価する評価手段と、を備え、前記貸付手段は、前記評価手段による評価結果に応じて、貸し付けする仮想通貨の数量を決定する取引サーバ装置を特徴とする。
本発明に係る第3の形態は、複数の仮想通貨取引装置間の仮想通貨の取引を仲介する取引サーバ装置であって、各仮想通貨取引装置は、第1の仮想通貨に対する第2の仮想通貨の交換数量を指定した売り注文をネットワークに送出し、前記売り注文に対応する買い注文をネットワークに送出し、前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、ネットワークに送出された売り注文に応じた板情報を生成する板情報生成手段と、前記板情報を前記仮想通貨取引装置に配信する板情報配信手段と、ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に応じて、当該利用者に係る前記取引の成功の可能性を評価する評価手段と、を備え、前記板情報生成手段は、前記評価手段による評価結果に応じて、前記売り注文に係る利用者の評価結果を前記板情報に付与する取引サーバ装置を特徴とする。
本発明に係る第4の形態は、第1の仮想通貨と第2の仮想通貨とを交換する取引を行う複数の仮想通貨取引装置と、取引サーバ装置と、を備える仮想通貨取引システムであって、前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、前記仮想通貨取引装置は、当該仮想通貨取引装置の利用者が所望する数量の前記第1の仮想通貨と交換する前記第2の仮想通貨の数量を指定した注文内容を入力させる入力手段と、該入力手段によって入力された前記注文内容を含む、前記第1の仮想通貨の売り注文をネットワークに送出する売り注文送出手段と、ネットワークに送出された売り注文を含む板情報を表示する板情報表示手段と、を備え、前記取引サーバ装置は、前記ネットワークに送出された売り注文に応じた板情報を生成する板情報生成手段と、前記ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に応じて、当該利用者に係る前記取引の成功の可能性を評価する評価手段と、前記評価手段による評価結果に応じて、前記売り注文に係る利用者の評価結果を前記板情報に付与し、前記板情報を前記仮想通貨取引装置に配信する板情報配信手段と、を備え、前記仮想通貨取引装置の前記板情報表示手段は、前記板情報配信手段によって配信された前記板情報を表示する、仮想通貨取引システムを特徴とする。
The present invention has been made to solve the above problems, and can be realized by the following forms.
The first embodiment according to the present invention is a virtual currency trading device for exchanging a first virtual currency and a second virtual currency, and the quantity desired by the user of the virtual currency trading device is described above. A sell order for the first virtual currency, which includes an input means for inputting an order content specifying a quantity of the second virtual currency to be exchanged for the first virtual currency, and the order content input by the input means. The transaction comprises a sell order sending means for sending a sell order to the network and a board information display means for displaying board information including the sell order sent to the network, and the transaction is the first virtual currency from one user. The first remittance information including the specific information indicating the remittance, the first receipt information indicating the receipt of the second virtual currency sent to the one user, and the said from another user. The second remittance information including the specific information indicating the remittance of the second virtual currency and the second receipt information indicating the receipt of the first virtual currency remitted to the other user are The board information display means is based on the number of the first received information with respect to the number of the first remittance information related to a specific user, which is made public to the network. It is characterized by a virtual currency trading device that displays the board information that gives the possibility of success of the transaction related to the user.
The second aspect according to the present invention is a transaction server device that mediates the transaction of virtual currency between a plurality of virtual currency trading devices, and each virtual currency trading device is a sell order and a sell order in which the exchange quantity of the virtual currency is specified. A buy order is sent to the network, and the transaction is the first remittance information including specific information indicating the remittance of the first virtual currency from one user, and the first remittance sent to the one user. To the other user, the first receipt information indicating the receipt of the second virtual currency, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the other user. The second receipt information indicating the receipt of the first virtual currency sent by the user and the second receipt information indicating the receipt of the first virtual currency sent to the network are made public on the network, and the board information for generating the board information according to the sell order sent to the network is generated. According to the generation means, the board information distribution means for distributing the board information to the virtual currency trading device, and the quantity of the second virtual currency related to the second remittance information, the above-mentioned one during execution of the transaction. According to the lending means for lending the second virtual currency to the user and the number of the first received information with respect to the number of the first remittance information related to the specific user published on the network. The transaction server is provided with an evaluation means for evaluating the possibility of success of the transaction related to the user, and the lending means determines the quantity of virtual currency to be loaned according to the evaluation result by the evaluation means. It features a device.
A third mode according to the present invention is a transaction server device that mediates a transaction of virtual currency between a plurality of virtual currency trading devices, and each virtual currency trading device is a second virtual currency with respect to the first virtual currency. A sell order with a specified exchange quantity is sent to the network, a buy order corresponding to the sell order is sent to the network, and the transaction is specific information indicating the transfer of the first virtual currency from one user. The first remittance information including the above, the first receipt information indicating the receipt of the second virtual currency sent to the one user, and the second virtual currency from another user. The second remittance information including the specific information indicating the remittance and the second receipt information indicating the receipt of the first virtual currency sent to the other user are disclosed to the network. A board information generation means for generating board information according to a sell order sent to the network, a board information distribution means for distributing the board information to the virtual currency trading device, and a board information distribution means which is open to the network. The present invention comprises an evaluation means for evaluating the possibility of success of the transaction relating to the user according to the number of the first received information relative to the number of the first remittance information relating to the specific user. The board information generating means is characterized by a transaction server device that assigns a user's evaluation result related to the sell order to the board information according to the evaluation result by the evaluation means.
A fourth aspect according to the present invention is a virtual currency trading system including a plurality of virtual currency trading devices for exchanging a first virtual currency and a second virtual currency, and a trading server device. In the transaction, the first remittance information including specific information indicating the remittance of the first virtual currency from one user and the second virtual currency remitted to the one user The first receipt information indicating receipt, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the remittance sent to the other user. The second receipt information indicating the receipt of the first virtual currency is disclosed on the network, and the virtual currency trading device is the first in the quantity desired by the user of the virtual currency trading device. A network of input means for inputting an order content specifying the quantity of the second virtual currency to be exchanged for the virtual currency of the first virtual currency, and a sell order of the first virtual currency including the order content input by the input means. The transaction server device includes a sell order sending means to be sent to the network and a board information display means for displaying board information including the sell order sent to the network, and the transaction server device is a board corresponding to the sell order sent to the network. The board information generating means for generating information and the number of the first received information with respect to the number of the first remittance information related to the specific user published on the network. The evaluation means for evaluating the possibility of success of the transaction and the evaluation result of the user related to the sell order are added to the board information according to the evaluation result by the evaluation means, and the board information is used for the virtual currency transaction. The board information display means of the virtual currency trading device includes a board information distribution means to be distributed to the device, and the board information display means of the virtual currency trading device is characterized by a virtual currency trading system that displays the board information delivered by the board information distribution means. ..
以上のように構成したので、本発明によれば、利用者が希望する仮想通貨の取引条件をマッチングし、容易に、且つ安全に仮想通貨の取引を開始可能な仮想通貨取引装置を実現することが出来る。 With the above configuration, according to the present invention, it is possible to realize a virtual currency transaction device capable of matching the transaction conditions of the virtual currency desired by the user and easily and safely starting the transaction of the virtual currency. Can be done.
以下に、図面を参照して本発明の実施の形態を詳細に説明する。
図1は、本実施形態の仮想通貨取引装置が適用されるシステムの構成を示す概略図である。
図1(a)は、本実施形態の仮想通貨取引装置としての端末装置を含むネットワークの構成を示す概略図である。
本実施形態に係るシステム1において、複数の利用者の利用に係る仮想通貨取引装置(以下、端末装置)10a、10b、10c・・がインターネットを介して相互に接続されている。
さらにインターネットには、ブロックチェーンネットワークに参加してマイニング作業を行うマイナーが用いる多数のマイナー装置30と、端末装置10a、10b、10c・・の利用者が、下記に説明するアトミックスワップによる仮想通貨の交換などの取引を行う際に必要となる板情報の提供などを行う取引サーバ40と、が接続されている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a schematic diagram showing a configuration of a system to which the virtual currency trading device of the present embodiment is applied.
FIG. 1A is a schematic diagram showing a configuration of a network including a terminal device as a virtual currency trading device of the present embodiment.
In the
Furthermore, on the Internet, a large number of
多数のマイナー装置30x(30x−1、30x−2・・・)やクライアント装置によってブロックチェーンネットワークxが構成され、多数のマイナー装置30y(30y−1、30y−2・・・)やクライアント装置によってブロックチェーンネットワークyが構成されている。
これらのブロックチェーンネットワークは、P2P(Peer to Peer)ネットワークであり、ブロックチェーンネットワークxは仮想通貨Xのネットワーク、ブロックチェーンネットワークyは仮想通貨Yのネットワークである。
The blockchain network x is composed of a large number of
These blockchain networks are P2P (Peer to Peer) networks, the blockchain network x is a network of virtual currency X, and the blockchain network y is a network of virtual currency Y.
ブロックチェーンには、仮想通貨に用いられるものを含め、多くのものが存在している。仮想通貨にも、代表的なビットコインの他に、アルトコインと呼ばれるものが知られている。アルトコインの代表的なものとして、Ethereum(イーサリアム)やMonacoinなどが知られている。 There are many blockchains, including those used for cryptocurrencies. In addition to typical Bitcoin, altcoin is also known as a virtual currency. Ethereum, Monacoin, etc. are known as typical altcoins.
インターネット上においてはビットコインを運営、機能させるためのブロックチェーンネットワークや、各種アルトコインの運営、機能させるためのブロックチェーンネットワークが存在する。
各ブロックチェーンネットワークには、それぞれマイナー装置30が多く接続されて、プルーフオブワーク作業を行っている。また、ブロックチェーンネットワーク(仮想通貨)によっては、マイニングとしてプルーフオブワーク作業を行わないものもある。
On the Internet, there are blockchain networks for operating and functioning Bitcoin, and blockchain networks for operating and functioning various altcoins.
Many
いずれの場合においても、ブロックチェーンネットワークは、中央集権的なサーバを持たないP2Pネットワークである。ブロックチェーンは、ブロックチェーンネットワークに属するそれぞれのマイナー装置が有するストレージやサーバ装置、プールサーバに備えるストレージに、同じものが格納されている。ブロックチェーンが、分散型取引台帳と呼ばれる所以である。 In either case, the blockchain network is a P2P network that does not have a centralized server. The same blockchain is stored in the storage of each minor device belonging to the blockchain network, the server device, and the storage provided in the pool server. This is why blockchain is called a decentralized transaction ledger.
図1(b)は、ブロックチェーンネットワークに属する装置が有するブロックチェーンを示す図である。
図1(b)を用いて、ブロックチェーンの概略を説明する。
ブロックチェーンは、逐次発生する取引情報などをブロック単位で接続することにより成立する。
FIG. 1B is a diagram showing a blockchain included in a device belonging to a blockchain network.
The outline of the blockchain will be described with reference to FIG. 1 (b).
A blockchain is established by connecting transaction information and the like that are generated sequentially in block units.
すなわち、ブロックチェーン技術では、取引記録や契約など、内容を保証したいデータ(の集合)をブロックという単位で扱う。このブロックを所定の方法で一繋ぎすなわちチェーン状に接続したものがブロックチェーンである。ブロックチェーンの生成にあたってはハッシュ関数が用いられており、ハッシュ関数は任意長の任意データに対して固定長のハッシュ値を求めるための関数である。
ハッシュ関数には一方向性という特徴があり、任意データからハッシュ値を求めることは容易であるが、逆に、ハッシュ値から元のデータを復元することは現実的には不可能であるとされる。
That is, in blockchain technology, data (a set) whose contents are to be guaranteed, such as transaction records and contracts, is handled in units called blocks. A blockchain is a block in which these blocks are connected by a predetermined method, that is, connected in a chain shape. A hash function is used in the generation of the blockchain, and the hash function is a function for obtaining a fixed-length hash value for arbitrary data of arbitrary length.
The hash function has the characteristic of being one-way, and it is easy to obtain the hash value from arbitrary data, but conversely, it is said that it is practically impossible to restore the original data from the hash value. NS.
ブロックチェーンに対して新たなブロックを接続するためには、チェーンにおける直前のブロックのハッシュ値と、接続すべき新たなブロックのトランザクションデータを1まとめにしたマークルルートと呼ばれるデータ、Nonce値と呼ばれる数値(例えば32bit固定長数値)を接続したデータに対してハッシュ値(例えば、SHA−256ハッシュ)を計算した時にその上位数ビット(例えば10Bit)が0となるような、Nonce値を求める。 In order to connect a new block to the blockchain, the hash value of the previous block in the chain and the transaction data of the new block to be connected are combined into one data called Merkle root, which is called the Nonce value. When the hash value (for example, SHA-256 hash) is calculated for the data to which the numerical value (for example, 32 bit fixed length numerical value) is connected, the nonce value such that the upper few bits (for example, 10 bit) become 0 is obtained.
SHA−256ハッシュ値は、ほぼランダムな256bitの値となるため、あるNonce値を選んだ時に上位10bitが0となる確率は1024分の1となるが、上記したハッシュ関数の一方向性によって、基本的に、全てのNonce値に対して総当たりで、上記のハッシュ値の上位ビットが0となるか否かを検証するより他に方法がない。この総当たりでの検証を行って、ハッシュ値の上位ビットが0となるNonce値を見つけ、報告してブロックを承認する作業は、マイニング、あるいはプルーフオブワーク(Proof of Work,PoW)と呼ばれる。
その結果、図1(b)に示すように、ブロックチェーンの各ブロックは、そのブロックのデータと、直前のブロックのハッシュ値と、Nonce値と、を含んでいる。
Since the SHA-256 hash value is an almost random 256-bit value, the probability that the top 10 bits will be 0 when a certain Nonce value is selected is 1/1024, but due to the unidirectionality of the hash function described above, Basically, there is no other way than verifying whether or not the upper bit of the above hash value is 0 in a round robin for all Nonce values. The work of performing this brute force verification, finding the Nonce value in which the high-order bit of the hash value is 0, reporting it, and approving the block is called mining or proof of work (PoW).
As a result, as shown in FIG. 1 (b), each block of the blockchain includes the data of the block, the hash value of the immediately preceding block, and the Nonce value.
このようなブロックチェーンは、各ブロックが直前のブロックのハッシュ値を持っているため、先端の(起点となる最古の)ブロックから順に辿ることで、全てのブロックの正当性を確認することが出来る。
なお途中のブロックを改ざんしようとすると、そのブロック以降全てのブロックのNonce値を再計算する必要があるが、上記した総当たりを全てのブロックについて行うしかないため、計算量的に不可能である。
このような特徴を有することで、ブロックチェーンの信頼性は担保されている。
In such a blockchain, since each block has the hash value of the immediately preceding block, it is possible to confirm the validity of all blocks by tracing in order from the leading (oldest starting point) block. You can.
If you try to tamper with a block in the middle, you need to recalculate the Nonce value of all blocks after that block, but it is impossible in terms of computational complexity because the above-mentioned brute force must be performed for all blocks. ..
By having such a feature, the reliability of the blockchain is guaranteed.
図1に示したように異なるブロックチェーンネットワーク、異なる仮想通貨が存在する中で、仮想通貨同士を交換したいという需要があり、そのための安全な仕組みとして、例えばアトミックスワップと呼ばれるものがすでに知られている。
従来、仮想通貨の利用者は、自己の保有する仮想通貨を別の仮想通貨に交換(両替)したいと考えたとき、取引所を利用するか、異なる仮想通貨(暗号通貨)を保持する利用者間で、それぞれの仮想通貨が有する仕組みを利用して相互で送金取引を行う他は選択肢がなかった。
取引所を利用した方法では、例えば、ビットコインを所持する利用者Aが、モナコインを所望する場合、ある取引所にビットコインを預け、それと同価値のモナコインの支払いを取引所から受ける。あるいは、モナコインを所持する利用者Bが、ビットコインを所望する場合、ある取引所にモナコインを預け、それと同価値のビットコインの支払いを取引所から受ける。
As shown in Fig. 1, there is a demand for exchanging virtual currencies in the presence of different blockchain networks and different virtual currencies, and as a safe mechanism for that, for example, what is called atomic swap is already known. There is.
Conventionally, when a virtual currency user wants to exchange (exchange) his / her own virtual currency for another virtual currency, he / she uses an exchange or holds a different virtual currency (crypto currency). There was no choice but to make mutual remittance transactions using the mechanism of each virtual currency.
In the method using an exchange, for example, when a user A who holds Bitcoin desires MonaCoin, he / she deposits Bitcoin at a certain exchange and receives payment of MonaCoin of the same value from the exchange. Alternatively, when the user B who owns MonaCoin desires Bitcoin, he / she deposits MonaCoin at a certain exchange and receives payment of Bitcoin of the same value from the exchange.
このような取引所を利用した仮想通貨の取引では、第三者である取引所を信頼し、取引所に仮想通貨を預けるかたちとなる。
預けた仮想通貨を悪意ある取引所に「持ち逃げ」されるリスクはもちろんあるが、善意の取引所であっても、それらが狙われ、預けた仮想通貨がクラッキングなどによって流出するという懸念がある。
In the transaction of virtual currency using such an exchange, the virtual currency is deposited in the exchange by trusting the exchange which is a third party.
Of course, there is a risk that the deposited virtual currency will be "taken away" to a malicious exchange, but even if it is a well-meaning exchange, there is a concern that they will be targeted and the deposited virtual currency will be leaked due to cracking or the like.
このようなリスクを嫌い、異なる仮想通貨を保持する利用者間で仮想通貨を「交換」することも出来る。
この方法では、交換レートを利用者間で決められるというメリットもあるが、このような相対での取引では、例えば、利用者Aが利用者Bにビットコインを送金し、利用者Bがモナコインを利用者Aに送金するという手順がとられる。
その場合、ビットコインを受け取った利用者Bが、約束通りにモナコインを利用者Aに送金せず、ビットコインを「持ち逃げ」するおそれがある。
It is also possible to dislike such risks and "exchange" virtual currencies between users who hold different virtual currencies.
This method has the advantage that the exchange rate can be determined between users, but in such bilateral transactions, for example, user A remits bitcoin to user B, and user B sends Monacoin. The procedure of sending money to user A is taken.
In that case, the user B who receives the bitcoin may not send the monacoin to the user A as promised, and may "take away" the bitcoin.
このように、取引所を用いた方法にも、利用者間で仮想通貨を交換する方法にも、無視できないセキュリティリスクが存在する。
アトミックスワップは、異なる仮想通貨を交換するにあたってのセキュリティ上の問題を解決するための技術であり、取引所を介さずに「トラストレス(取引所を信用せず)」にセキュアな取引を行えることはもちろん、特殊なトランザクションを介して非直接的(間接的に)に通貨の交換を行うことで、「トラストレス(相対取引の相手となる利用者を信用せず)」にセキュアな取引を行うことが可能な仮想通貨の取引(交換)手法である。
As described above, there are security risks that cannot be ignored in both the method using the exchange and the method of exchanging virtual currencies between users.
Atomic swap is a technology to solve security problems when exchanging different virtual currencies, and it is possible to perform secure transactions "trustless" (without trusting the exchange) without going through the exchange. Of course, by exchanging currencies indirectly (indirectly) through special transactions, secure transactions are carried out with "trustless (without trusting the users who are the counterparts of bilateral transactions)". It is a virtual currency transaction (exchange) method that is possible.
なお、本明細書において、「仮想通貨を利用者に対して送金」するとは、あくまで便宜的な表現である。
ビットコインをはじめとした仮想通貨においては、仮想通貨の「送金」は、ネットワーク上に分散して記録される所定単位の仮想通貨(通貨価値)(ビットコインではUTXO:Unspent Transaction Outputと呼ぶ)を、利用者の公開鍵あるいは公開鍵ハッシュとしてのアドレスによってロックする処理である。
「UTXO」は、後述する「トランザクション」において他のトランザクションと未だ接続されていないアウトプットを意味し、所有者の公開鍵を記載したScriptPubKeyを含んでいる。
UTXOをロックしている公開鍵の所有者がUTXOの所有者であり、当該UTXOが、その所有者が所有する仮想通貨の残高である。
In this specification, "remittance of virtual currency to users" is just a convenient expression.
In virtual currencies such as Bitcoin, the "transfer" of virtual currency is a virtual currency (currency value) of a predetermined unit that is distributed and recorded on the network (in Bitcoin, it is called UTXO: Unsent Transition Output). , It is a process of locking by the address as the user's public key or public key hash.
"UTXO" means an output that is not yet connected to another transaction in a "transaction" described below, and includes a ScriptPubKey that describes the owner's public key.
The owner of the public key that locks UTXO is the owner of UTXO, and the UTXO is the balance of the virtual currency owned by the owner.
仮想通貨の「送金」とは、直前の所有者の公開鍵、あるいは公開鍵ハッシュによってロックされているUTXOを、上記直前の所有者が生成した電子署名によってアンロックすることで、新たに作成したトランザクションと接続し、その新たに作成したトランザクションのUTXOを、次の所有者の公開鍵、あるいは公開鍵ハッシュによって再度ロックする処理である。
そして、この「トランザクション」をブロックチェーンネットワークに対して広報(ブロードキャスト)し、トランザクションが承認されてブロックチェーンに組み込まれることで「送金(UTXOの所有権の移転)」が行われる。
The virtual currency "transfer" is newly created by unlocking the UTXO locked by the public key of the previous owner or the public key hash by the electronic signature generated by the previous owner. This is a process of connecting to a transaction and re-locking the UTXO of the newly created transaction with the public key of the next owner or the public key hash.
Then, this "transaction" is publicized (broadcast) to the blockchain network, and the transaction is approved and incorporated into the blockchain to perform "remittance (transfer of ownership of UTXO)".
仮想通貨の「送金」に際して行われることは、UTXOをアンロックして新たなトランザクションと接続し、その新たなトランザクションが新たなブロックの一部として承認されることであり、何らかの価値情報がデータとして利用者の端末装置間でやりとりされることはない。金銭的価値を示すデータが端末装置間で授受されるわけでもない。
従って、端末装置内に、仮想通貨(の残高)を示す情報が格納されることはない。この点において、仮想通貨は、Felica(登録商標)など、ICチップ内に残高情報を有する一部の電子マネーとは本質的に異なる。
端末装置にインストールされた「ウォレット」ソフトウェアは、利用者の公開鍵あるいは公開鍵ハッシュに紐付けられたUTXOをブロックチェーンネットワークから検索することによって、利用者が有する仮想通貨の「残高」を利用者に提示することが出来る。
What is done when "transferring" virtual currency is to unlock the UTXO, connect it to a new transaction, and the new transaction is approved as part of a new block, and some value information is used as data. There is no exchange between the user's terminal devices. Data indicating monetary value is not exchanged between terminal devices.
Therefore, the information indicating (balance) of the virtual currency is not stored in the terminal device. In this respect, virtual currencies are essentially different from some electronic money, such as Felica®, which has balance information in the IC chip.
The "wallet" software installed on the terminal device searches the blockchain network for the UTXO associated with the user's public key or public key hash to obtain the "balance" of the user's virtual currency. Can be presented to.
図2は、仮想通貨のトランザクションを概説するための図であり、(a)はトランザクションの基本的な構成を概念で示す図、(b)は、前トランザクションに対して、新規トランザクションを接続したときの状態を示す図である。
「トランザクション」は、送金元から送金先への通貨価値の転送(移転)を記号化したものであり、図2(a)に示すように、送金元を示すフィールドであるインプットと、送金先を示すフィールドであるアウトプットと、を有する。
また、「アウトプット」には、送金額と、ScirptPubKeyと、を含む。
ScriptPubKeyは、このアウトプット(トランザクション)をアンロックするための条件を定義したスクリプト言語である。
ScriptPubKeyには、一般的には、特定の秘密鍵による電子署名によってのみアンロックが可能となるようなスクリプトが記述されており、これによって、仮想通貨の所有権が、該当する秘密鍵を所有する送金先のアカウント(利用者)のものとなる。
「インプット」は、UTXOを使うために、ScriptSigと呼ばれるUTXOのロックを解除するためのスクリプトを含む。ScriptSigは主に、ScriptPubKeyで要求されるUTXOのアンロックのための電子署名である。
FIG. 2 is a diagram for outline a transaction of virtual currency, (a) is a diagram conceptually showing the basic structure of a transaction, and (b) is a diagram when a new transaction is connected to a previous transaction. It is a figure which shows the state of.
A "transaction" is a symbol of the transfer (transfer) of currency value from a remittance source to a remittance destination. It has an output, which is a field to indicate.
In addition, the "output" includes the remittance amount and the ScriptPubKey.
ScriptPubKey is a scripting language that defines conditions for unlocking this output (transaction).
In general, ScriptPubKey describes a script that can be unlocked only by digital signature with a specific private key, so that the ownership of the virtual currency owns the corresponding private key. It belongs to the account (user) of the remittance destination.
The "input" includes a script for unlocking the UTXO called ScriptSigma in order to use the UTXO. The ScriptSig is mainly an electronic signature for unlocking the UTXO required by the ScriptPubKey.
図2(b)に示すように、前トランザクションにおいてIndex0で特定されるScirptPubKeyに対応するアウトプットに、新規トランザクションが接続されている。
Index1で特定されるScirptPubKeyに対応するアウトプットには、新規トランザクションが接続されていないため、当該アウトプットは、UTXOのままである。
As shown in FIG. 2B, a new transaction is connected to the output corresponding to the ScriptPubKey specified by Index0 in the previous transaction.
Since no new transaction is connected to the output corresponding to the ScriptPubKey specified in Index1, the output remains UTXO.
新規トランザクションは、前トランザクションのScriptPubKeyで求められる新規トランザクションを接続した(する)利用者の電子署名を含むScriptSigと、接続先の前トランザクションを特定するためのトランザクションIDとしての前トランザクション全体のハッシュ値(トランザクションハッシュ)と、前トランザクションにおける接続先のScriptPubKeyを特定するためのIndexと、をインプットに含む。
アウトプットには、新規トランザクションのUTXOを、接続した利用者にロックするための公開鍵(公開鍵ハッシュ)を含むScriptPubKeyが含まれる。
新規トランザクションのインプットに付される電子署名は、新規トランザクションのScriptSigを除くデータと、前トランザクションにおける接続されたScriptPubKeyと、のハッシュ値を、秘密鍵を用いて暗号化することで生成される。
The new transaction is a ScriptSigma containing the electronic signature of the user who connected (or does) the new transaction obtained by the ScriptPubKey of the previous transaction, and the hash value of the entire previous transaction as the transaction ID for specifying the previous transaction of the connection destination ( Transaction hash) and Index for identifying the ScriptPubKey to connect to in the previous transaction are included in the input.
The output includes a ScriptPubKey containing a public key (public key hash) for locking the UTXO of a new transaction to the connected user.
The electronic signature attached to the input of the new transaction is generated by encrypting the hash values of the data excluding the ScriptSigma of the new transaction and the connected ScriptPubKey in the previous transaction using the private key.
図3は、アトミックスワップの基本的な仕組みを概説する図である。
上記のように、アトミックスワップは、利用者A、利用者B間における、異なるブロックチェーンネットワークに係る異なる仮想通貨の交換取引に係る手法である。
利用者Aは仮想通貨X(例えばビットコイン)を利用者Bに対して「送金」し、利用者Bは、利用者Aとの間で予め決定した交換レートにて、相当額の仮想通貨Y(例えばモナコイン)を利用者Aに「送金」する。
FIG. 3 is a diagram outlining the basic mechanism of atomic swap.
As described above, atomic swap is a method for exchanging different virtual currencies related to different blockchain networks between users A and B.
User A "remittances" virtual currency X (for example, Bitcoin) to user B, and user B has a considerable amount of virtual currency Y at a predetermined exchange rate with user A. "Send money" (for example, MonaCoin) to user A.
ここで説明する例では、利用者Aが先に仮想通貨Xを「送金」し、利用者Bが後から仮想通貨Yを「送金」する。
なお、アトミックスワップの前に、換金レートの決定とともに、公開鍵を利用者間で交換しておく。この他の処理はオンチェーン処理(ブロックチェーンの仕組みを利用した処理)であるが、公開鍵の交換は、E−mailやその他の手段で実行可能な手続である。
In the example described here, the user A "remittances" the virtual currency X first, and the user B "remittances" the virtual currency Y later.
Before the atomic swap, the public key is exchanged between users together with the determination of the conversion rate. Other processing is on-chain processing (processing using a blockchain mechanism), but public key exchange is a procedure that can be executed by E-mail or other means.
アトミックスワップにおいては、利用者Aがランダムに選択した値(後述する秘密の値R)から逆算不可能な方法で生成された値(秘密の値Rのハッシュ値H)を使用する。
まず、送金対象である利用者Aの仮想通貨Xは、利用者Aの公開鍵又は公開鍵ハッシュでロックされた利用者Aの所有に係る仮想通貨のUTXOである。
このUTXOは、現在の所有者である利用者Aの電子署名によってアンロックされる。
そして、利用者A側の端末装置では、上記ランダムに選択された値(秘密の値R)が付与され、かつ利用者Bの持つ秘密鍵により生成可能な電子署名が付与されていること、をアンロックの条件としたScriptPubKey(アウトプット)をUTXOとして持つ特殊なトランザクションが作成されて(上記アンロックしたUTXOに接続され)「送金」が行われる。
In atomic swap, a value (hash value H of secret value R) generated by a method that cannot be back-calculated from a value randomly selected by user A (secret value R described later) is used.
First, the virtual currency X of the user A to be remitted is the UTXO of the virtual currency owned by the user A locked by the public key of the user A or the public key hash.
This UTXO is unlocked by the electronic signature of the current owner, User A.
Then, the terminal device on the user A side is given the above-mentioned randomly selected value (secret value R) and is given an electronic signature that can be generated by the private key possessed by the user B. A special transaction having the SignaturePubKey (output) as the unlock condition as the UTXO is created (connected to the unlocked UTXO), and "remittance" is performed.
また、何らかの理由でアトミックスワップが失敗した場合に備えて、TimeLockを設定することで、一定時間が経過し、且つ利用者Aの持つ秘密鍵による生成可能な電子署名が付与されていることも、上記特殊なトランザクションのアンロック条件として加えることが、一般的に行われている。
上記特殊なトランザクションを作成した時点では、そのUTXOには、如何なるトランザクションも接続されておらず、誰の所有に係るものでもない。一定時間が経過した後には、利用者Aは、そのUTXOのロックを自らの電子署名でアンロックして取り戻すことが可能である。
In addition, by setting TimeLock in case the atomic swap fails for some reason, a certain period of time has passed and an electronic signature that can be generated by the private key of the user A is given. It is generally added as an unlock condition for the above-mentioned special transaction.
At the time of creating the special transaction, no transaction is connected to the UTXO and it is not owned by anyone. After a certain period of time has passed, the user A can unlock the UTXO lock with his / her own electronic signature and recover it.
また利用者B側について、送金対象である利用者Bの仮想通貨Yは、利用者Bの公開鍵又公開鍵ハッシュでロックされた利用者Bの所有に係る仮想通貨のUTXOである。
このUTXOは、利用者Bの電子署名によってアンロックされる。
そして、利用者Aがランダムに選択した上記の値(秘密の値R)が付与され、かつ利用者Aの持つ秘密鍵により生成可能な電子署名が付与されていること、をアンロックの条件としたScriptPubKeyをUTXOとして持つ特殊なトランザクションが作成されて(上記アンロックしたUTXOに接続され)「送金」が行われる。
On the user B side, the virtual currency Y of the user B to be remitted is the UTXO of the virtual currency owned by the user B locked by the public key of the user B or the public key hash.
This UTXO is unlocked by the electronic signature of the user B.
Then, the unlock condition is that the above value (secret value R) randomly selected by the user A is given, and an electronic signature that can be generated by the private key of the user A is given. A special transaction having the above-mentioned ScriptPubKey as UTXO is created (connected to the unlocked UTXO), and "remittance" is performed.
また、アトミックスワップが失敗した場合に備えて、TimeLockを設定することで、一定時間が経過し、且つ利用者Bの持つ秘密鍵による生成可能な電子署名が付与されていることも特殊なトランザクションのアンロック条件として加えられる。
上記特殊なトランザクションを作成した時点では、そのUTXOには、如何なるトランザクションも接続されておらず、誰の所有に係るものでもない。一定時間が経過した後には、利用者Bは、そのUTXOのロックを自らの電子署名でアンロックして取り戻すことが可能である。
In addition, in case of atomic swap failure, by setting TimeLock, a certain period of time has passed and an electronic signature that can be generated by the private key of user B is given, which is also a special transaction. Added as an unlock condition.
At the time of creating the special transaction, no transaction is connected to the UTXO and it is not owned by anyone. After a certain period of time has passed, the user B can unlock the UTXO lock with his / her own electronic signature and recover it.
なお、利用者Bが「送金」のために作成した特殊なトランザクションがUTXOのアンロックの条件としている秘密の値Rと、利用者Aの持つ秘密鍵により生成可能な電子署名と、を付与した新たなトランザクションが作成されることで上記特殊なトランザクションがアンロックされ、且つ新たなトランザクションのUTXOが自らの公開鍵でロックされることで、利用者Aは利用者Bが送金した仮想通貨を受け取ることが出来る(UTXOの所有権が利用者Bから利用者Aに移る)。
一方で、利用者Aが「送金」のために作成した特殊なトランザクションがUTXOのアンロックの条件としている秘密の値Rと、利用者Bの持つ秘密鍵により生成可能な電子署名と、を付与した新たなトランザクションが作成されることで上記特殊なトランザクションがアンロックされ、且つ新たなトランザクションのUTXOが自らの公開鍵でロックされることで、利用者Bは利用者Aが送金した仮想通貨を受け取ることが出来る(UTXOの所有権が利用者Aから利用者Bに移る)。
In addition, a special transaction created by user B for "transfer" has given a secret value R, which is a condition for unlocking UTXO, and an electronic signature that can be generated by the private key of user A. When a new transaction is created, the above special transaction is unlocked, and when the UTXO of the new transaction is locked with its own public key, user A receives the virtual currency sent by user B. (The ownership of UTXO is transferred from user B to user A).
On the other hand, a special transaction created by user A for "transfer" assigns a secret value R, which is a condition for unlocking UTXO, and an electronic signature that can be generated by the private key possessed by user B. When the new transaction is created, the above special transaction is unlocked, and the UTXO of the new transaction is locked with its own public key, so that the user B transfers the virtual currency sent by the user A. It can be received (the ownership of UTXO is transferred from user A to user B).
アトミックスワップについて、より詳細に説明する。
ステップ(1)において、利用者Aが利用する端末装置10は、仮想通貨Xを利用者Bに「送金」する第1トランザクションTx1を作成し、ネットワークに送出(ブロードキャスト)する。
第1トランザクションTx1のアウトプットにおけるScriptPubKeyには、利用者Aがランダムに選択した秘密の値Rのハッシュ値Hと、送金先である利用者Bの公開鍵(または、公開鍵ハッシュとしてのアドレス)と、が記載されている。
Atomic swap will be described in more detail.
In step (1), the terminal device 10 used by the user A creates a first transaction Tx1 that "transfers" the virtual currency X to the user B, and sends (broadcasts) it to the network.
In the ScriptPubKey in the output of the first transaction Tx1, the hash value H of the secret value R randomly selected by the user A and the public key (or the address as the public key hash) of the user B who is the remittance destination). And are described.
具体的には、第1トランザクションTx1のScriptPubKeyは、このアウトプット(UTXO)のアンロック条件として、(1)ScriptPubKeyに記載された秘密の値Rのハッシュ値と、第1トランザクションTx1に対応するトランザクションに記載された秘密の値Rのハッシュ値との一致確認、(2)受け取り側(送金先)の電子署名と公開鍵の検証を求める。
すなわち、利用者Aがランダムに選択した秘密の値Rと、受け取り側の利用者Bの電子署名及び公開鍵と、が対応するトランザクションのインプットで指定されたとき、第1トランザクションTx1のアウトプット(UTXO)をアンロックできる。
また、第1トランザクションTx1のScriptPubKeyは、上記TimeLockの期限が過ぎた(タイムアウト)後、(1)送金元の公開鍵、(2)送金元の電子署名が入力されたときに、タイムスタンプの確認と署名の検証を求める。
Specifically, the ScriptPubKey of the first transaction Tx1 has, as the unlock condition of this output (UTXO), (1) the hash value of the secret value R described in the ScriptPubKey and the transaction corresponding to the first transaction Tx1. Confirmation of matching with the hash value of the secret value R described in (2) Verification of the electronic signature and public key of the recipient (sending destination) is requested.
That is, when the secret value R randomly selected by user A and the electronic signature and public key of user B on the receiving side are specified in the input of the corresponding transaction, the output of the first transaction Tx1 ( UTXO) can be unlocked.
In addition, the ScriptPubKey of the first transaction Tx1 confirms the time stamp when (1) the public key of the remittance source and (2) the electronic signature of the remittance source are input after the expiration date (timeout) of the TimeLock. And ask for signature verification.
すなわち、第1トランザクションTx1のアウトプット(UTXO)のアンロック条件は、
(タイムアウト前)利用者Bの電子署名と公開鍵、利用者Aがランダムに選択した秘密の値R
(タイムアウト後)利用者Aの電子署名と公開鍵
である。
受け取り側の利用者Bが利用する端末装置10bは、利用者B自身の電子署名と公開鍵、秘密の値Rをインプットに記載したトランザクション(後述の第4トランザクションTx4)を作成することで、この第1トランザクションTx1を使用した仮想通貨Xの受け取りを完了することが出来る。
That is, the unlock condition of the output (UTXO) of the first transaction Tx1 is
(Before timeout) User B's digital signature and public key, user A's randomly selected secret value R
(After time-out) User A's digital signature and public key.
The terminal device 10b used by the receiving user B creates a transaction (fourth transaction Tx4 described later) in which the user B's own electronic signature, public key, and secret value R are described in the input. The receipt of the virtual currency X using the first transaction Tx1 can be completed.
上記のように、第1トランザクションTx1には、TimeLockが設定されており、第1トランザクションTx1の作成後、所定時間以内に対応するトランザクション(後述の第4トランザクション)が作成されない場合(TimeLock期限が終了すると)、取引はタイムアウトされる。この場合、送金元である利用者Aの電子署名と公開鍵によって、利用者Aへの「返金(Refund)」が可能となる。
また、第1トランザクションTx1のインプットにおけるScriptSigには、利用者Aの電子署名が含まれる。
この電子署名は、利用者Aの公開鍵又は公開鍵ハッシュにロックされている仮想通貨X(UTXO)を、(利用者Bへの)「送金」のためにアンロックするために、第1トランザクションTx1に付与される。
As described above, TimeLock is set in the first transaction Tx1, and when the corresponding transaction (fourth transaction described later) is not created within a predetermined time after the creation of the first transaction Tx1 (TimeLock deadline ends). Then) the transaction times out. In this case, the electronic signature and public key of the user A who is the remittance source enables "Refund" to the user A.
Further, the ScriptSigma in the input of the first transaction Tx1 includes the electronic signature of the user A.
This digital signature is the first transaction to unlock the virtual currency X (UTXO) locked in the public key or public key hash of user A for "remittance" (to user B). It is given to Tx1.
作成された第1トランザクションTx1は、仮想通貨Xのブロックチェーンネットワークxに公開され、ハッシュ値Hの値は、利用者B(端末装置10b)の知るところとなる。
上記のように、第1トランザクションTx1のアウトプット(UTXO)は、利用者Bの電子署名と公開鍵及び利用者Aがランダムに選択した秘密の値Rによってアンロックすることが出来る。
この時点で、利用者B(端末装置10b)は、秘密の値Rを知らないので自らの電子署名のみによって(上記第4トランザクションTx4を作成して)第1トランザクションTx1のアウトプット(UTXO)をアンロックすることが出来ない(利用者Aの仮想通貨Xを受け取ることが出来ない)。
一方で、利用者Aは、TimeLock期限前は、「送金」した仮想通貨X(ビットコイン)を回収することが出来ない。
The created first transaction Tx1 is open to the blockchain network x of the virtual currency X, and the value of the hash value H becomes known to the user B (terminal device 10b).
As described above, the output (UTXO) of the first transaction Tx1 can be unlocked by the electronic signature and public key of the user B and the secret value R randomly selected by the user A.
At this point, since the user B (terminal device 10b) does not know the secret value R, the output (UTXO) of the first transaction Tx1 is produced only by his / her own electronic signature (creating the fourth transaction Tx4). Cannot be unlocked (cannot receive user A's virtual currency X).
On the other hand, user A cannot collect the "remittance" virtual currency X (bitcoin) before the TimeLock deadline.
ステップ(2)において、利用者Bが利用する端末装置10bは、仮想通貨Yを利用者Aに「送金」する第2トランザクションTx2を作成し、仮想通貨Yのブロックチェーンネットワークyに送出(ブロードキャスト)する。
第2トランザクションTx2のアウトプットにおけるScriptPubKeyには、仮想通貨Xのブロックチェーンネットワークxに公開されているハッシュ値Hと、送金先である利用者Aの公開鍵と、が記載されている。
In step (2), the terminal device 10b used by the user B creates a second transaction Tx2 that "transfers" the virtual currency Y to the user A, and sends (broadcasts) the virtual currency Y to the blockchain network y. do.
In the ScriptPubKey in the output of the second transaction Tx2, the hash value H published on the blockchain network x of the virtual currency X and the public key of the user A who is the remittance destination are described.
上記と同様に、第2トランザクションTx2のScriptPubKeyは、このアウトプット(UTXO)のアンロック条件として、(1)ScriptPubKeyに記載された秘密の値Rのハッシュ値と、第2トランザクションTx2に対応するトランザクションに記載される秘密の値Rのハッシュ値と、の一致確認、(2)受け取り側(送金先)の電子署名と公開鍵の検証を求める。
利用者Aがランダムに選択した秘密の値Rと、受け取り側の利用者Aの電子署名及び公開鍵と、が対応するトランザクションのインプットで指定されたとき、第2トランザクションTx2のアウトプット(UTXO)をアンロックできる。
また、第2トランザクションTx2のScriptPubKeyは、上記TimeLock期限が過ぎたタイムアウト後、(1)送金元の公開鍵、(2)送金元の署名が入力されたときに、タイムスタンプの確認と署名の検証を求める。
Similar to the above, the ScriptPubKey of the second transaction Tx2 has, as the unlock condition of this output (UTXO), (1) the hash value of the secret value R described in the ScriptPubKey and the transaction corresponding to the second transaction Tx2. Confirmation of matching with the hash value of the secret value R described in (2) Verification of the electronic signature and public key of the recipient (sending destination) is requested.
The output (UTXO) of the second transaction Tx2 when the secret value R randomly selected by the user A and the digital signature and public key of the receiving user A are specified in the input of the corresponding transaction. Can be unlocked.
In addition, the ScriptPubKey of the second transaction Tx2 confirms the time stamp and verifies the signature when (1) the public key of the remittance source and (2) the signature of the remittance source are input after the timeout after the TimeLock deadline has passed. Ask for.
すなわち、第2トランザクションTx2のアウトプット(UTXO)のアンロック条件は、
(タイムアウト前)利用者Aの電子署名と公開鍵、利用者Aがランダムに選択した秘密の値R
(タイムアウト後)利用者Bの電子署名と公開鍵
である。
受け取り側の利用者Aが利用する端末装置10は、利用者A自身の電子署名と公開鍵、秘密の値Rをインプットに記載したトランザクション(後述の第3トランザクションTx3)を作成することで、この第2トランザクションTx2を使用した仮想通貨Yの受け取りを完了することが出来る。
That is, the unlock condition of the output (UTXO) of the second transaction Tx2 is
(Before timeout) User A's digital signature and public key, user A's randomly selected secret value R
(After time-out) User B's digital signature and public key.
The terminal device 10 used by the receiving user A creates a transaction (third transaction Tx3 described later) in which the user A's own electronic signature, public key, and secret value R are described in the input. The receipt of the virtual currency Y using the second transaction Tx2 can be completed.
第2トランザクションTx2には、TimeLockが設定されており、第2トランザクションTx2の作成後、所定時間以内に対応するトランザクション(後述の第3トランザクションTx3)が作成されない場合(TimeLock期限が終了すると)、取引はタイムアウトされる。この場合、送金元である利用者Bの電子署名と公開鍵によって、利用者Bへの「返金(Refund)」が可能となる。 TimeLock is set in the second transaction Tx2, and if the corresponding transaction (third transaction Tx3 described later) is not created within a predetermined time after the creation of the second transaction Tx2 (when the TimeLock deadline expires), the transaction is performed. Times out. In this case, the electronic signature and public key of the user B, who is the remittance source, enables "Refund" to the user B.
また、第2トランザクションTx2のインプットにおけるScriptSigには、利用者Bの電子署名が含まれる。
この電子署名は、利用者Bの公開鍵又は公開鍵ハッシュにロックされている仮想通貨(UTXO)を、(利用者Aへの)送金のためにアンロックするために、第2トランザクションTx2に付与される。
Further, the ScriptSigma in the input of the second transaction Tx2 includes the electronic signature of the user B.
This digital signature is given to the second transaction Tx2 to unlock the virtual currency (UTXO) locked in the public key or public key hash of user B for remittance (to user A). Will be done.
第2トランザクションTx2のアウトプット(UXTO)は、利用者Aの電子署名と公開鍵、秘密の値Rによってアンロックすることが出来る。
なお、利用者Bは、TimeLock期限前は、「送金」した仮想通貨Y(モナコイン)を回収することが出来ない。
第2トランザクションTx2は仮想通貨Yのブロックチェーンネットワークyに公開される。
The output (UXTO) of the second transaction Tx2 can be unlocked by the electronic signature of the user A, the public key, and the secret value R.
In addition, user B cannot collect the virtual currency Y (MonaCoin) that has been "transferred" before the TimeLock deadline.
The second transaction Tx2 is open to the blockchain network y of the virtual currency Y.
ステップ(3)において、利用者Aが利用する端末装置10は、仮想通貨Yを受け取るための第3トランザクションTx3を作成し、ネットワークに送出する。
第3トランザクションTx3は、第2トランザクションTx2に対応するものであり、特に、第3トランザクションTx3のScriptSig(インプット)が、第2トランザクションTx2のScriptPubKey(アウトプット)に対応する。
In step (3), the terminal device 10 used by the user A creates a third transaction Tx3 for receiving the virtual currency Y and sends it to the network.
The third transaction Tx3 corresponds to the second transaction Tx2, and in particular, the ScriptSigma (input) of the third transaction Tx3 corresponds to the ScriptPubKey (output) of the second transaction Tx2.
第3トランザクションTx3のアウトプットにおけるScriptPubKeyには、利用者Aの公開鍵(公開鍵ハッシュとしてのアドレス)が記載されている。
また、第3トランザクションTx3のインプットにおけるScriptSigには、利用者Aがランダムに選択した秘密の値R、利用者Aの電子署名と公開鍵が含まれる。
上記のように第2トランザクションTx2のScirptPubKeyでは、アウトプットのアンロック条件として、秘密の値Rと、利用者Aの電子署名及び公開鍵と、を求めており、これらに対応する内容が記載されている。
The public key (address as a public key hash) of the user A is described in the ScriptPubKey in the output of the third transaction Tx3.
Further, the ScriptSigma in the input of the third transaction Tx3 includes a secret value R randomly selected by the user A, the electronic signature of the user A, and the public key.
As described above, in the second transaction Tx2, the ScriptPubKey requires the secret value R and the electronic signature and public key of the user A as the output unlock condition, and the contents corresponding to these are described. ing.
利用者A(端末装置10)は、第3トランザクションTx3を作成して第2トランザクションTx2のアウトプット(UTXO)をアンロックし、第3トランザクションTx3のアウトプット(UTXO)を利用者Aの公開鍵又は公開鍵ハッシュにロックすることで、利用者Bが「送金」した仮想通貨Yを受けとることが出来る。
そして、第3トランザクションTx3も仮想通貨Yのブロックチェーンネットワークyに公開される(ブロードキャストされる)ため、秘密の値Rは利用者Bの知るところとなる。
User A (terminal device 10) creates the third transaction Tx3, unlocks the output (UTXO) of the second transaction Tx2, and uses the output (UTXO) of the third transaction Tx3 as the public key of the user A. Alternatively, by locking to the public key hash, the virtual currency Y "transferred" by the user B can be received.
Then, since the third transaction Tx3 is also disclosed (broadcast) to the blockchain network y of the virtual currency Y, the secret value R becomes known to the user B.
ステップ(4)において、利用者Bが利用する端末装置10bは、仮想通貨Xを受け取るための第4トランザクションTx4を作成してネットワークに送出する。
第4トランザクションTx4は、第1トランザクションTx1に対応するものであり、特に、第4トランザクションTx4のScriptSigが、第1のトランザクションTx1のScriptPubKeyに対応する。
第4トランザクションTx4のアウトプットにおけるScriptPubKeyには、利用者Bの公開鍵(公開鍵ハッシュとしてのアドレス)が記載されている。
In step (4), the terminal device 10b used by the user B creates a fourth transaction Tx4 for receiving the virtual currency X and sends it to the network.
The fourth transaction Tx4 corresponds to the first transaction Tx1, and in particular, the ScriptSigma of the fourth transaction Tx4 corresponds to the ScriptPubKey of the first transaction Tx1.
The public key (address as a public key hash) of user B is described in the ScriptPubKey in the output of the fourth transaction Tx4.
また、第4トランザクションTx4のインプットにおけるScriptSigには、(第3トランザクションTx3の結果)ブロックチェーンネットワークに公開されている秘密の値Rと、利用者Bの電子署名が含まれる。
上記のように第1トランザクションTx1のScirptPubKeyは、アウトプット(UTXO)のアンロック条件として利用者Bの電子署名と公開鍵、秘密の値Rを求めており、これらに対応する内容が記載されている。
利用者B(端末装置10b)は、第4トランザクションTx4を作成して第1トランザクションTx1のアウトプット(UTXO)をアンロックし、第4トランザクションTx4のアウトプット(UTXO)を利用者Bの公開鍵又は公開鍵ハッシュにロックすることで、利用者Aが「送金」した仮想通貨Xを受けとることが出来る。
Further, the ScriptSigma in the input of the fourth transaction Tx4 includes the secret value R disclosed to the blockchain network (as a result of the third transaction Tx3) and the electronic signature of the user B.
As described above, the ScirptPubKey of the first transaction Tx1 requests the electronic signature, public key, and secret value R of the user B as the unlock condition of the output (UTXO), and the contents corresponding to these are described. There is.
User B (terminal device 10b) creates the fourth transaction Tx4, unlocks the output (UTXO) of the first transaction Tx1, and uses the output (UTXO) of the fourth transaction Tx4 as the public key of the user B. Alternatively, by locking to the public key hash, the user A can receive the virtual currency X "transferred".
なお、図3において、仮想通貨の「送金」を示す第1トランザクションTx1、第2トランザクションTx2は、夫々、第1の「送金情報」、第2の「送金情報」と考えることが出来る。
また、仮想通貨の「受取」を示す第3トランザクションTx3、第4トランザクションTx4は、第1の「受取情報」、第2の「受取情報」と考えることが出来る。
なお、送金のための第1トランザクションTx1、第2トランザクションTx2が求める解除(アンロック)条件(受け取りのための第3トランザクションTx3、第4トランザクションTx4のインプットに必要な内容)として、送金先(受け取り側)の公開鍵が求められない場合もある。
また、受け取りのための第3トランザクションTx3、第4トランザクションTx4のアウトプットには、受け取り側の公開鍵ハッシュ(アドレス)を指定する場合や、公開鍵そのものを指定する場合がある。
In FIG. 3, the first transaction Tx1 and the second transaction Tx2 indicating the "remittance" of the virtual currency can be considered as the first "remittance information" and the second "remittance information", respectively.
Further, the third transaction Tx3 and the fourth transaction Tx4 indicating the "receipt" of the virtual currency can be considered as the first "receipt information" and the second "receipt information".
It should be noted that the remittance destination (receipt) is used as the release (unlock) condition (contents required for input of the third transaction Tx3 and the fourth transaction Tx4 for receipt) required by the first transaction Tx1 and the second transaction Tx2 for remittance. In some cases, the public key of the side) is not required.
Further, in the output of the third transaction Tx3 and the fourth transaction Tx4 for receiving, the public key hash (address) of the receiving side may be specified, or the public key itself may be specified.
トランザクションスクリプトの記載条件は様々であるが、アトミックスワップにおいて、重要であるのは秘密の値R(とそのハッシュ値H)であり、この値を知る者のみが、後続のトランザクションを繋ぎうる(UTXOをアンロックして仮想通貨を受け取ることが出来る)ということである。
以下の説明では、第3トランザクションTx3、第4トランザクションTx4のインプットにおいて受け取り側の公開鍵については指定を行わず、アウトプットには公開鍵を指定している(P2PK:Pay to Public Keyと呼ばれる方法である)が、本実施形態はそれに限定されることはない。
本実施形態は、第3トランザクションTx3、第4トランザクションTx4のインプットに受け取り側の公開鍵を記載し、アウトプットに受け取り側の公開鍵ハッシュ(アドレス)を指定する(P2PKH:Pay to Public Key Hashと呼ばれる方法である)場合をも含む。
第1トランザクションTx1、第2トランザクションTx2についても、本実施形態は、アウトプットで送金先の公開鍵を指定する場合、送金先の公開鍵ハッシュを指定する場合、のいずれをも含む。
There are various conditions for describing transaction scripts, but in atomic swaps, the secret value R (and its hash value H) is important, and only those who know this value can connect subsequent transactions (UTXO). You can unlock and receive virtual currency).
In the following description, the public key of the receiving side is not specified in the input of the third transaction Tx3 and the fourth transaction Tx4, and the public key is specified in the output (P2PK: a method called Pay to Public Key). However, the present embodiment is not limited thereto.
In the present embodiment, the public key of the receiving side is described in the input of the third transaction Tx3 and the public key of the fourth transaction Tx4, and the public key hash (address) of the receiving side is specified in the output (P2PKH: Pay to Public Key Hash). This method is also called).
Regarding the first transaction Tx1 and the second transaction Tx2, the present embodiment includes both a case where the public key of the remittance destination is specified in the output and a case where the public key hash of the remittance destination is specified.
図4は、従来のアトミックスワップの流れを詳細に説明する図である。
図3に示す第1トランザクションTx1から第4トランザクションTx4までの期間が、アトミックスワップの実行期間である。
ステップS1において、最初に仮想通貨を「送金」する側である利用者Aの端末装置10は、利用者Aの電子署名(第1トランザクションTx1用のSigA1)を生成する。この処理はハードウェアウォレットを用いて行われ、利用者Aは、端末装置10にハードウェアウォレットHW_Aを接続する。ハードウェアウォレットには、利用者Aの秘密鍵が格納されている。またハードウェアウォレットHW_Aは、格納されている秘密鍵を用いて電子署名を生成する署名生成用の処理部(回路)を有する。
FIG. 4 is a diagram for explaining the flow of the conventional atomic swap in detail.
The period from the first transaction Tx1 to the fourth transaction Tx4 shown in FIG. 3 is the execution period of the atomic swap.
In step S1, the terminal device 10 of the user A who first "transfers" the virtual currency generates the electronic signature of the user A (Sigma1 for the first transaction Tx1). This process is performed using the hardware wallet, and the user A connects the hardware wallet HW_A to the terminal device 10. The private key of user A is stored in the hardware wallet. Further, the hardware wallet HW_A has a signature generation processing unit (circuit) for generating an electronic signature using the stored private key.
ステップS2において、端末装置10は、第1トランザクションTx1を作成する。これは、仮想通貨Xを利用者Bに「送金」するためのトランザクションである。
第1トランザクションTx1は、インプット(ScriptSig)として、利用者Aの電子署名(上記のSigA1)を含み、アウトプット(ScriptPubKey)として上記した秘密の値Rのハッシュ値H、送金先である利用者Bの公開鍵(PubKeyB)を含んでいる。
また、第1トランザクションTx1のインプットは、前トランザクションのハッシュ(トランザクションID)を含んでいる。
端末装置10は、この第1トランザクションTx1を、仮想通貨Xのブロックチェーンネットワークxに対して送出する。
第1トランザクションTx1が、仮想通貨Xのブロックチェーンネットワークxに公開されると、ハッシュ値Hも公開される。
この後、望ましくは、利用者AのハードウェアウォレットHW_Aは端末装置10から取り外される。
In step S2, the terminal device 10 creates the first transaction Tx1. This is a transaction for "transferring" the virtual currency X to the user B.
The first transaction Tx1 includes the electronic signature of the user A (SigA1 described above) as the input (ScriptSigma), the hash value H of the secret value R described above as the output (ScriptPubKey), and the user B who is the remittance destination. Includes the public key (PubKeyB) of.
Further, the input of the first transaction Tx1 includes the hash (transaction ID) of the previous transaction.
The terminal device 10 sends the first transaction Tx1 to the blockchain network x of the virtual currency X.
When the first transaction Tx1 is disclosed to the blockchain network x of the virtual currency X, the hash value H is also disclosed.
After this, preferably, the hardware wallet HW_A of the user A is removed from the terminal device 10.
それを受けて、ステップS3において、後から仮想通貨を「送金」する側である利用者Bの端末装置10bにおいて、利用者Bの電子署名(第2トランザクションTx2用のSigB1)が生成される。この処理もハードウェアウォレットを用いて行われ、利用者Bは端末装置10bにハードウェアウォレットHW_Bを接続する。このハードウェアウォレットHW_Bには、利用者Bの秘密鍵が格納されている。上記と同様に、ハードウェアウォレットHW_Bは、格納されている秘密鍵を用いて電子署名を生成する署名生成用の処理部(回路)を有する。 In response to this, in step S3, the electronic signature of the user B (SigmaB1 for the second transaction Tx2) is generated in the terminal device 10b of the user B who later "transfers" the virtual currency. This process is also performed using the hardware wallet, and the user B connects the hardware wallet HW_B to the terminal device 10b. The private key of user B is stored in this hardware wallet HW_B. Similar to the above, the hardware wallet HW_B has a signature generation processing unit (circuit) for generating an electronic signature using the stored private key.
ステップS4において、端末装置10bは、第2トランザクションTx2を作成する。これは、仮想通貨Yを利用者Aに「送金」するためのトランザクションである。
第2トランザクションTx2は、インプット(ScriptSig)として、利用者Bの電子署名(上記のSigB2)を含み、アウトプット(ScriptPubKey)として、仮想通貨Xのブロックチェーンネットワークxに公開されたハッシュ値H、送金先である利用者Aの公開鍵(PubKeyA)を含んでいる。
また、第2トランザクションTx2のインプットは、前トランザクションのハッシュ(トランザクションID)を含んでいる。
端末装置10bは、この第2トランザクションTx2を、仮想通貨Yのブロックチェーンネットワークyに対して送出する。
この後、望ましくは、利用者BのハードウェアウォレットHW_Bは端末装置10bから取り外される。
In step S4, the terminal device 10b creates a second transaction Tx2. This is a transaction for "transferring" the virtual currency Y to the user A.
The second transaction Tx2 includes the electronic signature of the user B (SigB2 described above) as the input (ScriptSig), and the hash value H and the remittance published on the blockchain network x of the virtual currency X as the output (ScriptPubKey). It contains the public key (PubKeyA) of the previous user A.
Further, the input of the second transaction Tx2 includes the hash (transaction ID) of the previous transaction.
The terminal device 10b sends the second transaction Tx2 to the blockchain network y of the virtual currency Y.
After this, preferably, the user B's hardware wallet HW_B is removed from the terminal device 10b.
次いで、ステップS5において、利用者Aの端末装置10は、利用者Aの電子署名(第3トランザクションTx3用のSigA2)を生成する。この処理もハードウェアウォレットを用いて行われる。
ステップS6において、端末装置10は、第3トランザクションTx3を作成する。これは、第2トランザクションTx2のアウトプット(UTXO)をアンロックして、仮想通貨Yを利用者A自身に「送金」(受取)するためのトランザクションである(当該第3トランザクションTx3のアウトプット(UTXO)をアンロックし、利用者Aの公開鍵(公開鍵ハッシュ)でUTXOをロックしたトランザクションを接続する)。
Next, in step S5, the terminal device 10 of the user A generates the electronic signature of the user A (Sigma2 for the third transaction Tx3). This process is also performed using a hardware wallet.
In step S6, the terminal device 10 creates a third transaction Tx3. This is a transaction for unlocking the output (UTXO) of the second transaction Tx2 and "sending" (receiving) the virtual currency Y to the user A himself (the output of the third transaction Tx3 (the output of the third transaction Tx3). Unlock UTXO) and connect the transaction that locked UTXO with the public key (public key hash) of user A).
第3トランザクションTx3は、インプット(ScriptSig)として、利用者A自身の電子署名(上記SigA2)と上記した秘密の値Rを含み、アウトプット(ScriptPubKey)として、送金先である利用者A自身の公開鍵(PubKeyA)を含んでいる。
また、第3トランザクションTx3のインプットは、前トランザクションである第2トランザクションTx2のハッシュ(トランザクションID)を含んでいる。
端末装置10aは、この第3トランザクションTx3を、仮想通貨Yのブロックチェーンネットワークyに対して送出する。
第3トランザクションTx3が、仮想通貨Yのブロックチェーンネットワークyに公開されると、秘密の値Rもブロックチェーンネットワークy上に公開される。
この後、望ましくは、利用者AのハードウェアウォレットHW_Aは、端末装置10から取り外される。
The third transaction Tx3 includes the electronic signature of the user A himself (the above Sigma2) and the above-mentioned secret value R as the input (ScriptSigma), and the public disclosure of the user A himself who is the remittance destination as the output (ScriptPubKey). Contains the key (PubKeyA).
Further, the input of the third transaction Tx3 includes a hash (transaction ID) of the second transaction Tx2 which is the previous transaction.
The terminal device 10a sends the third transaction Tx3 to the blockchain network y of the virtual currency Y.
When the third transaction Tx3 is published on the blockchain network y of the virtual currency Y, the secret value R is also published on the blockchain network y.
After this, preferably, the hardware wallet HW_A of the user A is removed from the terminal device 10.
それを受けて、ステップS7において、後から仮想通貨を「送金」する側である利用者Bの端末装置10bにおいて、利用者Bの電子署名(第4トランザクションTx4用のSigB2)が生成される。この処理もハードウェアウォレットを用いて行われ、利用者Bは端末装置10bにハードウェアウォレットHWを接続する。 In response to this, in step S7, the electronic signature of the user B (SigmaB2 for the fourth transaction Tx4) is generated in the terminal device 10b of the user B who later "transfers" the virtual currency. This process is also performed using the hardware wallet, and the user B connects the hardware wallet HW to the terminal device 10b.
ステップS8において、端末装置10bは、第4トランザクションTx4を作成する。これは、第1トランザクションTx1のアウトプット(UTXO)をアンロックして仮想通貨Xを利用者B自身に「送金」(受取)するためのトランザクションである(当該第4トランザクションTx4のアウトプット(UTXO)をアンロックし、利用者Bの公開鍵(公開鍵ハッシュ)でUTXOをロックしたトランザクションを接続する。
第4トランザクションTx4は、インプット(ScriptSig)として、利用者B自身の電子署名(上記のSigB2)と仮想通貨Yのブロックチェーンネットワークyに公開された秘密の値Rを含み、アウトプット(ScriptPubKey)として、送金先である利用者B自身の公開鍵(PubKeyB)を含んでいる。
また、第4トランザクションTx4のインプットは、前トランザクションである第1トランザクションTx1のハッシュ(トランザクションID)を含んでいる。
端末装置10bは、この第4トランザクションTx4を、仮想通貨Xのブロックチェーンネットワークxに対して送出する。
In step S8, the terminal device 10b creates the fourth transaction Tx4. This is a transaction for unlocking the output (UTXO) of the first transaction Tx1 and "sending" (receiving) the virtual currency X to the user B himself (the output (UTXO) of the fourth transaction Tx4). ) Is unlocked, and the transaction that locked UTXO with the public key (public key hash) of user B is connected.
The fourth transaction Tx4 includes the electronic signature of the user B (SignB2 above) and the secret value R disclosed to the blockchain network y of the virtual currency Y as the input (ScriptSig), and as the output (ScriptPubKey). , The public key (PubKeyB) of the user B who is the remittance destination is included.
Further, the input of the fourth transaction Tx4 includes a hash (transaction ID) of the first transaction Tx1 which is the previous transaction.
The terminal device 10b sends the fourth transaction Tx4 to the blockchain network x of the virtual currency X.
なお、上記に説明をした従来知られるアトミックスワップの仕組みには、仮想通貨の交換には時間がかかるという問題がある。
特にビットコインのトランザクションがブロックチェーンで処理されるとき、ネットワークを構成するマイナー装置による上述のPoWに起因して、第1トランザクションTx1、第3トランザクションTx3の処理がブロックチェーンのブロックに組み込まれるまで平均60分を要する。
The conventionally known atomic swap mechanism described above has a problem that it takes time to exchange virtual currencies.
Especially when Bitcoin transactions are processed on the blockchain, the processing of the first transaction Tx1 and the third transaction Tx3 is averaged until the processing of the first transaction Tx1 and the third transaction Tx3 is incorporated into the block of the blockchain due to the above-mentioned PoW by the minor devices constituting the network. It takes 60 minutes.
現在、ビットコインの一つのブロックが承認されるまで約10分間を要することが知られており、ブロックチェーンがほぼ完全に信頼されるまでは6つのブロックが接続される必要があるとされる。
従って、第1トランザクションTx1、第2トランザクションTx2がブロックに完全に組み込まれるまでは約10分×6=60分を要することになる。
Currently, it is known that it takes about 10 minutes for one block of Bitcoin to be approved, and it is said that six blocks need to be connected until the blockchain is almost completely trusted.
Therefore, it takes about 10 minutes × 6 = 60 minutes for the first transaction Tx1 and the second transaction Tx2 to be completely incorporated into the block.
その間、互いの利用者が「送金」した仮想通貨を受け取るための第3トランザクションTx3、第4トランザクションTx4を送出することが出来ないため、受け取る予定の仮想通貨を次の取引に利用することが出来ない。
さらに、アトミックスワップの仕組みは、取引所を介さず、利用者間で直接仮想通貨の交換が出来るという利点があるが、取引条件が見合った取引相手を見つけることは容易ではない。取引条件とは、例えば、送金する仮想通貨の種類、着金する仮想通貨の種類、送金する仮想通過と着金する仮想通過との交換レートなどのことである。
本実施形態の仮想通貨取引システムは、アトミックスワップにおいて、取引条件が見合った取引相手を見つけることを容易にし、取引の利便性を向上することを図る。
During that time, since the third transaction Tx3 and the fourth transaction Tx4 for receiving the virtual currency "transferred" by each other's users cannot be sent, the virtual currency to be received can be used for the next transaction. No.
Furthermore, the atomic swap mechanism has the advantage that virtual currencies can be exchanged directly between users without going through an exchange, but it is not easy to find a trading partner that meets the trading conditions. The transaction conditions are, for example, the type of virtual currency to be remitted, the type of virtual currency to be deposited, the exchange rate between the virtual passage to be remitted and the virtual passage to be deposited, and the like.
The virtual currency trading system of the present embodiment makes it easy to find a trading partner who meets the trading conditions in atomic swap, and aims to improve the convenience of trading.
図5は、本実施形態に係る仮想通貨取引装置(端末装置)の機能構成を示す図であり、(a)はハードウェアによる機能構成を示す図、(b)はソフトウェアによる機能構成を示すブロック図である。
本実施形態の端末装置10a、10b、10c・・・は、仮想通貨を利用する多数の利用者が共通して利用するものであり、共通の構成を有する端末装置10として説明する。
なお、以下の説明では、あくまで一例として、利用者Aと端末装置10aと利用者Bの端末装置10bとの間で行われる処理を説明する。
そして、本実施形態で説明する、例えば、利用者Aが使用する端末装置10aが行う処理と、利用者Bが使用する端末装置10bが行う処理は互いに入れ替え可能である。
5A and 5B are diagrams showing a functional configuration of a virtual currency transaction device (terminal device) according to the present embodiment, FIG. 5A is a diagram showing a functional configuration by hardware, and FIG. 5B is a block showing a functional configuration by software. It is a figure.
The terminal devices 10a, 10b, 10c ... Of the present embodiment are commonly used by a large number of users who use the virtual currency, and will be described as the terminal devices 10 having a common configuration.
In the following description, as an example, the processing performed between the user A, the terminal device 10a, and the terminal device 10b of the user B will be described.
Then, for example, the process performed by the terminal device 10a used by the user A and the process performed by the terminal device 10b used by the user B, which will be described in the present embodiment, can be interchanged with each other.
下記の説明において、利用者Aが端末装置10aを用いて売り注文を行って、利用者Bが端末装置10bを用いて買い注文を行う場合もあれば、その逆に利用者Bが売り注文を行って、利用者Aが買い注文を行う場合もある。
すなわち、上記の説明では、端末装置10aが秘密の値Rを決定し、アトミックスワップを主導する立場にあったが、当然、端末装置10bが秘密の値Rを決定してアトミックスワップを主導する場合も生じうる。この場合、本実施形態で説明する端末装置10aの処理を、端末装置10bが行い、逆に端末装置10bの処理を、端末装置10aが行うことになる。
端末装置10a、端末装置10bは、本質的に同じ装置であり同様の処理を実行可能であり、役割の違いに応じて、互いに異なる処理を実行することが出来る。
In the following description, in some cases, user A places a sell order using the terminal device 10a and user B places a buy order using the terminal device 10b, and vice versa, user B places a sell order. In some cases, the user A places a buy order.
That is, in the above description, the terminal device 10a is in a position to determine the secret value R and lead the atomic swap, but of course, when the terminal device 10b determines the secret value R and leads the atomic swap. Can also occur. In this case, the terminal device 10b performs the processing of the terminal device 10a described in the present embodiment, and conversely, the terminal device 10a performs the processing of the terminal device 10b.
The terminal device 10a and the terminal device 10b are essentially the same device and can execute the same process, and can execute different processes depending on the difference in roles.
図5(a)に示すように、端末装置10は、装置全体の制御を行う汎用のオペレーティングシステムを実行する。端末装置10は、CPU(Central Processing Unit)11と、RAM(Random Access Memory)12とを備える。さらに、端末装置10は、ドライブ装置13と、記録媒体14と、不図示のROM(Read Only Memory)と、ネットワーク I/F15と、外部IO I/F16とを備える。
CPU11は、端末装置10の機能を実現するプログラムを実行する。RAM12は、CPU11による処理のために各種のプログラムや一時データ、変数が展開される。
ドライブ装置13は、記録媒体14に記憶された情報の読み出しか書き込みかの少なくともいずれか一方を行なう装置である。記録媒体14は、ドライブ装置13によって書き込まれた情報を記憶する。記録媒体14は、例えば、ハードディスク、SSD(Solid State Drive)、CD(Compact Disc)、DVD(Digital Versatile Disc)、ブルーレイディスクなどの種類の記憶媒体のうちの少なくとも1つである。また、例えば、端末装置10は、端末装置10内の記録媒体14の種類に対応したドライブ装置13を含む。
記録媒体14及びROMのすくなくとも一方は、プログラムやデータが格納される。ネットワーク I/F15は、端末装置10をネットワークに接続する。外部IO I/F16は、端末装置10に対して周辺機器を接続する。
As shown in FIG. 5A, the terminal device 10 executes a general-purpose operating system that controls the entire device. The terminal device 10 includes a CPU (Central Processing Unit) 11 and a RAM (Random Access Memory) 12. Further, the terminal device 10 includes a
The CPU 11 executes a program that realizes the functions of the terminal device 10. In the RAM 12, various programs, temporary data, and variables are expanded for processing by the CPU 11.
The
Programs and data are stored in at least one of the
外部IO I/F16には、秘密鍵を格納して電子署名の作成に利用するハードウェアウォレットHWを接続することが出来る。
さらに、端末装置10は、マウスやキーボードなどの入力装置17と、液晶ディスプレイなどの表示装置18と、を備え、利用者は、表示装置18に表示された売買注文画面において、仮想通貨の売買注文を行うことが出来る。
A hardware wallet HW that stores a private key and is used for creating a digital signature can be connected to the external IO I / F16.
Further, the terminal device 10 includes an input device 17 such as a mouse and a keyboard and a
また、図5(b)に示すように、CPU11は、処理部として、インターフェイス処理部21と、売り注文処理部22と、買い注文処理部23と、板情報表示処理部24と、アトミックスワップ実行処理部25と、を実行する。
アトミックスワップ実行処理部25は、R値決定処理部25aと、ハッシュ処理部25bと、トランザクション作成処理部25cと、電子署名生成処理部25dと、トランザクション送出処理部25eと、ネットワーク探索処理部25fと、を含む。
Further, as shown in FIG. 5B, the CPU 11 executes atomic swap with the interface processing unit 21, the sell
The atomic swap execution processing unit 25 includes an R value determination processing unit 25a, a
インターフェイス処理部21は、表示装置18に売買注文画面100を表示し、売買注文画面100に対する入力装置17を用いた入力を受け付けるための処理部である。
売買注文画面100で設定された項目はRAM12に格納される。
売り注文処理部22は、売買注文画面100に対する入力に基づいて、仮想通貨の売り注文を行うための処理部である。
買い注文処理部23は、売買注文画面100に表示される買い板(板情報)に対する選択操作などに基づいて、仮想通貨の買い注文を行うための処理部である。
板情報表示処理部24は、取引サーバ40から受信した板情報、あるいは端末装置10自体によってブロックチェーンネットワークを探索することによって収集した売り注文から生成した板情報を、インターフェイス処理部21に表示させる処理部である。
The interface processing unit 21 is a processing unit for displaying the buy /
The items set on the buy /
The sell
The buy
The board information
図6は、本実施形態の端末装置における売買注文画面の一例を説明する図である。
売買注文画面100は、仮想通貨の売り注文を行うための売り注文欄101と、自端末あるいは他端末で表示された売り注文欄101から行われた売り注文を一覧表示した板情報を表示するとともに買い注文を行うための買い板102と、を備えている。
これはあくまで一例であり、売り注文を行うための画面と、買い板を表示するための画面と、が個別に用意されていてもよい。
売り注文欄101では、例えば、どれだけの数量の(何単位の)仮想通貨Xを、どれだけの数量の(何単位の)仮想通貨Yで売りたいか、を設定することが出来る。
なお、この例では、基準となる仮想通貨Xを、仮想通貨Yで売る(交換する)場合のみが記載されているが、それに限らず、他の仮想通貨同士での売り注文を行えるようにしてもよい。
FIG. 6 is a diagram illustrating an example of a buy / sell order screen in the terminal device of the present embodiment.
The buy /
This is just an example, and a screen for placing a sell order and a screen for displaying a buy board may be prepared separately.
In the
In this example, only the case where the reference virtual currency X is sold (exchanged) with the virtual currency Y is described, but it is not limited to this, and it is possible to place a sell order between other virtual currencies. May be good.
売り側の利用者の端末装置10において、売りたい仮想通貨Xの数量を入力欄101aに入力し、交換したい(代わりに買いたい)仮想通貨Yの額を入力欄101bに入力した状態で、注文ボタン101cが選択されると、売り注文処理部22が売り注文処理を行う。後述するが、売り注文は、注文内容をアウトプットのOP_RETURNと呼ばれる領域に注文の内容を記したトランザクションをブロードキャストすることによって行われる。OP_RETURNは、トランザクションのアウトプットにおいて80byteの自由データを書ける領域である。
In the terminal device 10 of the user on the selling side, the quantity of the virtual currency X to be sold is input in the input field 101a, and the amount of the virtual currency Y to be exchanged (want to buy instead) is input in the input field 101b, and the order is placed. When the button 101c is selected, the sell
なお、OP_RETURNには、売り注文を行った後で、端末装置10(ウォレット)がオフラインとなった場合でも、売り注文に対する買い注文があったときにはオンラインに復帰できるように通知先のURL若しくはIPアドレスを記載することが出来る。
後述するように、取引サーバ40は、板情報に基づく買い注文があった場合には、対応する売り注文のOP_RETURNに記載される通知先に対して通知を行い、売り側の端末装置を確実にオンラインとして円滑に取引が開始できるように制御する。
買い板102には、板情報表示処理部24が取得、あるいは生成した売り注文の板情報が表示される。
買い側の利用者の端末装置10において、買い板102に表示される売り注文の中から、任意の(買い側の利用者の条件にあった)売り注文が選択されると、買い注文処理部23が買い注文処理を行う。
従来、アトミックスワップによる取引を行う際に、取引条件があった取引相手を探すことは容易ではなかったが、このような板情報を用いることで、条件があう取引相手を容易に見つけることが出来る。
In OP_RETURN, even if the terminal device 10 (wallet) goes offline after placing a sell order, the URL or IP address of the notification destination can be returned to online when there is a buy order for the sell order. Can be described.
As will be described later, when there is a buy order based on the board information, the
The board information of the sell order acquired or generated by the board information
When an arbitrary sell order (which meets the conditions of the buyer's user) is selected from the sell orders displayed on the
In the past, it was not easy to find a trading partner with trading conditions when trading with atomic swaps, but by using such board information, it is possible to easily find a trading partner with meeting conditions. ..
なお、売り注文と買い注文とは表裏一体である。例えば、図6の買い板102に示される売り注文に、利用者Eによる「100単位の仮想通貨Xを、70単位の仮想通貨Yで売りたい」という売り注文がある。
この売り注文を選択することで行われる買い注文は、100単位の仮想通貨Xを利用者Eの希望通り、70単位の仮想通貨Yと引き替えに「買う」注文であると同時に、70単位の仮想通貨Yを100単位の仮想通貨Xと引き替えに「売る」注文に他ならない。
The sell order and the buy order are two sides of the same coin. For example, in the sell order shown on the
The buy order placed by selecting this sell order is an order to "buy" 100 units of virtual currency X in exchange for 70 units of virtual currency Y as desired by user E, and at the same time, 70 units of virtual currency. It is nothing but an order to "sell" the currency Y in exchange for 100 units of virtual currency X.
図7は、本実施形態において、仮想通貨の利用者が行った売り注文を説明する図である。
上記したように、売り注文は、注文内容をアウトプットのOP_RETURNと呼ばれる領域に注文の内容を記したトランザクションをブロードキャストすることによって行われる。
図6の買い板102における板情報は、様々な利用者が所望の条件で行った売り注文を取りまとめて表示したものであり、各利用者の端末装置10において以下のような処理が行われることで実現される。
FIG. 7 is a diagram illustrating a sell order placed by a user of the virtual currency in the present embodiment.
As described above, the sell order is performed by broadcasting a transaction in which the contents of the order are described in an area called OP_RETURN of the output of the contents of the order.
The board information in the buying
すなわち、図7に示すように、利用者Aの端末装置10aが、100単位の仮想通貨Xを150単位の仮想通貨Yで売りたい旨をOP_RETURNに記したトランザクションをブロードキャストした。
利用者Bの端末装置10bが、100単位の仮想通貨Xを200単位の仮想通貨Yで売りたい旨をOP_RETURNに記したトランザクションをブロードキャストした。
利用者Cの端末装置10cが、100単位の仮想通貨Xを250単位の仮想通貨Yで売りたい旨をOP_RETURNに記したトランザクションをブロードキャストした。
That is, as shown in FIG. 7, the terminal device 10a of the user A broadcasts a transaction in OP_RETURN stating that he / she wants to sell 100 units of virtual currency X in 150 units of virtual currency Y.
The terminal device 10b of the user B broadcasts a transaction in OP_RETURN stating that he / she wants to sell 100 units of virtual currency X for 200 units of virtual currency Y.
The terminal device 10c of the user C broadcasts a transaction in OP_RETURN stating that he / she wants to sell 100 units of virtual currency X for 250 units of virtual currency Y.
利用者Dの端末装置10dが、100単位の仮想通貨Xを200単位の仮想通貨Yで売りたい旨をOP_RETURNに記したトランザクションをブロードキャストした。
利用者Eの端末装置10eが、100単位の仮想通貨Xを70単位の仮想通貨Yで売りたい旨をOP_RETURNに記したトランザクションをブロードキャストした。
利用者Fの端末装置10fが、100単位の仮想通貨Xを80単位の仮想通貨Yで売りたい旨をOP_RETURNに記したトランザクションをブロードキャストした。
The terminal device 10d of the user D broadcasts a transaction in OP_RETURN stating that he / she wants to sell 100 units of virtual currency X for 200 units of virtual currency Y.
The terminal device 10e of the user E broadcasts a transaction in OP_RETURN stating that he / she wants to sell 100 units of virtual currency X for 70 units of virtual currency Y.
The terminal device 10f of the user F broadcasts a transaction in OP_RETURN stating that he / she wants to sell 100 units of virtual currency X in 80 units of virtual currency Y.
図6の買い板102では、例として、図7に示した各利用者の売り注文を、例えば仮想通貨Xに対する交換レートが低い順に表示している。
また、単一の利用者が、複数の売り注文を出しているような場合には、利用者毎に並び替えて表示するようにしてもよい。
また、後述するが、売り注文を出している利用者毎の取引成功確率によって、売り注文を並び替えて表示してもよい。
なお、図6においては便宜上、売り注文に利用者を付して表示されているが、実際には、利用者のウォレットアドレス(公開鍵、公開鍵ハッシュ)が表示される。
図6の買い板102の売り注文に対する買い注文が行われると(売り注文が選択されると)、選択された売り注文を行った売り側の利用者と、売り注文を選択した買い側の利用者と、の間で、アトミックスワップ実行処理部25によるアトミックスワップが行われる。
In the
Further, when a single user places a plurality of sell orders, the display may be rearranged for each user.
Further, as will be described later, the sell orders may be rearranged and displayed according to the transaction success probability for each user who has placed a sell order.
In FIG. 6, for convenience, the sell order is displayed with the user attached, but in reality, the wallet address (public key, public key hash) of the user is displayed.
When a buy order is placed for the sell order of the
図5(b)に戻りアトミックスワップ実行処理部25に含まれる各処理部を説明する。
R値決定処理部25aは、本実施形態では、売り側の端末装置10aにおいて、上記のランダムな値Rを決定する処理部である。
ハッシュ処理部25bは、R値決定処理部25aが決定したランダムな値Rのハッシュ値Hを演算する処理部である。
Returning to FIG. 5B, each processing unit included in the atomic swap execution processing unit 25 will be described.
In the present embodiment, the R value determination processing unit 25a is a processing unit that determines the random value R in the terminal device 10a on the selling side.
The
トランザクション作成処理部25cは、アトミックスワップの契機となった板情報における売り注文又はそれを選択した買い注文の内容に基づいて、アトミックスワップのトランザクションを作成するための処理部である。
電子署名生成処理部25dは、ハードウェアウォレットHWを制御し、ハードウェアウォレットHWに格納されている秘密鍵を利用して電子署名を生成させるための処理部である。
端末装置10に接続されるハードウェアウォレットHWは、夫々、秘密鍵を格納(記憶)する不図示の秘密鍵記憶部と、秘密鍵記憶部に格納されている秘密鍵を用いて電子署名を生成する不図示の署名生成部(回路)を備えている。
The transaction
The electronic signature generation processing unit 25d is a processing unit for controlling the hardware wallet HW and generating an electronic signature by using the private key stored in the hardware wallet HW.
The hardware wallet HW connected to the terminal device 10 generates an electronic signature using a private key storage unit (not shown) that stores (stores) the private key and a private key stored in the private key storage unit, respectively. It is provided with a signature generator (circuit) (not shown).
ハードウェアウォレットHWは、電子署名生成処理部25dによる制御に基づき、署名生成部において電子署名の生成を行う。
あるいは、ハードウェアウォレットHWは、秘密鍵を格納する機能のみを有し、CPU11(電子署名生成処理部25d)が電子署名を作成するようにしてもよい。
なお、端末装置10に夫々接続されるハードウェアウォレットは、夫々利用者A、利用者Bに帰属し、夫々の利用者の秘密鍵を格納した異なるハードウェアウォレットである。
The hardware wallet HW generates an electronic signature in the signature generation unit under the control of the electronic signature generation processing unit 25d.
Alternatively, the hardware wallet HW may have only a function of storing the private key, and the CPU 11 (electronic signature generation processing unit 25d) may create an electronic signature.
The hardware wallet connected to the terminal device 10 is a different hardware wallet that belongs to the user A and the user B, respectively, and stores the private key of each user.
トランザクション送出処理部25eは、作成したトランザクションを、ネットワーク I/F15を介してブロックチェーンネットワークに送出するための処理部である。
ネットワーク探索処理部25fは、ブロックチェーンネットワークを探索し、承認され、公開されたトランザクションから、アトミックスワップに必要な値(秘密の値R、ハッシュ値H)の値を取得する処理部である。
The transaction
The network
図8は、本実施形態に係る取引サーバの機能構成を示す図であり、(a)はハードウェアによる機能構成を示す図、(b)はソフトウェアによる機能構成を示すブロック図である。
図8(a)に示すように、取引サーバ40は、CPU41と、RAM42と、HDD43及びROM(図示せず)と、ネットワークI/F44とを備える。CPU41は、装置全体の制御を行う汎用のオペレーティングシステムを実行するとともに、取引サーバ40の機能を実現する。RAM42には、プログラムを実行するCPU41による処理のために各種のプログラム、一時データ及び変数が展開される。HDD43及びROMには、プログラムやデータが格納される。ネットワークI/F44は、取引サーバ40をネットワークに接続する。
8A and 8B are diagrams showing a functional configuration of a transaction server according to the present embodiment, FIG. 8A is a diagram showing a functional configuration by hardware, and FIG. 8B is a block diagram showing a functional configuration by software.
As shown in FIG. 8A, the
また、図8(b)に示すように、CPU41は、処理部として、売り注文取得処理部51と、板情報生成処理部52と、板情報配信処理部53と、買い注文通知処理部54と、取引評価処理部55と、与信・貸付処理部56と、を実行する。
また、取引サーバ40は、記憶部として、注文情報記憶部61、板情報記憶部62、取引評価記憶部63と、を備えている。
売り注文取得処理部51は、仮想通貨Xのブロックチェーンネットワークxの探索を行い、OP_RETURNを用いた売り注文が発見されると、その内容を収集して注文情報記憶部61に格納する処理を行う。
Further, as shown in FIG. 8B, the CPU 41 includes a sell order
Further, the
The sell order
板情報生成処理部52は、注文情報記憶部61に記憶された注文情報に基づいて、板情報を生成し、板情報記憶部62に格納する処理を行う。
板情報配信処理部53は、端末装置10からの要求に応じて、板情報記憶部62に記憶された板情報を、端末装置10に配信する処理を行う。
買い注文通知処理部54は、板情報に含まれる売り注文に対する買い注文が行われたときに、そのことを売り側の端末装置に通知する処理を行う。
The board information
The board information
The buy order notification processing unit 54 performs a process of notifying the terminal device on the selling side of a buy order for the sell order included in the board information.
取引評価処理部55は、仮想通貨X、Yのブロックチェーンネットワークx、yに対して探索を行い、特定の利用者が過去に行ったアトミックスワップの第1トランザクションTx1の数、第3トランザクションTx3の数から、取引成功回数、取引成功確率を評価し、その評価結果を取引評価記憶部63に格納する処理を行う。
与信・貸付処理部56は、ブロックチェーンネットワークで行われるアトミックスワップを監視し、その実行中に、利用者に対して取引金額に応じた額(数量)の仮想通貨を貸し付ける処理を行う。
なお、本実施形態でいう「貸付」とは、利用者に対して取引金額に応じた額(数量)の仮想通貨を送金することのみを示す。アトミックスワップの正常終了、あるいはキャンセルによって利用者が仮想通貨を取得した後の「返金」については、別途利用者(端末装置)側で、取引サーバ40のウォレットに対する送金トランザクションが公開(ブロードキャスト)されることで行われる。
取引評価記憶部63に格納された利用者毎のアトミックスワップの取引成功確率、取引成功回数は、板情報生成処理部52によって生成される板情報に反映されてもよい。
The transaction
The credit /
The term "lending" in the present embodiment only means remittance of virtual currency in an amount (quantity) corresponding to the transaction amount to the user. Regarding "refund" after the user acquires virtual currency due to normal termination or cancellation of atomic swap, the remittance transaction to the wallet of the
The transaction success probability and the number of transaction successes of the atomic swap for each user stored in the transaction evaluation storage unit 63 may be reflected in the board information generated by the board information
すなわち、図6に示した端末装置10の売買注文画面100で表示される板情報において、各売り注文に付随して、売り側の利用者の取引成功確率、取引成功回数を表示する。そのようにすることで、買い側の利用者は、取引が成功する見込みが高い売り注文を選んで、買い注文を行うことができる。
板情報において、取引成功確率や取引成功回数によって、売り注文を並び替えて表示するようにしてもよい。
なお、注文情報記憶部61、板情報記憶部62、取引評価記憶部63は、RAM42、HDD43の何れに設定されてもよい。
すなわち、ブロックチェーンネットワークから取得した注文情報や、生成した板情報、各利用者の取引成功確率評価などは、RAM42に保持される一時データとしてのみ扱われても良いし、HDD43にファイルとして格納された上でRAM上にロードされてもよい。
That is, in the board information displayed on the buy /
In the board information, the sell orders may be sorted and displayed according to the transaction success probability and the transaction success count.
The order information storage unit 61, the board
That is, the order information acquired from the blockchain network, the generated board information, the transaction success probability evaluation of each user, etc. may be treated only as temporary data held in the
なお、図8の説明おいて、各処理部は、ネットワーク上のブロックチェーンのデータを検索することにより、特定のトランザクションを取得する処理を行っている。また、取引サーバ40がネットワークから取得した完全なブロックチェーンをHDD43に格納しているとき、各処理部は、HDD43に格納されているブロックチェーンのデータを検索することにより、特定のトランザクションを取得してもよい。
In the description of FIG. 8, each processing unit performs a process of acquiring a specific transaction by searching the blockchain data on the network. Further, when the
図9は、売り側の端末装置が実行する売り注文処理を説明するフローチャートである。
CPU11(インターフェイス処理部21)は、ステップS101において、売買注文画面100の売り注文欄101を用いて、売り注文操作が行われたか否かを判定する。
売り注文操作が行われたと判定した場合(ステップS101でYes)、CPU11(売り注文処理部22)は、ステップS102において、売り注文欄101で設定された売り注文の内容をOP_RETURNに記載したトランザクションを作成する。
売り注文の内容に売り側の利用者のウォレットアドレス(公開鍵、公開鍵ハッシュ)を含めることが好適である。
そして、CPU11(売り注文処理部22)は、ステップS102において、ステップS101で作成したトランザクションをブロックチェーンネットワークに送出(ブロードキャスト)することで、売り注文処理を行う。
売り側の利用者が仮想通貨Xを売る場合、トランザクションは、例えば仮想通貨Xのブロックチェーンネットワークxに送出される。
このときに、CPU11は、手数料支払い手段として、所定の手数料(例えば、仮想通貨X)を取引サーバ40のウォレットアドレスに送金するトランザクションをブロードキャストするようにしてもよい。
売り注文内容を含むトランザクションが承認され、ブロックチェーンに組み込まれることで売り注文が正式に完了する。
FIG. 9 is a flowchart illustrating a sell order process executed by the terminal device on the selling side.
In step S101, the CPU 11 (interface processing unit 21) determines whether or not the sell order operation has been performed by using the
When it is determined that the sell order operation has been performed (Yes in step S101), the CPU 11 (sell order processing unit 22) executes a transaction in which the contents of the sell order set in the
It is preferable to include the wallet address (public key, public key hash) of the user on the selling side in the content of the sell order.
Then, in step S102, the CPU 11 (sell order processing unit 22) performs sell order processing by sending (broadcasting) the transaction created in step S101 to the blockchain network.
When the selling user sells the virtual currency X, the transaction is sent to, for example, the blockchain network x of the virtual currency X.
At this time, the CPU 11 may broadcast a transaction for remittance of a predetermined fee (for example, virtual currency X) to the wallet address of the
The transaction including the contents of the sell order is approved and incorporated into the blockchain to formally complete the sell order.
図10は、取引サーバが実行する板情報生成・配信処理を説明するフローチャートである。
ステップS111において、CPU41(売り注文取得処理部51)は、板情報の更新タイミングであるか否かを判定する。
更新タイミングであると判定した場合(ステップS111でYes)、CPU41(売り注文取得処理部51)は、ステップS112において、注文情報をOP_RETURNに記載した新たなトランザクションが、仮想通貨Xのブロックチェーンネットワークxにおいて公開されているか否かを判定する。
FIG. 10 is a flowchart illustrating a board information generation / distribution process executed by the transaction server.
In step S111, the CPU 41 (sell order acquisition processing unit 51) determines whether or not it is the update timing of the board information.
When it is determined that it is the update timing (Yes in step S111), in step S112, the new transaction in which the order information is described in OP_RETURN is the blockchain network x of the virtual currency X in the CPU 41 (sell order acquisition processing unit 51). Judge whether or not it is published in.
公開されている場合(ステップS111でYes)、CPU41(売り注文取得処理部51)は、ステップS113において、注文情報をOP_RETURNに記載した新たなトランザクションのOP_RETURNから売り注文の情報(注文者のウォレットアドレス、注文内容)を取得して注文情報記憶部61に格納する。
そして、CPU41(板情報生成処理部52)は、ステップS114において、ステップS113で取得した注文情報を一覧表示した板情報を生成し、板情報記憶部62に格納して今回の処理を終了する。
ステップS111において、板情報の更新タイミングではないと判定した場合(ステップS111でNo)、あるいはOP_RETURNに注文情報を記載した新たなトランザクションが公開されていない場合(ステップS112でNo)、CPU41(板情報配信部53)は、ステップS115において、端末装置から板情報の要求があったか否かを判定する。
If it is open to the public (Yes in step S111), the CPU 41 (sell order acquisition processing unit 51) sets the order information in OP_RETURN in the new transaction OP_RETURN in step S113 to sell order information (orderer's wallet address). , Order details) and store it in the order information storage unit 61.
Then, in step S114, the CPU 41 (board information generation processing unit 52) generates board information in which the order information acquired in step S113 is displayed in a list, stores it in the board
In step S111, when it is determined that it is not the update timing of the board information (No in step S111), or when a new transaction in which the order information is described in OP_RETURN is not published (No in step S112), the CPU 41 (No in step S112). The distribution unit 53) determines in step S115 whether or not there is a request for board information from the terminal device.
板情報の要求があったと判定した場合(ステップS115でYes)、CPU41(板情報配信処理部53)は、ステップS116において、板情報記憶部62に格納されている最新の板情報を、要求のあった端末装置10に配信する。
なお、ブロックチェーンを探索し、売り注文を含むトランザクションから売り注文情報を取得し、板情報を生成する処理は、取引サーバ40で行うのではなく、各端末装置10で行うことも出来る
その場合、端末装置10は、ブロックチェーンを随時監視し、売り注文を含むトランザクションが公開されるとそれを取得して板情報に反映する。
When it is determined that the board information has been requested (Yes in step S115), the CPU 41 (board information distribution processing unit 53) requests the latest board information stored in the board
The process of searching the blockchain, acquiring the sell order information from the transaction including the sell order, and generating the board information can be performed not by the
ところで、買い板(板情報)102に表示される売り注文のうち消化された売り注文については買い板102から非表示とされる必要がある。
端末装置10によって行われた買い板102を用いた買い注文が公開された時点で、板情報記憶部62に格納されている板情報から消去してもよいし、買い注文が公開された後、アトミックスワップが正常に終了した時点で(買い側の端末装置10bによって第4トランザクションが公開された時点で)板情報記憶部62に格納されている板情報から消去してもよい。
By the way, among the sell orders displayed on the buy board (board information) 102, the digested sell orders need to be hidden from the
When the buy order using the
図11は、買い側の端末装置が実行する買い注文処理を説明するフローチャートである。
CPU11(インターフェイス処理部21)は、ステップS121において、買い板102に表示されている注文内容が入力装置17を用いて選択されることで、買い注文操作が行われたか否かを判定する。
買い注文操作が行われたと判定した場合(ステップS121でYes)、CPU11(買い注文処理部23)は、ステップS122において、買い注文として、買い板102で選択された売り注文の内容をOP_RETURNに記載した買い注文のトランザクションを作成する。買い注文のトランザクションは、売り側の利用者にアトミックスワップをリクエストするトランザクションであると言える。また、その内容として、買い側の利用者のウォレットアドレス(公開鍵、公開鍵ハッシュ)を含めることが好適である。
そして、CPU11(買い注文処理部23)は、ステップS123において、ステップS122で作成したトランザクションをブロードキャストすることで、買い注文処理を行う。
FIG. 11 is a flowchart illustrating a buy order process executed by the terminal device on the buying side.
In step S121, the CPU 11 (interface processing unit 21) determines whether or not the buy order operation has been performed by selecting the order content displayed on the
When it is determined that the buy order operation has been performed (Yes in step S121), the CPU 11 (buy order processing unit 23) describes the contents of the sell order selected on the
Then, the CPU 11 (buy order processing unit 23) performs the buy order processing by broadcasting the transaction created in step S122 in step S123.
買い側の利用者が、仮想通貨Xと引き替えに仮想通貨Yを「送金」する場合、トランザクションは、例えば仮想通貨Yのブロックチェーンネットワークyに送出される。
このときに、CPU11は、手数料支払い手段として、所定の手数料(例えば、仮想通貨Y)を取引サーバ40のウォレットアドレスに送金するトランザクションをブロードキャストするようにしてもよい。
買い注文内容を含むトランザクションが承認され、ブロックチェーンに組み込まれることで買い注文が正式に完了する。
以上の処理によって、仮想通貨の売り側と買い側のマッチングが終了し、アトミックスワップを行う準備が完了したことになる。
When the user on the buying side "transfers" the virtual currency Y in exchange for the virtual currency X, the transaction is sent to, for example, the blockchain network y of the virtual currency Y.
At this time, the CPU 11 may broadcast a transaction for remittance of a predetermined fee (for example, virtual currency Y) to the wallet address of the
The transaction including the contents of the buy order is approved and incorporated into the blockchain to formally complete the buy order.
By the above processing, the matching between the selling side and the buying side of the virtual currency is completed, and the preparation for atomic swap is completed.
図12は、売り側の端末装置が実行するアトミックスワップ実行処理を説明するフローチャートである。
売り側の端末装置は、ここでは端末装置10aが該当し、図12の説明におけるCPU11は、端末装置10aのCPU11である。
CPU11(アトミックスワップ実行処理部25)は、ステップS151において、売り注文処理に係る売り注文に対応する買い注文のトランザクションが公開されたか否かを判定する。
FIG. 12 is a flowchart illustrating an atomic swap execution process executed by the terminal device on the selling side.
The terminal device on the selling side corresponds to the terminal device 10a here, and the CPU 11 in the description of FIG. 12 is the CPU 11 of the terminal device 10a.
In step S151, the CPU 11 (atomic swap execution processing unit 25) determines whether or not the transaction of the buy order corresponding to the sell order related to the sell order processing has been published.
公開されたと判定した場合(ステップS151でYes)、CPU11(アトミックスワップ実行処理部25)は、ステップS152において、売り注文と、買い注文の内容に基づいて、送金先と、送金額を決定する。
送金先としては、相手方の利用者の公開鍵や公開鍵ハッシュとしてのアドレスが入力される。公開鍵は、事前に交換される。
CPU11(アトミックスワップ実行処理部25)は、ステップS153において、ランダムな値Rを決定し、ステップS154において、値Rのハッシュ値Hを算出する。
ランダムな値Rは、アトミックスワップ実行処理部25によって自動的に生成されてもよいし、売り側の利用者自身が決定して入力するような構成としてもよい。
If it is determined that the remittance has been made public (Yes in step S151), the CPU 11 (atomic swap execution processing unit 25) determines the remittance destination and the remittance amount based on the contents of the sell order and the buy order in step S152.
As the remittance destination, the public key of the other user or the address as the public key hash is input. Public keys are exchanged in advance.
The CPU 11 (atomic swap execution processing unit 25) determines a random value R in step S153, and calculates a hash value H of the value R in step S154.
The random value R may be automatically generated by the atomic swap execution processing unit 25, or may be configured to be determined and input by the selling user himself / herself.
そして、CPU11(アトミックスワップ実行処理部25)は、ステップS155において、ハードウェアウォレットを制御し、ハードウェアウォレットHW_Aに格納された秘密鍵を利用して第1トランザクションTx1用の利用者Aの電子署名SigA1を生成させる。
そして、CPU11(アトミックスワップ実行処理部25)は、ステップS156において、電子署名SigA1を付した第1トランザクションTx1を作成し、CPU11(トランザクション送出処理部64)は、ステップS157において、第1トランザクションTx1を仮想通貨Yのブロックチェーンネットワークyに送出する。
Then, the CPU 11 (atomic swap execution processing unit 25) controls the hardware wallet in step S155, and uses the private key stored in the hardware wallet HW_A to digitally sign the user A for the first transaction Tx1. SigA1 is generated.
Then, the CPU 11 (atomic swap execution processing unit 25) creates the first transaction Tx1 with the electronic signature Sigma1 in step S156, and the CPU 11 (transaction transmission processing unit 64) creates the first transaction Tx1 in step S157. It is sent to the blockchain network y of the virtual currency Y.
その後、CPU11(アトミックスワップ実行処理部25)は、ステップS158において、仮想通貨Xのブロックチェーンネットワークxの探索を開始する。
そして、CPU11(アトミックスワップ実行処理部25)は、ステップS159において、(通貨交換の相手方である端末装置10bが作成し、承認されることによって)第2トランザクションTx2が仮想通貨Xのブロックチェーンネットワークxに公開されているか否かを判定する。第2トランザクションTx2はハッシュ値Hを含む。
After that, the CPU 11 (atomic swap execution processing unit 25) starts the search for the blockchain network x of the virtual currency X in step S158.
Then, in step S159, the CPU 11 (atomic swap execution processing unit 25) has a blockchain network x in which the second transaction Tx2 is the virtual currency X (by being created and approved by the terminal device 10b which is the counterparty of the currency exchange). Determine if it is published in. The second transaction Tx2 includes the hash value H.
アトミックスワップ実行処理部25は、ブロックチェーン上のデータの中から、ハッシュ値H、及び利用者Aの公開鍵(アドレス)を含むトランザクションを検索する。これにより、アトミックスワップ実行処理部25は、ブロックチェーン上に第2トランザクションTx2が公開されているか否かを判定する。
または、アトミックスワップ実行処理部25は、端末装置10bから第2トランザクションTx2のトランザクションIDを受け取ってもよい。そして、アトミックスワップ実行処理部25は、受け取ったトランザクションTx2のトランザクションIDを用いてブロックチェーン上のデータを検索する。これにより、アトミックスワップ実行処理部25は、ブロックチェーン上に第2トランザクションTx2が公開されているか否かを判定する。
The atomic swap execution processing unit 25 searches the data on the blockchain for a transaction including the hash value H and the public key (address) of the user A. As a result, the atomic swap execution processing unit 25 determines whether or not the second transaction Tx2 is open to the public on the blockchain.
Alternatively, the atomic swap execution processing unit 25 may receive the transaction ID of the second transaction Tx2 from the terminal device 10b. Then, the atomic swap execution processing unit 25 searches the data on the blockchain using the transaction ID of the received transaction Tx2. As a result, the atomic swap execution processing unit 25 determines whether or not the second transaction Tx2 is open to the public on the blockchain.
第2トランザクションTx2が公開されていないと判定した場合(ステップS159でNo)、CPU11(アトミックスワップ実行処理部25)は、ステップS159の処理を繰り返し、第2トランザクションTx2の公開を待機する。
第2トランザクションTx2が公開されていると判定した場合(ステップS159でYes)、CPU11(アトミックスワップ実行処理部25)は、ステップS160において、ハードウェアウォレットを制御し、ハードウェアウォレットHW_Aに格納された秘密鍵を利用して第3トランザクションTx3用の利用者Aの電子署名SigA2を生成させる。
そして、CPU11(アトミックスワップ実行処理部25)は、ステップS161において、電子署名を付した第1トランザクションTx1を作成し、CPU11(トランザクション送出処理部64)は、ステップS162において、第3トランザクションTx1を仮想通貨Yのブロックチェーンネットワークyに送出する。
When it is determined that the second transaction Tx2 is not open (No in step S159), the CPU 11 (atomic swap execution processing unit 25) repeats the process of step S159 and waits for the release of the second transaction Tx2.
When it is determined that the second transaction Tx2 is open (Yes in step S159), the CPU 11 (atomic swap execution processing unit 25) controls the hardware wallet in step S160 and stores it in the hardware wallet HW_A. The private key is used to generate the electronic signature Sigma2 of the user A for the third transaction Tx3.
Then, the CPU 11 (atomic swap execution processing unit 25) creates the first transaction Tx1 with an electronic signature in step S161, and the CPU 11 (transaction transmission processing unit 64) virtualizes the third transaction Tx1 in step S162. It is sent to the blockchain network y of the currency Y.
図13は、買い側の端末装置が実行するアトミックスワップ実行処理を説明するフローチャートである。
買い側の端末装置は、ここでは端末装置10bが該当し、図13の説明におけるCPU11は、端末装置10bのCPU11である。
CPU11(アトミックスワップ実行処理部25)は、ステップS171において、買い注文に基づいて、送金先、送金額を設定する。
そして、CPU11(アトミックスワップ実行処理部25)は、ステップS172において、第1トランザクションTx1が仮想通貨Yのブロックチェーンネットワークyに公開されているか否かを判定する。
FIG. 13 is a flowchart illustrating an atomic swap execution process executed by the terminal device on the buying side.
The terminal device on the buying side corresponds to the terminal device 10b here, and the CPU 11 in the description of FIG. 13 is the CPU 11 of the terminal device 10b.
The CPU 11 (atomic swap execution processing unit 25) sets the remittance destination and the remittance amount based on the buy order in step S171.
Then, the CPU 11 (atomic swap execution processing unit 25) determines in step S172 whether or not the first transaction Tx1 is open to the blockchain network y of the virtual currency Y.
アトミックスワップ実行処理部25は、ブロックチェーン上のデータの中から、利用者Aの公開鍵(アドレス)を含むトランザクションを検索する。これにより、アトミックスワップ実行処理部25は、ブロックチェーン上に第1トランザクションTx1が公開されているか否かを判定する。
または、アトミックスワップ実行処理部25は、端末装置10aから第1トランザクションTx1のトランザクションIDを受け取ってもよい。そして、アトミックスワップ実行処理部25は、受け取ったトランザクションTx1のトランザクションIDを用いてブロックチェーン上のデータを検索する。これにより、アトミックスワップ実行処理部25は、ブロックチェーン上に第1トランザクションTx1が公開されているか否かを判定する。
第1トランザクションTx1が公開されていると判定した場合(ステップS172でYes)、CPU11(アトミックスワップ実行処理部25)は、ステップS173において、第1トランザクションTx1に含まれるハッシュ値Hの値を取得する。
The atomic swap execution processing unit 25 searches the data on the blockchain for a transaction including the public key (address) of the user A. As a result, the atomic swap execution processing unit 25 determines whether or not the first transaction Tx1 is open to the public on the blockchain.
Alternatively, the atomic swap execution processing unit 25 may receive the transaction ID of the first transaction Tx1 from the terminal device 10a. Then, the atomic swap execution processing unit 25 searches the data on the blockchain using the transaction ID of the received transaction Tx1. As a result, the atomic swap execution processing unit 25 determines whether or not the first transaction Tx1 is open to the public on the blockchain.
When it is determined that the first transaction Tx1 is open to the public (Yes in step S172), the CPU 11 (atomic swap execution processing unit 25) acquires the value of the hash value H included in the first transaction Tx1 in step S173. ..
次に、CPU11(アトミックスワップ実行処理部25)は、ステップS174において、ハードウェアウォレットHW_Bを制御し、ハードウェアウォレットHWに格納された秘密鍵を利用して、ハッシュ値Hを含んだ第2トランザクションTx2用の利用者Bの電子署名SigB1を生成させる。 Next, the CPU 11 (atomic swap execution processing unit 25) controls the hardware wallet HW_B in step S174, and uses the private key stored in the hardware wallet HW to perform a second transaction including the hash value H. The electronic signature Sigma B1 of the user B for Tx2 is generated.
CPU11(アトミックスワップ実行処理部25)は、ステップS175において、ステップS174で生成した電子署名SigB1を付した第2トランザクションTx2を作成し、ステップS176において、作成した第2トランザクションTx2を仮想通貨Yのブロックチェーンネットワークyに送出する。 The CPU 11 (atomic swap execution processing unit 25) creates a second transaction Tx2 with the electronic signature Sigma B1 generated in step S174 in step S175, and blocks the created second transaction Tx2 in the virtual currency Y in step S176. Send to the chain network y.
次に、CPU11(アトミックスワップ実行処理部25)は、ステップS177において、ブロックチェーンネットワークyの探索を開始する。
CPU11(アトミックスワップ実行処理部25)は、ステップS178において、第3トランザクションTx3が仮想通貨Yのブロックチェーンネットワークyに公開されているか否かを判定する。
Next, the CPU 11 (atomic swap execution processing unit 25) starts the search for the blockchain network y in step S177.
In step S178, the CPU 11 (atomic swap execution processing unit 25) determines whether or not the third transaction Tx3 is open to the blockchain network y of the virtual currency Y.
CPU11(アトミックスワップ実行処理部25)は、該当するブロックチェーン全体を検索し利用者Bの公開鍵(アドレス)を含むトランザクションデータを検索することによって、第3トランザクションTx3をブロックチェーンから探し出すことが出来る。
あるいは、第3トランザクションTx3を作成した端末装置10aから、第3トランザクションTx3のトランザクションIDを受け取ることで、そのトランザクションIDに該当するトランザクションを検索することによって、第3トランザクションTx3をブロックチェーンから探し出すことが出来る。
The CPU 11 (atomic swap execution processing unit 25) can find the third transaction Tx3 from the blockchain by searching the entire corresponding blockchain and searching the transaction data including the public key (address) of the user B. ..
Alternatively, by receiving the transaction ID of the third transaction Tx3 from the terminal device 10a that created the third transaction Tx3, and searching for the transaction corresponding to the transaction ID, the third transaction Tx3 can be searched from the blockchain. You can.
第3トランザクションTx3が公開されていないと判定した場合(ステップS178でNo)、CPU11(アトミックスワップ実行処理部25)は、ステップS178の処理を繰り返し、第3トランザクションTx3の公開を待機する。
第3トランザクションTx3が公開されていると判定した場合(ステップS178でYes)、CPU11(ネットワーク探索処理部65)は、ステップS179において、第3トランザクションTx3のインプットにおける秘密の値Rを取得する。
When it is determined that the third transaction Tx3 is not open (No in step S178), the CPU 11 (atomic swap execution processing unit 25) repeats the process of step S178 and waits for the release of the third transaction Tx3.
When it is determined that the third transaction Tx3 is open to the public (Yes in step S178), the CPU 11 (network search processing unit 65) acquires the secret value R in the input of the third transaction Tx3 in step S179.
そして、CPU11(アトミックスワップ実行処理部25)は、ステップS180において、ハードウェアウォレットHW_Bを制御し、ハードウェアウォレットHWに格納された秘密鍵を利用して、Rの値を含んだ第4トランザクションTx4用の利用者Bの電子署名SigB2を生成させる。 Then, the CPU 11 (atomic swap execution processing unit 25) controls the hardware wallet HW_B in step S180, and uses the private key stored in the hardware wallet HW to use the private key stored in the hardware wallet HW to include the value of R in the fourth transaction Tx4. The electronic signature SigmaB2 of the user B for use is generated.
CPU11(アトミックスワップ実行処理部25)は、ステップS181において、ステップS180で生成した電子署名SigB2を付した第4トランザクションTx4を作成し、ステップS182において、作成した第4トランザクションTx4を仮想通貨Yのブロックチェーンネットワークyに送出する。 The CPU 11 (atomic swap execution processing unit 25) creates a fourth transaction Tx4 with the electronic signature SigB2 generated in step S180 in step S181, and blocks the created fourth transaction Tx4 in the virtual currency Y in step S182. Send to the chain network y.
上記のようなアトミックスワップには、取引の成立まで時間がかかるという欠点がある。取引の成立とは、取引対象の仮想通貨を各利用者が最終的に受け取る処理、が完了することである。
従って、アトミックスワップで得られた(得られる予定の)仮想通貨をさらに別の取引に用いたい(回転取引を行いたい)と利用者が考えても、仮想通貨は直ぐに利用可能な状態とはならない。
そこで本実施形態のシステムでは、取引サーバ40は、アトミックスワップでやりとりされる仮想通貨を担保として与信を行い、仮想通貨を双方の利用者に貸し付けることができる。
より具体的には、アトミックスワップのトランザクションを監視し、未承認のトランザクション分は、キャンセルもしくは相当する対価が送金されるものとして、仮想通貨を貸し付ける。キャンセルとは、引の有効期限が過ぎると仮想通貨を元の持ち主に戻す処理のことである。
また、売り注文を出している利用者の過去の取引成功確率をブロックチェーンから計算し、与信する仮想通貨の種類と数量とを決定することも出来る。
Atomic swaps such as those mentioned above have the disadvantage that it takes time to complete a transaction. The conclusion of a transaction is the completion of the process in which each user finally receives the virtual currency to be traded.
Therefore, even if the user wants to use the virtual currency obtained (planned to be obtained) by atomic swap for another transaction (perform a revolving transaction), the virtual currency will not be immediately available. ..
Therefore, in the system of the present embodiment, the
More specifically, it monitors atomic swap transactions and lends cryptocurrencies for unapproved transactions as if they were canceled or remitted in equivalent consideration. Cancellation is the process of returning the virtual currency to its original owner after the expiration date of the withdrawal.
It is also possible to calculate the past transaction success probability of the user who has placed a sell order from the blockchain and determine the type and quantity of virtual currency to be credited.
図14は、取引サーバが実行する取引評価処理を説明するフローチャートである。
取引サーバ40のCPU41(取引評価処理部55)は、ステップS301において、アトミックスワップの成功確率の評価タイミングであるか否かを判定する。
評価タイミングであると判定した場合(ステップS301でYes)、CPU41(取引評価処理部55)は、ステップS302において、ブロックチェーンネットワークを探索して、特定の利用者が開始したアトミックスワップの全てのトランザクションTx1(ハッシュ値Hを含む)を収集し、ステップS303において、利用者毎に、見つかったトランザクションTx1を計数する。
FIG. 14 is a flowchart illustrating a transaction evaluation process executed by the transaction server.
In step S301, the CPU 41 (transaction evaluation processing unit 55) of the
When it is determined that the evaluation timing is reached (Yes in step S301), the CPU 41 (transaction evaluation processing unit 55) searches the blockchain network in step S302 and all transactions of the atomic swap started by a specific user. Tx1 (including the hash value H) is collected, and in step S303, the found transaction Tx1 is counted for each user.
次いで、CPU41(取引評価処理部55)は、ステップS304において、ブロックチェーンネットワークを探索して、特定の利用者が開始したアトミックスワップの全てのトランザクションTx3(値Rの開示を含む)を収集し、ステップS305において、利用者毎に、見つかったトランザクションTx3を計数する。
特定の利用者が開始した全てのアトミックスワップが正常に開始された場合、その利用者が公開した第1トランザクションTx1の数と、第3トランザクションTx3の数は一致するはずである。
一致しない場合、その利用者は、ランダムな値Rを開示せずにアトミックスワップを中断し、その結果、取引の相手も仮想通貨を受け取っていないことになる。
Next, in step S304, the CPU 41 (transaction evaluation processing unit 55) searches the blockchain network and collects all transactions Tx3 (including disclosure of the value R) of the atomic swap initiated by a specific user. In step S305, the found transaction Tx3 is counted for each user.
If all atomic swaps initiated by a particular user are successfully initiated, the number of first transaction Tx1 published by that user and the number of third transaction Tx3 should match.
If they do not match, the user suspends the atomic swap without disclosing the random value R, and as a result, the trading partner has not received the virtual currency either.
CPU41(取引評価処理部55)は、ステップS306において、ステップS303で計数した第1トランザクションTx1の数に対する、ステップS305で計数した第3トランザクションTx3の数の割合を、その利用者の「成功確率」として計算する。
そして、CPU41は、ステップS307において、ステップS306で計算した成功確率、ステップS305で計数した成功回数、ステップS303で計数した試行回数(母数)を、利用者毎に関連づけて取引評価記憶部63に格納する。
なお、図14のフローチャートでは、特定の利用者について過去の全てのアトミックスワップのトランザクションを収集するようにしているが、これは初回の評価にのみ必要な処理であり、次回以降の取引評価タイミングでは、初回以降に新たに発生したアトミックスワップのトランザクションのみを取得して、過去分と合算して取引成功確率などを算出することが出来る。
In step S306, the CPU 41 (transaction evaluation processing unit 55) determines the ratio of the number of third transactions Tx3 counted in step S305 to the number of first transactions Tx1 counted in step S303 as the "success probability" of the user. Calculate as.
Then, in step S307, the CPU 41 associates the success probability calculated in step S306, the number of successes counted in step S305, and the number of trials (parameter) counted in step S303 with each user in the transaction evaluation storage unit 63. Store.
In the flowchart of FIG. 14, all past atomic swap transactions are collected for a specific user, but this is a process required only for the first evaluation, and the transaction evaluation timing after the next time. , It is possible to acquire only the transactions of atomic swaps newly generated after the first time and add them to the past transactions to calculate the transaction success probability.
なお、図14の処理は、ブロックチェーンネットワークでアトミックスワップを行った(開始した)全ての利用者の取引成功確率を算出(評価)している。
この方法によっては、特定の利用者が最初に本実施形態の仕組みを用いて売り注文を行い、本実施形態の買い板にその売り注文が表示された時点から、その利用者の過去の取引成功確率や成功回数を全て表示することが出来る。
その反面、全ての利用者について取引履歴を追跡することは、処理負荷や管理すべき情報量の上で問題があるとも言える。本実施形態の仕組みを利用しない利用者の情報は、無駄であると考えられるからである。
そこで、下記に示す売買マッチング後の処理内において、買い板102から開始されたアトミックスワップの成否に基づいて、買い板102に表れた売り側利用者の取引成功確率のみを評価するようにしてもよい。
これにより、ブロックチェーンを探索する負荷や利用者毎の取引成功確率の情報量を著しく低減することが出来る。
The process of FIG. 14 calculates (evaluates) the transaction success probability of all users who have performed (started) atomic swap on the blockchain network.
Depending on this method, a specific user first places a sell order using the mechanism of the present embodiment, and from the time when the sell order is displayed on the buy board of the present embodiment, the user's past transaction success You can display all the probabilities and the number of successes.
On the other hand, tracking transaction history for all users can be said to be problematic in terms of processing load and amount of information to be managed. This is because the information of the user who does not use the mechanism of this embodiment is considered to be useless.
Therefore, in the post-trading matching process shown below, only the transaction success probability of the selling side user appearing on the buying
As a result, the load of searching the blockchain and the amount of information on the transaction success probability for each user can be significantly reduced.
図15は、取引サーバが実行する売買マッチング成立後の処理を説明するフローチャートである。
CPU41(買い注文通知処理部54)は、ステップS401においてブロックチェーンネットワークを探索し、板情報に含まれる売り注文に対応する買い注文のトランザクションが公開されたか否かを判定する。
そのようなトランザクションが公開されたと判定した場合(ステップS401でYes)、CPU41(買い注文通知処理部54)は、ステップS402において、売り注文のOP_RETURNに通知先(IPアドレス、URL)の記載があったか否かを判定する。
通知先の記載がないと判定した場合には(ステップS402でNo)、CPU41はステップS404に処理を進める。
FIG. 15 is a flowchart illustrating a process executed by the transaction server after the establishment of trading matching.
The CPU 41 (buy order notification processing unit 54) searches the blockchain network in step S401 and determines whether or not the transaction of the buy order corresponding to the sell order included in the board information has been published.
If it is determined that such a transaction has been published (Yes in step S401), the CPU 41 (buy order notification processing unit 54) has described the notification destination (IP address, URL) in OP_RETURN of the sell order in step S402. Judge whether or not.
If it is determined that there is no description of the notification destination (No in step S402), the CPU 41 proceeds to the process in step S404.
通知先の記載があると判定した場合(ステップS402でYes)、CPU41(買い注文通知処理部54)は、ステップS403において、記載された通知先に対して買い注文があったことを通知する。
売り側の端末装置10aにおいて売り注文が行われた後、買い側の端末装置10bで買い注文が行われた場合、に売り側の端末装置にオフラインとなっているとアトミックスワップを開始することが出来ない。
そこで、本実施形態の取引サーバ40では、板情報から買い注文が行われた場合に、対応する売り注文のOP_RETUNに記載された通知先(IPアドレス、URL)に対して通知を行うことで、売り側の端末装置がオンラインとなるように促す。
このように制御することで、板情報を用いて買い注文が行われた場合に、売り注文を行った端末装置(ウォレット)を確実にオンラインとさせて、円滑に取引を開始することが出来る。
When it is determined that the notification destination is described (Yes in step S402), the CPU 41 (buy order notification processing unit 54) notifies the described notification destination that there is a buy order in step S403.
When a sell order is placed on the selling side terminal device 10a and then a buy order is placed on the buying side terminal device 10b, atomic swap may be started if the selling side terminal device is offline. Can not.
Therefore, in the
By controlling in this way, when a buy order is placed using the board information, the terminal device (wallet) for which the sell order is placed can be reliably brought online and a transaction can be started smoothly.
その後、CPU41(与信・貸付処理部56)は、ステップS404において、アトミックスワップの第1トランザクションTx1が、売り側の端末装置10aによって公開されたか否かを判定する。
第1トランザクションTx1が公開されたと判定した場合(ステップS404でYes)、CPU41(与信・貸付処理部56)は、ステップ405において、買い側の端末装置10bによって第2トランザクションTx2が公開されたか否かを判定する。
第2トランザクションTx2が公開されたと判定した場合(ステップS405でYes)CPU41(与信・貸付処理部56)は、ステップS406において、売り側の端末装置10aによって第3トランザクションTxがすでに公開されたか否かを判定する。
After that, the CPU 41 (credit / loan processing unit 56) determines in step S404 whether or not the first transaction Tx1 of the atomic swap is disclosed by the terminal device 10a on the selling side.
When it is determined that the first transaction Tx1 has been published (Yes in step S404), the CPU 41 (credit / loan processing unit 56) determines whether or not the second transaction Tx2 has been published by the terminal device 10b on the buying side in
When it is determined that the second transaction Tx2 has been published (Yes in step S405), the CPU 41 (credit / loan processing unit 56) determines whether or not the third transaction Tx has already been published by the terminal device 10a on the selling side in step S406. To judge.
第3トランザクションTx3がすでに公開されたと判定した場合(ステップS406でYes)、そのまま処理を終了する。
第3トランザクションTx3がまだ公開されていないと判定した場合(ステップS405でNo)、第4トランザクションTx4も当然公開されていないと考えられる。
この状態は、アトミックスワップのために双方の利用者が「送金」した仮想通貨が滞留し、どちらの利用者も受取をしていない状態である。
If it is determined that the third transaction Tx3 has already been published (Yes in step S406), the process ends as it is.
When it is determined that the third transaction Tx3 has not been published yet (No in step S405), it is considered that the fourth transaction Tx4 has not been published as a matter of course.
In this state, the virtual currency "sent" by both users due to atomic swap is retained, and neither user has received it.
このような状態では、CPU41(与信・貸付処理部56)は、ステップS407において、図14の処理で評価した、売り側の利用者のアトミックスワップの成功確率に基づいて、貸し付ける仮想通貨と、貸付額を決定する。仮想通貨を貸し付けるとは、売り側の利用者、買い側の利用者に貸付額に応じた仮想通貨を送金する処理のことである。
貸し付ける仮想通貨、貸付額を決定するための基準が、今回の取引における「売り側」に当たる利用者の成功確率であるのは。本実施形態において、ランダムな値Rを決定して取引の主導権を持っているのは売り側の利用者だからである。アトミックスワップの成否は、売り側の利用者がRの値を含む第3トランザクションTx3を公開するか否かに懸かっているため、売り側の利用者の成功確率で取引を評価する
In such a state, the CPU 41 (credit / loan processing unit 56) lends the virtual currency to be loaned and the loan based on the success probability of the atomic swap of the selling user evaluated in the process of FIG. 14 in step S407. Determine the amount. Lending virtual currency is the process of remittance of virtual currency to users on the selling side and users on the buying side according to the loan amount.
The standard for determining the virtual currency to lend and the loan amount is the success probability of the user who is the "seller" in this transaction. In this embodiment, it is the selling user who determines the random value R and has the initiative in the transaction. Since the success or failure of the atomic swap depends on whether or not the selling user publishes the third transaction Tx3 including the value of R, the transaction is evaluated based on the success probability of the selling user.
売り側のビットコインと買い側のライトコインを交換する処理を一例として、貸し付ける仮想通貨の種類と数量とを決定する処理を説明する。
<第1例>
ビットコインの売り注文を出している売り側の利用者の過去の取引成功確率が例えば60%の場合、取引サーバ40(与信・貸付処理部56)は、売り側の利用者にはライトコインの取引数量を上限にライトコインを貸し出す。これは、アトミックスワップが成功して売り側がビットコインと引き換えにライトコインを受け取る可能性が比較的高い(60%)ためである。ライトコインの取引数量とは、売り注文及び対応する買い注文で規定されたビットコインと交換するライトコインの数量のことである。
The process of determining the type and quantity of virtual currency to be lent will be described by taking as an example the process of exchanging Bitcoin on the selling side and Litecoin on the buying side.
<First example>
If the past transaction success probability of the selling side user who has placed a Bitcoin selling order is, for example, 60%, the transaction server 40 (credit / loan processing unit 56) will give the selling side user a Litecoin. Lend Litecoin up to the transaction volume. This is because there is a relatively high probability (60%) that the atomic swap will be successful and the seller will receive Litecoin in exchange for Bitcoin. The Litecoin transaction quantity is the quantity of Litecoin exchanged for Bitcoin specified in the sell order and the corresponding buy order.
そして、取引サーバ40(与信・貸付処理部56)は、買い側にはビットコインの取引数量を上限にビットコインを貸し出す。これは、アトミックスワップが成功して、買い側がライトコインと引き換えにビットコインを受け取る可能性が高い(60%)ためである。ビットコインの取引数量とは、売り注文及び対応する買い注文で規定されたライトコインと交換するビットコインの数量のことである。
この例の与信・貸付処理では、売り側の利用者の過去の取引成功確率が50%を超える場合、アトミックスワップが成立して、互いに所望する仮想通貨を受け取る可能性が比較的高いため、注文された数量を上限として、取引で受け取る予定の仮想通貨を事前に(取引成立前に)送金する。
逆に、売り側の利用者の過去の取引成功確率が50%以下(未満)であれば、アトミックスワップが成立しない可能性が比較的高い。その場合、仮想通貨の貸付(送金)自体行わないようにするようにしてもよい。あるいは、取引がキャンセルされることを前提に、売り側、買い側の取引の元手となっている仮想通貨(この例であれば、売り側ではビットコイン、買い側ではライトコイン)を、取引数量を上限に売り側、買い側の利用者夫々に貸し出してもよい。
Then, the transaction server 40 (credit / loan processing unit 56) lends bitcoins to the buying side up to the transaction quantity of bitcoins. This is because the atomic swap is successful and the buyer is likely to receive Bitcoin in exchange for Litecoin (60%). The Bitcoin transaction quantity is the quantity of Bitcoin exchanged for Litecoin specified in the sell order and the corresponding buy order.
In the credit / loan processing of this example, if the past transaction success probability of the selling user exceeds 50%, it is relatively likely that an atomic swap will be established and each other will receive the desired virtual currency, so the order will be placed. The virtual currency to be received in the transaction is remitted in advance (before the transaction is completed) up to the quantity made.
On the contrary, if the past transaction success probability of the selling user is 50% or less (less than), there is a relatively high possibility that the atomic swap will not be established. In that case, the virtual currency loan (remittance) itself may not be performed. Alternatively, assuming that the transaction is canceled, the virtual currency (in this example, Bitcoin on the selling side and Litecoin on the buying side) that is the source of the transaction on the selling side and the buying side is traded. It may be lent to each user on the selling side and the buying side up to the quantity.
<第2例>
また、上記の<第1例>に比べて細かく条件を設定してもよい。
すなわち、ビットコインの売り注文を出している売り側の利用者の過去の取引成功確率が60%の場合、取引サーバ40(与信・貸付処理部56)は、売り側の利用者には、売り注文及び対応する買い注文で規定されたライトコインの取引数量の6割を上限にライトコインを貸し出すとともに、ビットコインの取引数量の4割を上限にビットコインを貸し出す。
それに対し、取引サーバ40(与信・貸付処理部56)は、買い側の利用者には、ビットコインの取引数量の6割を上限にビットコインを貸し出すとともに、ライトコインの取引数量の4割を上限にライトコインを貸し出す。
売り側の利用者の過去の実績によれば、売り側の利用者は、60%の確率で取引が成功してライトコインを手に入れ、40%の確率で元手のビットコインを取り戻し、売り側の利用者は、60%の確率で取引が成功してビットコインを手に入れ、40%の確率で元手のライトコインを取り戻すと考えられる。
この確率を元に、売り側、買い側双方の利用者に貸し付ける仮想通貨、数量を決定している。
<Second example>
Further, the conditions may be set more finely than in the above <first example>.
That is, when the past transaction success probability of the selling side user who has placed a Bitcoin sell order is 60%, the transaction server 40 (credit / loan processing unit 56) sells to the selling side user. Litecoin is lent up to 60% of the transaction volume of Litecoin specified in the order and the corresponding buy order, and Bitcoin is lent up to 40% of the transaction volume of Bitcoin.
On the other hand, the transaction server 40 (credit / loan processing unit 56) lends bitcoin to the buyer side up to 60% of the transaction volume of Bitcoin and 40% of the transaction volume of Litecoin. Lend Litecoin to the upper limit.
According to the past performance of the selling user, the selling user has a 60% chance of successfully trading and getting Litecoin, and a 40% chance of regaining the original Bitcoin. It is considered that the user on the selling side has a 60% probability of successfully trading and obtaining Bitcoin, and a 40% probability of regaining the original Litecoin.
Based on this probability, the virtual currency and quantity to be lent to both the selling side and the buying side users are determined.
なお、<第1例>、<第2例>において、取引手数料を取る場合には、取引数量から取引手数料に相当する数量を差し引いた数量を、上記取引数量として仮想通貨の貸し出し数量の上限を算出し、仮想通貨を貸し出してもよい。
フローチャートの説明に戻り、ステップS408において、CPU41は、売り側の利用者に、ステップS407で決定した数量の仮想通貨を送金するトランザクションをブロードキャストする。
そして、ステップS409において、取引サーバ40のCPU41は、売り側の利用者に、ステップS407で決定した数量の仮想通貨を送金するトランザクションをブロードキャストする。
In <1st example> and <2nd example>, when the transaction fee is taken, the upper limit of the lending quantity of virtual currency is set as the above transaction quantity by subtracting the quantity corresponding to the transaction fee from the transaction quantity. You may calculate and lend the virtual currency.
Returning to the description of the flowchart, in step S408, the CPU 41 broadcasts a transaction for remittance of the amount of virtual currency determined in step S407 to the selling user.
Then, in step S409, the CPU 41 of the
以上のように構成することで、本実施形態の仮想通貨取引装置においては、取引速度が遅いアトミックスワップにおいて、アトミックスワップが成功して仮想通貨を受けとる前に、仮想通貨を事前に借り受けて別の取引などに利用することが出来る。
また、アトミックスワップがキャンセルされる場合でも、実際に取引がタイムアウトして元手を取り戻せるようになるまでの時間を無駄にせず、いち早く仮想通貨を受け取って別の取引に利用することが出来る。
このようなことを可能とすることで、仮想通貨の使い勝手、利便性を飛躍的に高めることが出来る。
With the above configuration, in the virtual currency trading device of the present embodiment, in the atomic swap where the transaction speed is slow, before the atomic swap succeeds and receives the virtual currency, the virtual currency is borrowed in advance and another It can be used for transactions.
In addition, even if the atomic swap is canceled, the virtual currency can be received quickly and used for another transaction without wasting the time until the transaction actually times out and the original can be regained.
By making such a thing possible, the usability and convenience of virtual currency can be dramatically improved.
図16は、売り注文を行った利用者の取引成功確率を反映した板情報を示す図である。
図6、図7に示した利用者A〜Fについて、図14の処理で各利用者の過去の取引が以下のように評価されたとする。
すなわち、利用者Aは、100回試行したアトミックスワップが50回成功し、成功確率は50%である。
また、利用者Bは、40回試行したアトミックスワップが12回成功し、成功確率は30%である。
また、利用者Cは、5回試行したアトミックスワップが5回成功し、成功確率は100%である。
また、利用者Dは、30回試行したアトミックスワップが15回成功し、成功確率は50%である。
また、利用者Eは、30回試行したアトミックスワップが30回成功し、成功確率は100%である。
また、利用者Fは、70回試行したアトミックスワップが42回成功し、成功確率は60%である。
FIG. 16 is a diagram showing board information reflecting the transaction success probability of the user who placed the sell order.
Regarding users A to F shown in FIGS. 6 and 7, it is assumed that the past transactions of each user are evaluated as follows in the process of FIG.
That is, the user A succeeds in the atomic swap that has been tried 100 times 50 times, and the success probability is 50%.
In addition, the user B has succeeded in the atomic swap that has been tried 40 times 12 times, and the success probability is 30%.
In addition, the user C succeeds in the atomic swap tried 5
In addition, the user D succeeds in the atomic swap tried 30
In addition, the user E succeeds in the
In addition, the user F has succeeded in atomic swaps that have been tried 70
そして、図16に示すように、買い板102に表示される板情報に含まれる売り注文には、成功確率、成功回数、試行回数が付加表示される。
この場合、配信サーバ40で生成される板情報では、例えば、図16に示すように、売り注文は、成功確率が高い順、利用者E→利用者C→利用者F→利用者A→利用者D→利用者Bの順番で表示されてもよい。成功率が同じ場合は、成功回数が多い利用者の売り注文を上に表示する。
また、成功確率ではなく、単に、成功回数が多い利用者の売り注文を上に表示するようにしてもよい。
以上のように、取引条件(交換レート)のみならず、アトミックスワップが成功する蓋然性を買い板102上で視認可能としたことで、好ましい取引を判断可能として取引の利便性を大いに高めることが出来る。
Then, as shown in FIG. 16, the success probability, the number of successes, and the number of trials are additionally displayed on the sell order included in the board information displayed on the
In this case, in the board information generated by the
Further, instead of the success probability, the sell order of the user who has a large number of successes may be displayed above.
As described above, not only the transaction conditions (exchange rate) but also the probability that the atomic swap will succeed can be visually recognized on the buying
10 端末装置、11 CPU、12 RAM、13 ドライブ装置、14 記録媒体、15 ネットワークI/F、16 外部IO I/F、17 入力装置、18 表示装置、21 インターフェイス処理部、22 注文処理部、23 注文処理部、24 板情報表示処理部、25 アトミックスワップ実行処理部、25a R値決定処理部、25b ハッシュ処理部、25c トランザクション作成処理部、25d 電子署名生成処理部、25e トランザクション送出処理部、25f ネットワーク探索処理部、30 マイナー装置、30x マイナー装置、30y マイナー装置、40 取引サーバ、41 CPU、42 RAM、43 HDD、50 ブロックチェーン監視処理部、51 注文取得処理部、52 板情報生成処理部、53 板情報配信処理部、54 注文通知処理部、55 取引評価処理部、56 与信・貸付処理部、61 注文情報記憶部、62 板情報記憶部、63 取引評価記憶部、64 トランザクション送出処理部、65 ネットワーク探索処理部、100 売買注文画面、101 注文欄、102 買い板 10 Terminal device, 11 CPU, 12 RAM, 13 Drive device, 14 Recording medium, 15 Network I / F, 16 External IO I / F, 17 Input device, 18 Display device, 21 Interface processing unit, 22 Order processing unit, 23 Order processing unit, 24 board information display processing unit, 25 atomic swap execution processing unit, 25a R value determination processing unit, 25b hash processing unit, 25c transaction creation processing unit, 25d electronic signature generation processing unit, 25e transaction transmission processing unit, 25f Network search processing unit, 30 minor equipment, 30x minor equipment, 30y minor equipment, 40 transaction server, 41 CPU, 42 RAM, 43 HDD, 50 blockchain monitoring processing unit, 51 order acquisition processing unit, 52 board information generation processing unit, 53 board information distribution processing unit, 54 order notification processing unit, 55 transaction evaluation processing unit, 56 credit / loan processing unit, 61 order information storage unit, 62 board information storage unit, 63 transaction evaluation storage unit, 64 transaction transmission processing unit, 65 Network search processing unit, 100 buy / sell order screen, 101 order column, 102 buy board
Claims (11)
当該仮想通貨取引装置の利用者が所望する数量の前記第1の仮想通貨と交換する前記第2の仮想通貨の数量を指定した注文内容を入力させる入力手段と、
該入力手段によって入力された前記注文内容を含む、前記第1の仮想通貨の売り注文をネットワークに送出する売り注文送出手段と、
ネットワークに送出された売り注文を含む板情報を表示する板情報表示手段と、
を備え、
前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、
前記板情報表示手段は、
ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に基づいた当該利用者に係る前記取引の成功の可能性を付与した前記板情報を表示する、
ことを特徴とする仮想通貨取引装置。 A virtual currency trading device that conducts transactions for exchanging a first virtual currency and a second virtual currency.
An input means for inputting an order content specifying the quantity of the second virtual currency to be exchanged with the first virtual currency in the quantity desired by the user of the virtual currency trading device.
A sell order sending means for sending a sell order of the first virtual currency to the network, including the order contents input by the input means, and a sell order sending means.
A board information display means for displaying board information including sell orders sent to the network,
With
In the transaction, the first remittance information including specific information indicating the remittance of the first virtual currency from one user and the second virtual currency remittance to the one user are received. The first remittance information including the first receipt information indicating the above, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the first remittance sent to the other user. The second receipt information, which indicates the receipt of one virtual currency, is published on the network.
The board information display means
The board that gives the possibility of success of the transaction related to the user based on the number of the first received information with respect to the number of the first remittance information related to the specific user published on the network. Display information,
A virtual currency trading device characterized by that.
前記板情報表示手段が表示する前記売り注文の中から、所望の売り注文を選択させる選択手段と、
該選択手段による売り注文の選択に係る情報を含む、前記第2の仮想通貨と交換する前記第1の仮想通貨の買い注文をネットワークに送出する買い注文送出手段と、
他の仮想通貨取引装置によって前記売り注文に対応する買い注文がネットワークに公開されたとき、前記第1の送金情報を公開して、前記他の仮想通貨取引装置と前記取引を開始する取引実行手段と、
を備えることを特徴とする仮想通貨取引装置。 In the virtual currency trading device according to claim 1,
A selection means for selecting a desired sell order from the sell orders displayed by the board information display means, and
A buy order sending means for sending a buy order of the first virtual currency to be exchanged for the second virtual currency to the network, including information related to selection of a sell order by the selection means, and a buy order sending means.
When a buy order corresponding to the sell order is published on the network by another virtual currency trading device, a transaction execution means for disclosing the first remittance information and starting the transaction with the other virtual currency trading device. When,
A virtual currency trading device characterized by being equipped with.
前記売り注文送出手段によって前記売り注文を送出するときに、
所定の送金先に対する送金情報であって、手数料に対応する仮想通貨の送金を示す送金情報をネットワークに送出する手数料支払い手段を備えることを特徴とする仮想通貨取引装置。 In the virtual currency trading device according to any one of claims 1 or 2.
When the sell order is sent by the sell order sending means,
A virtual currency trading device comprising a fee payment means for sending remittance information to a predetermined remittance destination and indicating remittance of virtual currency corresponding to the fee to a network.
前記売り注文送出手段は、前記売り注文を送出するときに、当該売り注文を行った仮想通貨取引装置に係る通知先情報を前記注文内容に含めて送出することを特徴とする仮想通貨取引装置。 In the virtual currency trading device according to any one of claims 1 to 3,
The sell order sending means is a virtual currency trading device, characterized in that, when sending the sell order, the notification destination information related to the virtual currency trading device that placed the sell order is included in the order content and sent.
各仮想通貨取引装置は、仮想通貨の交換数量を指定した売り注文及び買い注文をネットワークに送出し、
前記取引は、一の利用者からの第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、
ネットワークに送出された売り注文に応じた板情報を生成する板情報生成手段と、
前記板情報を前記仮想通貨取引装置に配信する板情報配信手段と、
前記第2の送金情報に係る前記第2の仮想通貨の数量に応じて、前記取引の実行中に前記一の利用者に対して前記第2の仮想通貨を貸し付ける貸付手段と、
ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に応じて、当該利用者に係る前記取引の成功の可能性を評価する評価手段と、を備え、
前記貸付手段は、前記評価手段による評価結果に応じて、貸し付けする仮想通貨の数量を決定することを特徴とする取引サーバ装置。 A transaction server device that mediates virtual currency transactions between multiple virtual currency trading devices.
Each virtual currency trading device sends a sell order and a buy order specifying the exchange quantity of virtual currency to the network, and sends them to the network.
The transaction shows the first remittance information including specific information indicating the remittance of the first virtual currency from one user and the receipt of the second remittance of the second virtual currency sent to the one user. The first remittance information, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the first remittance sent to the other user. The second receipt information, which indicates the receipt of virtual currency, is made public on the network.
A board information generating means that generates board information according to a sell order sent to the network,
A board information distribution means for distributing the board information to the virtual currency trading device,
A lending means for lending the second virtual currency to the one user during the execution of the transaction according to the quantity of the second virtual currency related to the second remittance information.
Evaluation that evaluates the possibility of success of the transaction related to the user according to the number of the first received information with respect to the number of the first remittance information related to the specific user published on the network. With means,
The lending means is a transaction server device characterized in that the quantity of virtual currency to be lent is determined according to the evaluation result by the valuation means.
前記貸付手段は、
前記第1の送金情報に係る前記第1の仮想通貨の数量に応じて、前記他の利用者に対して前記第1の仮想通貨を貸し付けする
ことを特徴とする取引サーバ装置。 In the transaction server device according to claim 5.
The lending means
A transaction server device characterized in that the first virtual currency is lent to the other user according to the quantity of the first virtual currency related to the first remittance information.
各仮想通貨取引装置は、第1の仮想通貨に対する第2の仮想通貨の交換数量を指定した売り注文をネットワークに送出し、前記売り注文に対応する買い注文をネットワークに送出し、
前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、
ネットワークに送出された売り注文に応じた板情報を生成する板情報生成手段と、
前記板情報を前記仮想通貨取引装置に配信する板情報配信手段と、
ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に応じて、当該利用者に係る前記取引の成功の可能性を評価する評価手段と、
を備え、
前記板情報生成手段は、前記評価手段による評価結果に応じて、前記売り注文に係る利用者の評価結果を前記板情報に付与することを特徴とする取引サーバ装置。 A transaction server device that mediates virtual currency transactions between multiple virtual currency trading devices.
Each virtual currency trading device sends a sell order specifying the exchange quantity of the second virtual currency for the first virtual currency to the network, and sends a buy order corresponding to the sell order to the network.
In the transaction, the first remittance information including specific information indicating the remittance of the first virtual currency from one user and the second virtual currency remittance to the one user are received. The first remittance information including the first receipt information indicating the above, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the first remittance sent to the other user. The second receipt information, which indicates the receipt of one virtual currency, is published on the network.
A board information generating means that generates board information according to a sell order sent to the network,
A board information distribution means for distributing the board information to the virtual currency trading device,
Evaluation that evaluates the possibility of success of the transaction related to the user according to the number of the first received information with respect to the number of the first remittance information related to the specific user published on the network. Means and
With
The board information generating means is a transaction server device characterized in that the evaluation result of a user related to the sell order is added to the board information according to the evaluation result by the evaluation means.
前記売り注文は、当該売り注文を行った仮想通貨取引装置に係る通知先情報を含み、
前記取引サーバ装置は、前記ネットワークに公開された売り注文に対応する買い注文が行われたとき、前記通知先情報が示す通知先に通知を行う通知手段
を備えることを特徴とする取引サーバ装置。 In the transaction server device according to claim 7.
The sell order includes notification destination information related to the virtual currency trading device that placed the sell order.
The transaction server device is characterized by comprising a notification means for notifying a notification destination indicated by the notification destination information when a buy order corresponding to a sell order published on the network is placed.
取引サーバ装置と、を備える仮想通貨取引システムであって、
前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、
前記仮想通貨取引装置は、
当該仮想通貨取引装置の利用者が所望する数量の前記第1の仮想通貨と交換する前記第2の仮想通貨の数量を指定した注文内容を入力させる入力手段と、
該入力手段によって入力された前記注文内容を含む、前記第1の仮想通貨の売り注文をネットワークに送出する売り注文送出手段と、
ネットワークに送出された売り注文を含む板情報を表示する板情報表示手段と、
を備え、
前記取引サーバ装置は、
前記ネットワークに送出された売り注文に応じた板情報を生成する板情報生成手段と、
前記ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に応じて、当該利用者に係る前記取引の成功の可能性を評価する評価手段と、
前記評価手段による評価結果に応じて、前記売り注文に係る利用者の評価結果を前記板情報に付与し、前記板情報を前記仮想通貨取引装置に配信する板情報配信手段と、
を備え、
前記仮想通貨取引装置の前記板情報表示手段は、前記板情報配信手段によって配信された前記板情報を表示する、
ことを特徴とする仮想通貨取引システム。 A plurality of virtual currency trading devices that perform transactions for exchanging a first virtual currency and a second virtual currency,
A virtual currency trading system equipped with a trading server device.
In the transaction, the first remittance information including specific information indicating the remittance of the first virtual currency from one user and the second virtual currency remittance to the one user are received. The first remittance information including the first receipt information indicating the above, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the first remittance sent to the other user. The second receipt information, which indicates the receipt of one virtual currency, is published on the network.
The virtual currency trading device is
An input means for inputting an order content specifying the quantity of the second virtual currency to be exchanged with the first virtual currency in the quantity desired by the user of the virtual currency trading device.
A sell order sending means for sending a sell order of the first virtual currency to the network, including the order contents input by the input means, and a sell order sending means.
A board information display means for displaying board information including sell orders sent to the network,
With
The transaction server device is
A board information generating means for generating board information according to a sell order sent to the network, and
The possibility of success of the transaction related to the user is evaluated according to the number of the first received information with respect to the number of the first remittance information related to the specific user published on the network. Evaluation means and
According to the evaluation result by the evaluation means, the board information distribution means that adds the evaluation result of the user related to the sell order to the board information and distributes the board information to the virtual currency trading device.
With
Said plate information display means of the virtual currency transaction apparatus displays the board information delivered by said plate information distribution means,
A virtual currency trading system characterized by that.
前記取引は、一の利用者からの前記第1の仮想通貨の送金を示す特定情報を含む第1の送金情報と、前記一の利用者に対して送金された前記第2の仮想通貨の受け取りを示す第1の受取情報と、他の利用者からの前記第2の仮想通貨の送金を示す前記特定情報を含む第2の送金情報と、前記他の利用者に対して送金された前記第1の仮想通貨の受け取りを示す第2の受取情報と、がネットワークに公開されることにより行われ、
前記入力手段が、当該仮想通貨取引装置の利用者が所望する数量の前記第1の仮想通貨と交換する前記第2の仮想通貨の数量を指定した注文内容を入力させるステップと、
前記売り注文送出手段が、前記入力手段によって入力された前記注文内容を含む、前記第1の仮想通貨の売り注文をネットワークに送出するステップと、
前記板情報表示手段が、ネットワークに公開されている、特定の利用者に係る前記第1の送金情報の数に対する前記第1の受取情報の数に基づいた当該利用者に係る前記取引の成功の可能性が付与された板情報であって、ネットワークに送出された売り注文を含む前記板情報を表示するステップと、
を含むことを特徴とする仮想通貨取引方法。 It is a virtual currency trading method of a virtual currency trading device provided with an input means, a sell order sending means, and a board information display means, and performing a transaction for exchanging a first virtual currency and a second virtual currency.
In the transaction, the first remittance information including specific information indicating the remittance of the first virtual currency from one user and the second virtual currency remittance to the one user are received. The first remittance information including the first receipt information indicating the above, the second remittance information including the specific information indicating the remittance of the second virtual currency from another user, and the first remittance sent to the other user. The second receipt information, which indicates the receipt of one virtual currency, is published on the network.
The step of causing the input means to input the order contents specifying the quantity of the second virtual currency to be exchanged with the first virtual currency in the quantity desired by the user of the virtual currency trading device.
A step in which the sell order sending means sends a sell order of the first virtual currency to the network including the order contents input by the input means.
The board information display means succeeds in the transaction relating to the user based on the number of the first received information relative to the number of the first remittance information relating to the specific user published on the network. The step of displaying the board information including the sell order sent to the network, which is the board information to which the possibility is given, and
A cryptocurrency trading method characterized by including.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018132286A JP6959649B2 (en) | 2018-07-12 | 2018-07-12 | Cryptocurrency trading device, trading server device, cryptocurrency trading system, cryptocurrency trading method and program |
| JP2021116075A JP7141147B2 (en) | 2018-07-12 | 2021-07-14 | Transaction server device, virtual currency transaction method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018132286A JP6959649B2 (en) | 2018-07-12 | 2018-07-12 | Cryptocurrency trading device, trading server device, cryptocurrency trading system, cryptocurrency trading method and program |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021116075A Division JP7141147B2 (en) | 2018-07-12 | 2021-07-14 | Transaction server device, virtual currency transaction method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2020009361A JP2020009361A (en) | 2020-01-16 |
| JP6959649B2 true JP6959649B2 (en) | 2021-11-02 |
Family
ID=69151986
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018132286A Active JP6959649B2 (en) | 2018-07-12 | 2018-07-12 | Cryptocurrency trading device, trading server device, cryptocurrency trading system, cryptocurrency trading method and program |
| JP2021116075A Active JP7141147B2 (en) | 2018-07-12 | 2021-07-14 | Transaction server device, virtual currency transaction method and program |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021116075A Active JP7141147B2 (en) | 2018-07-12 | 2021-07-14 | Transaction server device, virtual currency transaction method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (2) | JP6959649B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115471330B (en) * | 2021-12-31 | 2025-09-23 | 广州超级共识科技有限公司 | A business processing method for exchanging UTXO and governance tokens |
| WO2025009860A1 (en) * | 2023-07-03 | 2025-01-09 | 주식회사 로드시스템 | System and method for managing cryptocurrencies evaluated by cash value |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001265964A (en) * | 2000-03-21 | 2001-09-28 | Sharp Corp | Transaction price calculation device, transaction price calculation method, and machine-readable recording medium recording a program for realizing the method |
| US20050108027A1 (en) * | 2003-11-17 | 2005-05-19 | Horger Lee C. | Method and apparatus for collecting gambling statistics and for selling speculations via a cryptographically-assisted network |
| JP2007109020A (en) * | 2005-10-13 | 2007-04-26 | Central Tanshi Shoken Kk | Server device, transaction terminal, computer program, and storage medium |
| JP2013041423A (en) * | 2011-08-16 | 2013-02-28 | Tokyo Stock Exchange Inc | Board information analysis apparatus, board information analysis method, and program |
| WO2015157661A1 (en) * | 2014-04-10 | 2015-10-15 | Cfph, Llc | Spot fixing auction |
| JP6867769B2 (en) * | 2016-09-15 | 2021-05-12 | 健 坪井 | Deposit account information disclosure system for virtual currency addresses |
-
2018
- 2018-07-12 JP JP2018132286A patent/JP6959649B2/en active Active
-
2021
- 2021-07-14 JP JP2021116075A patent/JP7141147B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2020009361A (en) | 2020-01-16 |
| JP7141147B2 (en) | 2022-09-22 |
| JP2021168185A (en) | 2021-10-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Sunyaev | Distributed ledger technology | |
| JP7377312B2 (en) | Systems and methods realized by blockchain | |
| US20200051041A1 (en) | System and method for arbitrating a blockchain transaction | |
| US20230108610A1 (en) | Systems for secure data replication and original destruction using a blockchain distributed ledger | |
| JP6786119B2 (en) | Trading equipment, trading methods and trading programs | |
| CN108389047B (en) | Method for trading between parent chain and child chain in block chain and block chain network | |
| JP7254701B2 (en) | Computer-implemented system and method for generating and extracting user-related data stored on a blockchain | |
| CN111967860B (en) | Transaction system, method and node in transaction system | |
| CN109219940A (en) | Privately owned node, the processing method in privately owned node and the program for it | |
| Hellwig et al. | Build your own blockchain | |
| KR20180112061A (en) | Registry and automation management methods for smart contracts in block chain enforcement | |
| CN109313763A (en) | Hierarchical Network System, Nodes and Programs for Hierarchical Network System | |
| JP2001524233A (en) | Virtual property system | |
| US9361621B2 (en) | System and method for improving reliability of distributed electronic transactions | |
| US20200118093A1 (en) | System and method for arbitrating a blockchain transaction | |
| KR20200093777A (en) | System and method for providng digital asset vault services | |
| JP7457406B2 (en) | virtual currency system | |
| JP5084746B2 (en) | Method and apparatus for establishing peer-to-peer karma and trust | |
| JP7141147B2 (en) | Transaction server device, virtual currency transaction method and program | |
| Hellwig et al. | Cryptocurrencies | |
| CN110807634A (en) | Second-hand ticket trading method and platform based on Hasp hash chain and smart contract | |
| WO2020185188A1 (en) | Online real estate market platform, based on blockchain technology | |
| US20230351387A1 (en) | Information processing system, device, and method | |
| KR102504150B1 (en) | Apparatus and method for creating a blockchain-based Thezoom coin reward point exchange marketplace | |
| WO2024137428A1 (en) | Authenticated modification of blockchain-based data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190912 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200715 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200915 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201106 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20210420 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210714 |
|
| C60 | Trial request (containing other claim documents, opposition documents) |
Free format text: JAPANESE INTERMEDIATE CODE: C60 Effective date: 20210714 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20210726 |
|
| C21 | Notice of transfer of a case for reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C21 Effective date: 20210727 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210824 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210915 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210928 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211001 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6959649 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |