KR102123487B1 - Apparatus for matching transactions for exchanging cryptocurrencies and method thereof - Google Patents

Apparatus for matching transactions for exchanging cryptocurrencies and method thereof Download PDF

Info

Publication number
KR102123487B1
KR102123487B1 KR1020190054796A KR20190054796A KR102123487B1 KR 102123487 B1 KR102123487 B1 KR 102123487B1 KR 1020190054796 A KR1020190054796 A KR 1020190054796A KR 20190054796 A KR20190054796 A KR 20190054796A KR 102123487 B1 KR102123487 B1 KR 102123487B1
Authority
KR
South Korea
Prior art keywords
transaction
cryptocurrency
client
processor
exchange rate
Prior art date
Application number
KR1020190054796A
Other languages
Korean (ko)
Other versions
KR20200014682A (en
Inventor
공윤진
박준홍
이준행
Original Assignee
주식회사 스트리미
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 스트리미 filed Critical 주식회사 스트리미
Priority to KR1020190054796A priority Critical patent/KR102123487B1/en
Publication of KR20200014682A publication Critical patent/KR20200014682A/en
Application granted granted Critical
Publication of KR102123487B1 publication Critical patent/KR102123487B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/381Currency conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Abstract

본 개시는 암호화폐 교환을 위한 트랜잭션을 매칭하는 전자 장치를 제안한다. 본 개시에 따른 전자 장치는, 통신 인터페이스; 메모리; 및 통신 인터페이스 및 메모리와 통신 가능하게 연결된 프로세서를 포함하고, 프로세서는, 복수 개의 사용자 클라이언트 중 제1 클라이언트로부터, 제1 암호화폐를 제1 교환율로 제2 암호화폐와 교환하기 위한 제1 트랜잭션을 수신하고, 제2 클라이언트로부터, 제2 암호화폐를 제2 교환율로 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 수신하고, 각각 제1 트랜잭션의 디지털 서명 및 제2 트랜잭션의 디지털 서명을 검증하고, 적어도 하나의 노드에 저장된 제1 클라이언트와 제2 클라이언트의 제1 암호화폐 및 제2 암호화폐에 대한 잔고 정보에 기초하여, 제1 트랜잭션 및 제2 트랜잭션의 유효성을 검증하고, 제1 트랜잭션의 제1 교환율과 제2 트랜잭션의 제2 교환율에 기초하여 제1 트랜잭션과 제2 트랜잭션을 매칭하고, 매칭된 제1 트랜잭션 및 제2 트랜잭션을 블록 체인 네트워크 상의 적어도 하나의 노드로 전달할 수 있다.The present disclosure proposes an electronic device that matches transactions for cryptocurrency exchange. An electronic device according to the present disclosure includes a communication interface; Memory; And a processor communicatively connected to the communication interface and the memory, wherein the processor receives a first transaction for exchanging the first cryptocurrency with the second cryptocurrency from the first client among the plurality of user clients. Receiving, receiving a second transaction from the second client for exchanging the second cryptocurrency with the first cryptocurrency at a second exchange rate, verifying the digital signature of the first transaction and the digital signature of the second transaction, respectively , Validating the validity of the first transaction and the second transaction based on the balance information of the first cryptocurrency and the second cryptocurrency of the first client and the second client stored in at least one node, and The first transaction and the second transaction may be matched based on the second exchange rate of the first exchange rate and the second transaction, and the matched first transaction and second transaction may be delivered to at least one node on the blockchain network.

Figure R1020190054796
Figure R1020190054796

Description

암호화폐 교환을 위한 트랜잭션을 매칭하는 전자 장치 및 방법{APPARATUS FOR MATCHING TRANSACTIONS FOR EXCHANGING CRYPTOCURRENCIES AND METHOD THEREOF}Electronic device and method for matching transactions for cryptocurrency exchange {APPARATUS FOR MATCHING TRANSACTIONS FOR EXCHANGING CRYPTOCURRENCIES AND METHOD THEREOF}

본 개시는 암호화폐 교환을 위한 트랜잭션을 매칭하는 전자 장치 및 방법에 관한 것이다.The present disclosure relates to an electronic device and method for matching a transaction for cryptocurrency exchange.

블록체인(blockchain) 기술을 이용함으로써, 중개자 없이 참여자간의 신뢰가 가능하고 위변조가 불가능한 분산원장(distributed ledger)의 구현이 가능하게 되면서, 이를 활용한 새로운 거래수단인 암호화폐가 등장하였다. 대표적인 암호화폐인 비트코인 이후로 많은 암호화폐들이 등장하였으며, 이들 간의 교환을 위해 암호화폐 거래소도 등장하였다.By using blockchain technology, it is possible to implement a distributed ledger that can be trusted between participants without intermediaries and cannot be tampered with, and a new trading method, cryptocurrency, has emerged. Since Bitcoin, a typical cryptocurrency, many cryptocurrencies have appeared, and cryptocurrency exchanges have appeared to exchange between them.

암호화폐를 저장하기 위한 블록체인 기술은 데이터의 위변조를 방지할 수 있는 특징을 내재하고 있어, 이에 대한 해킹은 실질적으로 불가능하나, 그와 별개로 동작하는 암호화폐 거래소에는 해킹의 위협이 존재하였다. 이에 대응하여, 블록체인 상에서 동작하는 스마트 컨트랙트(smart contract)로 구현된 암호화폐 거래소, 소위 분산형 거래소(Decentralized Exchange, DEX)가 대안으로 제시되었다. DEX는 블록체인 네트워크 상에서 암호화폐 교환을 위한 트랜잭션(transaction)들을 매칭(matching)하여, 각 사용자 클라이언트 사이에 암호화폐 교환이 가능하게 할 수 있다.Blockchain technology for storing cryptocurrency has a feature that can prevent forgery of data, so hacking on it is practically impossible, but there is a threat of hacking on cryptocurrency exchanges that operate separately from it. In response to this, cryptocurrency exchanges implemented as smart contracts operating on the blockchain, so-called decentralized exchanges (DEX), were proposed as alternatives. DEX can match the transactions for the exchange of cryptocurrency on the blockchain network, enabling exchange of cryptocurrency between each user client.

그러나, 블록체인 상에서 동작하는 DEX는, 그 DEX가 실행되는 대상 블록체인의 특성에 기인하여 트랜잭션 매칭의 처리 속도 상에 한계가 있을 수 있다. 이에 따라 다수의 암호화폐 교환 주문, 즉 다수의 트랜잭션이 발생하는 경우, 그 처리가 지연될 수 있다.However, DEX operating on the blockchain may have a limit on the processing speed of transaction matching due to the characteristics of the target blockchain on which the DEX is executed. Accordingly, when a plurality of cryptocurrency exchange orders, that is, a plurality of transactions occur, the processing may be delayed.

대한민국 등록특허공보 제10-1628624호(2016.06.09.)Republic of Korea Registered Patent Publication No. 10-1628624 (2016.06.09.) 대한민국 등록특허공보 제10-1878869호(2018.08.16.)Republic of Korea Registered Patent Publication No. 10-1878869 (August 16, 2018)

본 개시는, 상술한 종래 기술의 문제점을 해결하기 위한 것으로, DEX의 일정 영역을 중앙화한 형태의 암호화폐 거래소에 관한 기술을 제공한다.The present disclosure is intended to solve the above-described problems of the prior art, and provides a technique related to a cryptocurrency exchange in the form of centralizing a certain area of DEX.

본 개시의 일 측면에 따른 전자 장치는, 복수 개의 사용자 클라이언트와 통신을 수행하고, 블록 체인 기반의 블록 체인 네트워크 상에서 암호화폐 교환을 위한 스마트 컨트랙트(smart contract)를 실행하는 하나 이상의 노드(node)와 통신을 수행하는 통신 인터페이스; 상기 복수 개의 사용자 클라이언트로부터 수신되고, 복수 개의 암호화폐 중 적어도 두 개의 암호화폐를 소정의 교환율로 교환하기 위한 트랜잭션(transaction)들을 저장하는 메모리; 및 상기 통신 인터페이스 및 상기 메모리와 통신 가능하게 연결된 프로세서를 포함하고, 상기 프로세서는, 상기 통신 인터페이스를 통해, 상기 복수 개의 사용자 클라이언트 중 제1 클라이언트로부터, 상기 제1 클라이언트의 제1 개인키로 디지털 서명되고 제1 암호화폐를 제1 교환율로 제2 암호화폐와 교환하기 위한 제1 트랜잭션을 수신하고, 상기 통신 인터페이스를 통해, 상기 복수 개의 사용자 클라이언트 중 제2 클라이언트로부터, 상기 제2 클라이언트의 제2 개인키로 디지털 서명되고 상기 제2 암호화폐를 제2 교환율로 상기 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 수신하고, 상기 제1 개인키에 대응되는 제1 공개키 및 상기 제2 개인키에 대응되는 제2 공개키에 기초하여 각각 상기 제1 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션의 디지털 서명을 검증하고, 상기 하나 이상의 노드 중 적어도 하나에 저장된 상기 제1 클라이언트와 상기 제2 클라이언트의 상기 제1 암호화폐 및 상기 제2 암호화폐에 대한 잔고(balance) 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하고, 상기 제1 트랜잭션의 상기 제1 교환율과 상기 제2 트랜잭션의 상기 제2 교환율에 기초하여 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭(matching)하고, 상기 통신 인터페이스를 제어하여, 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션을 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 중 적어도 하나의 노드로 전달할 수 있다.An electronic device according to an aspect of the present disclosure communicates with a plurality of user clients, and one or more nodes that execute a smart contract for exchanging cryptocurrency on a blockchain-based blockchain network. A communication interface for performing communication; A memory received from the plurality of user clients and storing transactions for exchanging at least two cryptocurrencies among a plurality of cryptocurrencies at a predetermined exchange rate; And a processor communicatively coupled to the communication interface and the memory, wherein the processor is digitally signed with a first private key of the first client from a first client of the plurality of user clients through the communication interface. Receiving a first transaction for exchanging a first cryptocurrency with a second cryptocurrency at a first exchange rate, and through the communication interface, from a second client of the plurality of user clients, a second individual of the second client Receive a second transaction to be digitally signed with a key and exchange the second cryptocurrency with the first cryptocurrency at a second exchange rate, and to the first public key and the second private key corresponding to the first private key Verifying the digital signature of the first transaction and the digital signature of the second transaction, respectively, based on the corresponding second public key, and the first client and the second client stored in at least one of the one or more nodes Based on the balance information for the first cryptocurrency and the second cryptocurrency, the validity of the first transaction and the second transaction is verified, and the first exchange rate and the second transaction of the first transaction Matching the first transaction and the second transaction based on the second exchange rate, and controlling the communication interface, so that the matched first transaction and second transaction are the one on the blockchain network. It can be delivered to at least one of the above nodes.

일 실시예에 있어서, 상기 적어도 하나의 노드로 전달된 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션은, 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 간에 공유되어, 상기 블록 체인의 한 블록에 포함되고, 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션에 기초하여, 상기 제1 클라이언트와 상기 제2 클라이언트 각각의 상기 제1 암호화폐 및 상기 제2 암호화폐에 대한 상기 잔고 정보가 갱신될 수 있다.In one embodiment, the matched first transaction and second transaction delivered to the at least one node are shared between the one or more nodes on the blockchain network, included in one block of the blockchain, and the Based on the matched first transaction and second transaction, the balance information for the first cryptocurrency and the second cryptocurrency of each of the first client and the second client may be updated.

일 실시예에 있어서, 상기 프로세서는, 상기 제1 트랜잭션의 디지털 서명을 상기 제1 공개키로 복호화하고, 상기 복호화된 상기 제1 트랜잭션의 디지털 서명 및 상기 제1 트랜잭션을 이용하여 상기 제1 트랜잭션이 상기 제1 클라이언트로부터 유래한 것인지 여부를 검증하고, 상기 제2 트랜잭션의 디지털 서명을 상기 제2 공개키로 복호화하고, 상기 복호화된 상기 제2 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션을 이용하여 상기 제2 트랜잭션이 상기 제2 클라이언트로부터 유래한 것인지 여부를 검증할 수 있다.In one embodiment, the processor decrypts the digital signature of the first transaction with the first public key, and the first transaction uses the digital signature of the decrypted first transaction and the first transaction so that the first transaction is Verify whether it originated from a first client, decrypt the digital signature of the second transaction with the second public key, and use the decrypted digital signature of the second transaction and the second transaction to use the second transaction It is possible to verify whether it originated from the second client.

일 실시예에 있어서, 상기 제1 트랜잭션은 상기 제1 암호화폐의 매도할 수량인 제1 매도량 및 상기 제2 암호화폐의 매수할 수량인 제1 매수량을 특정하고, 상기 제2 트랜잭션은 상기 제2 암호화폐의 매도할 수량인 제2 매도량 및 상기 제1 암호화폐의 매수할 수량인 제2 매수량을 특정할 수 있다.In one embodiment, the first transaction specifies a first selling quantity that is the quantity to be sold of the first cryptocurrency and a first quantity that is a quantity to be bought of the second cryptocurrency, and the second transaction is the second cryptocurrency. The second selling quantity, which is the quantity to be sold, and the second buying quantity, which is the quantity to be bought, of the first cryptocurrency may be specified.

일 실시예에 있어서, 상기 프로세서는, 상기 통신 인터페이스를 통해, 상기 하나 이상의 노드 중 적어도 하나의 노드로부터 상기 제1 클라이언트의 상기 제1 암호화폐의 잔고 정보 및 상기 제2 클라이언트의 상기 제2 암호화폐의 잔고 정보를 획득하고, 상기 제1 클라이언트의 상기 제1 암호화폐의 잔고 정보 및 상기 제1 트랜잭션의 상기 제1 매도량에 기초하여, 상기 제1 트랜잭션의 유효성을 검증하고, 상기 제2 클라이언트의 상기 제2 암호화폐의 잔고 정보 및 상기 제2 트랜잭션의 상기 제2 매도량에 기초하여, 상기 제2 트랜잭션의 유효성을 검증할 수 있다.In one embodiment, the processor, via the communication interface, the balance information of the first cryptocurrency of the first client from at least one node of the one or more nodes and the second cryptocurrency of the second client Obtain balance information of the first client, and verify the validity of the first transaction based on the balance information of the first cryptocurrency of the first client and the first selling amount of the first transaction, and the Based on the balance information of the second cryptocurrency and the second selling amount of the second transaction, the validity of the second transaction can be verified.

일 실시예에 있어서, 상기 프로세서는, 소정의 기준에 따라 사용자 클라이언트를 선별하고, 선별된 클라이언트로부터 수신되는 트랜잭션을 다른 트랜잭션과의 매칭에서 배제할 수 있다. 예를 들어, 한 사용자 클라이언트가 유효하지 않은 트랜잭션을 발송하거나, 일정 빈도수 이상으로 트랜잭션을 발송하는 등의 패턴을 보이는 경우, 해당 사용자 클라이언트를 매칭에서 배제하거나, 해당 사용자 클라이언트로부터의 트랜잭션을 수신하지 않을 수 있다. 구체적으로, 상기 프로세서는, 상기 복수 개의 사용자 클라이언트 중, 상기 잔고 정보에 기초하여 유효하지 않은 트랜잭션을 미리 정의된 빈도수(frequency) 이상의 빈도수로 발송하는 사용자 클라이언트를 선별하고, 상기 선별된 사용자 클라이언트의 식별자를 상기 메모리에 저장하고, 상기 저장된 식별자에 대응하는 식별자를 가지는 사용자 클라이언트로부터 수신되는 트랜잭션을 다른 트랜잭션과의 매칭에서 배제할 수 있다.In one embodiment, the processor may select a user client according to a predetermined criterion, and exclude a transaction received from the selected client from matching with other transactions. For example, if a user client displays a pattern such as sending an invalid transaction, sending a transaction more than a certain frequency, or the like, the user client is not excluded from matching or a transaction from the user client is not received. Can be. Specifically, the processor selects, among the plurality of user clients, a user client that sends an invalid transaction based on the balance information at a frequency equal to or greater than a predefined frequency, and the identifier of the selected user client May be stored in the memory, and a transaction received from a user client having an identifier corresponding to the stored identifier may be excluded from matching with other transactions.

일 실시예에 있어서, 상기 프로세서는, 상기 제1 트랜잭션의 상기 제1 매도량 및 상기 제1 매수량에 기초하여 상기 제1 교환율을 도출하고, 상기 제2 트랜잭션의 상기 제2 매도량 및 상기 제2 매수량에 기초하여 상기 제2 교환율을 도출하고, 상기 제1 교환율과 상기 제2 교환율이 대응되는 경우 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭할 수 있다.In one embodiment, the processor derives the first exchange rate based on the first selling amount and the first buying amount of the first transaction, and the second selling amount and the second buying amount of the second transaction The second exchange rate may be derived based on the first transaction, and when the first exchange rate and the second exchange rate correspond, the first transaction and the second transaction may be matched.

일 실시예에 있어서, 상기 제1 트랜잭션 및 상기 제2 트랜잭션은 각각 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 만료시간에 관한 정보를 더 포함하고, 상기 프로세서는 상기 만료시간에 관한 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증할 수 있다.In one embodiment, the first transaction and the second transaction each further include information about the expiration time of the first transaction and the second transaction, and the processor is based on the information about the expiration time, The validity of the first transaction and the second transaction can be verified.

일 실시예에 있어서, 상기 갱신된 잔고 정보에 기초하여, 상기 제1 암호화폐와 상기 제2 암호화폐는 상기 제1 공개키로 나타나는 상기 제1 클라이언트의 제1 주소 또는 상기 제2 공개키로 나타나는 상기 제2 클라이언트의 제2 주소로 인출될 수 있다.In one embodiment, based on the updated balance information, the first cryptocurrency and the second cryptocurrency are the first address of the first client represented by the first public key or the second represented by the second public key. 2 Can be withdrawn to the client's second address.

본 개시의 다른 측면에 따른 암호화폐 교환을 위한 트랜잭션을 매칭하는 방법은, 복수 개의 사용자 클라이언트 중 제1 클라이언트로부터, 상기 제1 클라이언트의 제1 개인키로 디지털 서명되고 제1 암호화폐를 제1 교환율로 제2 암호화폐와 교환하기 위한 제1 트랜잭션(transaction)을 수신하는 단계; 상기 복수 개의 사용자 클라이언트 중 제2 클라이언트로부터, 상기 제2 클라이언트의 제2 개인키로 디지털 서명되고 상기 제2 암호화폐를 제2 교환율로 상기 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 수신하는 단계; 상기 제1 개인키에 대응되는 제1 공개키 및 상기 제2 개인키에 대응되는 제2 공개키에 기초하여 각각 상기 제1 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션의 디지털 서명을 검증하는 단계; 블록 체인 기반의 블록 체인 네트워크 상에서, 암호화폐 교환을 위한 스마트 컨트랙트(smart contract)를 실행하는 하나 이상의 노드(node) 중 적어도 하나에 저장된 상기 제1 클라이언트와 상기 제2 클라이언트의 상기 제1 암호화폐 및 상기 제2 암호화폐에 대한 잔고(balance) 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계; 상기 제1 트랜잭션의 상기 제1 교환율과 상기 제2 트랜잭션의 상기 제2 교환율에 기초하여 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭(matching)하는 단계; 및 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션을 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 중 적어도 하나의 노드로 전달하는 단계를 포함할 수 있다.A method of matching a transaction for cryptocurrency exchange according to another aspect of the present disclosure is digitally signed with a first private key of the first client from a first client among a plurality of user clients and a first exchange rate of the first cryptocurrency Receiving a first transaction for exchanging with a second cryptocurrency; Receiving, from a second client of the plurality of user clients, a second transaction for digitally signing the second private key of the second client and exchanging the second cryptocurrency with the first cryptocurrency at a second exchange rate; ; Verifying the digital signature of the first transaction and the digital signature of the second transaction, respectively, based on the first public key corresponding to the first private key and the second public key corresponding to the second private key; On the blockchain-based blockchain network, the first cryptocurrency of the first client and the second client stored in at least one of one or more nodes executing a smart contract for cryptocurrency exchange, and Verifying validity of the first transaction and the second transaction based on balance information for the second cryptocurrency; Matching the first transaction and the second transaction based on the first exchange rate of the first transaction and the second exchange rate of the second transaction; And delivering the matched first transaction and second transaction to at least one of the one or more nodes on the blockchain network.

일 실시예에 있어서, 상기 적어도 하나의 노드로 전달된 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션은, 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 간에 공유되어, 상기 블록 체인의 한 블록에 포함되고, 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션에 기초하여, 상기 제1 클라이언트와 상기 제2 클라이언트 각각의 상기 제1 암호화폐 및 상기 제2 암호화폐에 대한 상기 잔고 정보가 갱신될 수 있다.In one embodiment, the matched first transaction and second transaction delivered to the at least one node are shared between the one or more nodes on the blockchain network, included in one block of the blockchain, and the Based on the matched first transaction and second transaction, the balance information for the first cryptocurrency and the second cryptocurrency of each of the first client and the second client may be updated.

일 실시예에 있어서, 상기 제1 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션의 디지털 서명을 검증하는 단계는: 상기 제1 트랜잭션의 디지털 서명을 상기 제1 공개키로 복호화하고, 상기 복호화된 상기 제1 트랜잭션의 디지털 서명 및 상기 제1 트랜잭션을 이용하여 상기 제1 트랜잭션이 상기 제1 클라이언트로부터 유래한 것인지 여부를 검증하는 단계; 및 상기 제2 트랜잭션의 디지털 서명을 상기 제2 공개키로 복호화하고, 상기 복호화된 상기 제2 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션을 이용하여 상기 제2 트랜잭션이 상기 제2 클라이언트로부터 유래한 것인지 여부를 검증하는 단계를 포함할 수 있다.In one embodiment, verifying the digital signature of the first transaction and the digital signature of the second transaction includes: decrypting the digital signature of the first transaction with the first public key, and decrypting the first transaction Verifying whether the first transaction originated from the first client using a digital signature and the first transaction; And whether the second transaction originates from the second client by decrypting the digital signature of the second transaction with the second public key and using the decrypted digital signature of the second transaction and the second transaction. And verifying.

일 실시예에 있어서, 상기 제1 트랜잭션은 상기 제1 암호화폐의 매도할 수량인 제1 매도량 및 상기 제2 암호화폐의 매수할 수량인 제1 매수량을 특정하고, 상기 제2 트랜잭션은 상기 제2 암호화폐의 매도할 수량인 제2 매도량 및 상기 제1 암호화폐의 매수할 수량인 제2 매수량을 특정할 수 있다.In one embodiment, the first transaction specifies a first selling quantity that is the quantity to be sold of the first cryptocurrency and a first quantity that is a quantity to be bought of the second cryptocurrency, and the second transaction is the second cryptocurrency. The second selling quantity, which is the quantity to be sold, and the second buying quantity, which is the quantity to be bought, of the first cryptocurrency may be specified.

일 실시예에 있어서, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계는: 상기 하나 이상의 노드 중 적어도 하나의 노드로부터 상기 제1 클라이언트의 상기 제1 암호화폐의 잔고 정보 및 상기 제2 클라이언트의 상기 제2 암호화폐의 잔고 정보를 획득하는 단계; 상기 제1 클라이언트의 상기 제1 암호화폐의 잔고 정보 및 상기 제1 트랜잭션의 상기 제1 매도량에 기초하여, 상기 제1 트랜잭션의 유효성을 검증하는 단계; 및 상기 제2 클라이언트의 상기 제2 암호화폐의 잔고 정보 및 상기 제2 트랜잭션의 상기 제2 매도량에 기초하여, 상기 제2 트랜잭션의 유효성을 검증하는 단계를 포함할 수 있다.In one embodiment, verifying the validity of the first transaction and the second transaction includes: balance information of the first cryptocurrency of the first client and the second from at least one node of the one or more nodes. Obtaining balance information of the second cryptocurrency of the client; Validating the validity of the first transaction based on the balance information of the first cryptocurrency of the first client and the first selling amount of the first transaction; And verifying the validity of the second transaction based on the balance information of the second cryptocurrency of the second client and the second selling amount of the second transaction.

일 실시예에 있어서, 상기 복수 개의 사용자 클라이언트 중, 상기 잔고 정보에 기초하여 유효하지 않은 트랜잭션을 미리 정의된 빈도수(frequency) 이상의 빈도수로 발송하는 사용자 클라이언트를 선별하는 단계; 상기 선별된 사용자 클라이언트의 식별자를 저장하는 단계; 및 상기 저장된 식별자에 대응하는 식별자를 가지는 사용자 클라이언트로부터 수신되는 트랜잭션을 다른 트랜잭션과의 매칭에서 배제하는 단계를 더 포함할 수 있다.In one embodiment, the step of selecting, among the plurality of user clients, a user client sending an invalid transaction based on the balance information at a frequency equal to or greater than a predefined frequency; Storing an identifier of the selected user client; And excluding a transaction received from a user client having an identifier corresponding to the stored identifier from matching with another transaction.

일 실시예에 있어서, 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭하는 단계는: 상기 제1 트랜잭션의 상기 제1 매도량 및 상기 제1 매수량에 기초하여 상기 제1 교환율을 도출하는 단계; 상기 제2 트랜잭션의 상기 제2 매도량 및 상기 제2 매수량에 기초하여 상기 제2 교환율을 도출하는 단계; 및 상기 제1 교환율과 상기 제2 교환율이 대응되는 경우 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭하는 단계를 포함할 수 있다.In one embodiment, matching the first transaction and the second transaction may include: deriving the first exchange rate based on the first selling amount and the first buying amount of the first transaction; Deriving the second exchange rate based on the second selling amount and the second buying amount of the second transaction; And matching the first transaction and the second transaction when the first exchange rate and the second exchange rate correspond.

일 실시예에 있어서, 상기 제1 트랜잭션 및 상기 제2 트랜잭션은 각각 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 만료시간에 관한 정보를 더 포함하고, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계는: 상기 만료시간에 관한 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계를 포함할 수 있다.In one embodiment, the first transaction and the second transaction further include information about expiration times of the first transaction and the second transaction, respectively, and verify the validity of the first transaction and the second transaction The operation may include: verifying validity of the first transaction and the second transaction based on the information regarding the expiration time.

일 실시예에 있어서, 상기 갱신된 잔고 정보에 기초하여, 상기 제1 암호화폐와 상기 제2 암호화폐는 상기 제1 공개키로 나타나는 상기 제1 클라이언트의 제1 주소 또는 상기 제2 공개키로 나타나는 상기 제2 클라이언트의 제2 주소로 인출될 수 있다.In one embodiment, based on the updated balance information, the first cryptocurrency and the second cryptocurrency are the first address of the first client represented by the first public key or the second represented by the second public key. 2 Can be withdrawn to the client's second address.

본 개시의 또 다른 측면에 따른, 컴퓨터 상에서 수행되기 위한 프로그램을 기록한 비일시적 컴퓨터 판독 가능 기록 매체에서, 상기 프로그램은, 프로세서에 의한 실행 시, 상기 프로세서가, 복수 개의 사용자 클라이언트 중 제1 클라이언트로부터 수신된, 상기 제1 클라이언트의 제1 개인키로 디지털 서명되고 제1 암호화폐를 제1 교환율로 제2 암호화폐와 교환하기 위한 제1 트랜잭션(transaction)을 획득하는 단계; 상기 복수 개의 사용자 클라이언트 중 제2 클라이언트로부터 수신된, 상기 제2 클라이언트의 제2 개인키로 디지털 서명되고 상기 제2 암호화폐를 제2 교환율로 상기 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 수신하는 단계; 상기 제1 개인키에 대응되는 제1 공개키 및 상기 제2 개인키에 대응되는 제2 공개키에 기초하여 각각 상기 제1 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션의 디지털 서명을 검증하는 단계; 블록 체인 기반의 블록 체인 네트워크 상에서, 암호화폐 교환을 위한 스마트 컨트랙트(smart contract)를 실행하는 하나 이상의 노드(node) 중 적어도 하나에 저장된 상기 제1 클라이언트와 상기 제2 클라이언트의 상기 제1 암호화폐 및 상기 제2 암호화폐에 대한 잔고(balance) 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계; 상기 제1 트랜잭션의 상기 제1 교환율과 상기 제2 트랜잭션의 상기 제2 교환율에 기초하여 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭(matching)하는 단계; 및 통신 인터페이스를 제어하여, 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션을 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 중 적어도 하나의 노드로 전달하는 단계를 수행하도록 하는 실행 가능한 명령을 포함할 수 있다.According to another aspect of the present disclosure, in a non-transitory computer-readable recording medium recording a program to be executed on a computer, the program, when executed by a processor, is received by the processor from a first client of a plurality of user clients. Obtaining a first transaction for digitally signing the first private key of the first client and exchanging the first cryptocurrency with the second cryptocurrency at a first exchange rate; Receive a second transaction to exchange the second cryptocurrency with the first cryptocurrency at a second exchange rate and digitally signed with the second private key of the second client, received from the second client among the plurality of user clients To do; Verifying the digital signature of the first transaction and the digital signature of the second transaction, respectively, based on the first public key corresponding to the first private key and the second public key corresponding to the second private key; On the blockchain-based blockchain network, the first cryptocurrency of the first client and the second client stored in at least one of one or more nodes executing a smart contract for cryptocurrency exchange, and Verifying validity of the first transaction and the second transaction based on balance information for the second cryptocurrency; Matching the first transaction and the second transaction based on the first exchange rate of the first transaction and the second exchange rate of the second transaction; And controlling a communication interface to execute the step of delivering the matched first transaction and second transaction to at least one of the one or more nodes on the blockchain network.

일 실시예에 있어서, 상기 적어도 하나의 노드로 전달된 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션은, 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 간에 공유되어, 상기 블록 체인의 한 블록에 포함되고, 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션에 기초하여, 상기 제1 클라이언트와 상기 제2 클라이언트 각각의 상기 제1 암호화폐 및 상기 제2 암호화폐에 대한 상기 잔고 정보가 갱신될 수 있다.In one embodiment, the matched first transaction and second transaction delivered to the at least one node are shared between the one or more nodes on the blockchain network, included in one block of the blockchain, and the Based on the matched first transaction and second transaction, the balance information for the first cryptocurrency and the second cryptocurrency of each of the first client and the second client may be updated.

본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정은, DEX만을 이용한 암호화폐 교환 과정에 비하여, 트랜잭션 처리 속도가 더 빠를 수 있다.The cryptocurrency exchange process according to various embodiments of the present disclosure may have a faster transaction processing speed compared to a cryptocurrency exchange process using only DEX.

본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정은, DEX만을 이용한 암호화폐 교환 과정에 비하여, 다량의 트랜잭션이 발생하는 상황에서 처리 정체(congestion)을 막을 수 있다.The cryptocurrency exchange process according to various embodiments of the present disclosure can prevent processing congestion in a situation in which a large amount of transactions occur, compared to a cryptocurrency exchange process using only DEX.

본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정은, DEX만을 이용한 암호화폐 교환 과정과 달리, 트랜잭션을 전송하는 특정 사용자 클라이언트에 대한 일종의 필터링(filtering) 정책의 적용이 가능할 수 있다.In the cryptocurrency exchange process according to various embodiments of the present disclosure, unlike a cryptocurrency exchange process using only DEX, it may be possible to apply a kind of filtering policy to a specific user client transmitting a transaction.

도 1은 DEX(Decentralized Exchanges)를 이용한 암호화폐 교환을 위한 트랜잭션을 매칭하는 과정의 어느 한 실시예를 설명하는 도면이다.
도 2는 본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정을 나타낸 도면이다.
도 3은 본 개시의 다양한 실시예들에 따른 전자 장치(10)의 블록도를 나타낸 도면이다.
도 4는 본 개시의 일 실시예에 따른, CEX(Centralized Exchanges), 노드, 사용자 클라이언트가 암호화폐 교환을 위한 트랜잭션을 처리하는 순서를 도식화한 도면이다.
도 5는 본 개시의 일 실시예에 따른, 노드가 전달받은 매칭된 트랜잭션을 처리하는 과정을 나타낸 도면이다.
도 6은 본 개시의 일 실시예에 따른, CEX가 노드로부터 잔고 정보를 획득하는 과정을 나타낸 도면이다.
도 7은 본 개시의 일 실시예에 따른, CEX가 특정 사용자 클라이언트의 트랜잭션을 필터링하는 과정을 나타낸 도면이다.
도 8은 본 개시의 일 실시예에 따른, CEX의 오더 북 및 트랜잭션 매칭 과정을 나타낸 도면이다.
도 9는 본 개시에 따른 전자 장치에 의해 수행될 수 있는, 암호화폐 교환을 위한 트랜잭션을 매칭하는 방법의 일 실시예를 나타낸 도면이다.
1 is a view for explaining an embodiment of the process of matching transactions for cryptocurrency exchange using Decentralized Exchanges (DEX).
2 is a view showing a cryptocurrency exchange process according to various embodiments of the present disclosure.
3 is a block diagram of an electronic device 10 according to various embodiments of the present disclosure.
4 is a diagram illustrating a sequence in which a centralized exchange (CEX), a node, and a user client process a transaction for cryptocurrency exchange according to an embodiment of the present disclosure.
5 is a diagram illustrating a process of processing a matched transaction received by a node according to an embodiment of the present disclosure.
6 is a diagram illustrating a process in which CEX acquires balance information from a node according to an embodiment of the present disclosure.
7 is a diagram illustrating a process in which CEX filters a transaction of a specific user client according to an embodiment of the present disclosure.
8 is a view showing a CEX order book and transaction matching process according to an embodiment of the present disclosure.
9 is a diagram illustrating an embodiment of a method of matching a transaction for cryptocurrency exchange, which can be performed by an electronic device according to the present disclosure.

본 문서에 기재된 다양한 실시예들은, 본 개시의 기술적 사상을 명확히 설명하기 위한 목적으로 예시된 것이며, 이를 특정한 실시 형태로 한정하려는 것이 아니다. 본 개시의 기술적 사상은, 본 문서에 기재된 각 실시예의 다양한 변경(modifications), 균등물(equivalents), 대체물(alternatives) 및 각 실시예의 전부 또는 일부로부터 선택적으로 조합된 실시예를 포함한다. 또한 본 개시의 기술적 사상의 권리 범위는 이하에 제시되는 다양한 실시예들이나 이에 대한 구체적 설명으로 한정되지 않는다.The various embodiments described in this document have been exemplified for the purpose of clearly describing the technical spirit of the present disclosure, and are not intended to be limited to the specific embodiments. The technical spirit of the present disclosure includes various modifications, equivalents, alternatives, and alternatively selectively combined embodiments of each embodiment described in this document. In addition, the scope of the technical spirit of the present disclosure is not limited to various embodiments or detailed descriptions thereof.

기술적이거나 과학적인 용어를 포함해서, 본 문서에서 사용되는 용어들은, 달리 정의되지 않는 한, 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자에게 일반적으로 이해되는 의미를 가질 수 있다.Terms used in this document, including technical or scientific terms, may have meanings generally understood by those skilled in the art to which the present disclosure pertains, unless otherwise defined.

본 문서에서 사용되는 "포함한다", "포함할 수 있다", "구비한다", "구비할 수 있다", "가진다", "가질 수 있다" 등과 같은 표현들은, 대상이 되는 특징(예: 기능, 동작 또는 구성요소 등)이 존재함을 의미하며, 다른 추가적인 특징의 존재를 배제하지 않는다. 즉, 이와 같은 표현들은 다른 실시예를 포함할 가능성을 내포하는 개방형 용어(open-ended terms)로 이해되어야 한다.Expressions such as “include”, “can include”, “have”, “can have”, “have”, “can have”, etc., as used in this document, are targeted features (eg Function, operation or component, etc.), and does not exclude the presence of other additional features. That is, such expressions should be understood as open-ended terms that imply the possibility of including other embodiments.

본 문서에서 사용되는 단수형의 표현은, 문맥상 다르게 뜻하지 않는 한 복수형의 의미를 포함할 수 있으며, 이는 청구항에 기재된 단수형의 표현에도 마찬가지로 적용된다.The expression of the singular used in this document may include the meaning of the plural unless the context means otherwise, and the same applies to the expression of the singular described in the claims.

본 문서에서 사용되는 "제1", "제2", 또는 "첫째", "둘째" 등의 표현은, 문맥상 다르게 뜻하지 않는 한, 복수의 동종 대상들을 지칭함에 있어 한 대상을 다른 대상과 구분하기 위해 사용되며, 해당 대상들간의 순서 또는 중요도를 한정하는 것은 아니다.As used herein, the expressions "first", "second", or "first", "second", etc., refer to a plurality of homogeneous objects and distinguish one object from another, unless the context indicates otherwise. It is used to do this, and it does not limit the order or importance between the objects.

본 문서에서 사용되는 "A, B, 및 C", "A, B, 또는 C", "A, B, 및/또는 C" 또는 "A, B, 및 C 중 적어도 하나", "A, B, 또는 C 중 적어도 하나", "A, B, 및/또는 C 중 적어도 하나" 등의 표현은, 각각의 나열된 항목 또는 나열된 항목들의 가능한 모든 조합들을 의미할 수 있다. 예를 들어, "A 또는 B 중 적어도 하나"는, (1) 적어도 하나의 A, (2) 적어도 하나의 B, (3) 적어도 하나의 A 및 적어도 하나의 B를 모두 지칭할 수 있다.As used herein, "A, B, and C", "A, B, or C", "A, B, and/or C" or "A, B, and C at least one of", "A, B , Or “at least one of C”, “at least one of A, B, and/or C”, etc., may mean each listed item or all possible combinations of the listed items. For example, “at least one of A or B” may refer to (1) at least one A, (2) at least one B, (3) at least one A, and at least one B.

본 문서에서 사용되는 "~에 기초하여"라는 표현은, 해당 표현이 포함되는 어구 또는 문장에서 기술되는, 결정, 판단의 행위 또는 동작에 영향을 주는 하나 이상의 인자를 기술하는데 사용되고, 이 표현은 해당 결정, 판단의 행위 또는 동작에 영향을 주는 추가적인 인자를 배제하지 않는다.As used in this document, the expression "based on" is used to describe one or more factors affecting the action or action of a decision or judgment, as described in a phrase or sentence containing the expression. It does not exclude additional factors that influence the action or action of a decision, judgment.

본 문서에서 사용되는, 어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "연결되어" 있다거나 "접속되어" 있다는 표현은, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결 또는 접속되는 것뿐 아니라, 새로운 다른 구성요소(예: 제3 구성요소)를 매개로 하여 연결 또는 접속되는 것을 의미할 수 있다.As used herein, the expression that a component (eg, a first component) is “connected” or “connected” to another component (eg, a second component) means that any component is It may mean not only being directly connected or connected to other components, but also connected or connected via other new components (eg, a third component).

본 문서에서 사용된 표현 "~하도록 구성된(configured to)"은 문맥에 따라, "~하도록 설정된", "~하는 능력을 가지는", "~하도록 변경된", "~하도록 만들어진", "~를 할 수 있는" 등의 의미를 가질 수 있다. 해당 표현은, "하드웨어적으로 특별히 설계된"의 의미로 제한되지 않으며, 예를 들어 특정 동작을 수행하도록 구성된 프로세서란, 소프트웨어를 실행함으로써 그 특정 동작을 수행할 수 있는 범용 프로세서(generic-purpose processor)를 의미할 수 있다.The expressions "configured to" used in this document, depending on the context, "do set to", "having the ability to do", "modified to do", "made to do", "do" It can have the meaning. The expression is not limited to the meaning of “specially designed in hardware”, and for example, a processor configured to perform a specific operation is a general-purpose processor capable of performing the specific operation by executing software. Can mean

본 개시에서, 블록체인(blockchain)은 데이터를 분산 데이터 저장 환경에 저장하여, 누구나 그 데이터를 열람할 수 있으나, 누구도 임의로 수정할 수 없는, 분산 컴퓨팅 기술 기반의 데이터 위변조 방지 기술 내지 분산 데이터 저장 기술을 의미할 수 있다. 블록체인은 복수의 블록이 체인 형태로 연결된 것으로, 여기서 블록은 데이터를 저장하는 단위일 수 있다. 지속적으로 변경되는 데이터가 블록체인의 모든 노드에 의해 기록됨으로써, 전체 데이터를 어느 한 노드가 임의로 조작하는 것이 불가능할 수 있다.In the present disclosure, a blockchain stores data in a distributed data storage environment, and anyone can view the data, but anyone can arbitrarily modify the data forgery prevention technology or distributed data storage technology based on distributed computing technology. Can mean In a blockchain, a plurality of blocks are connected in a chain form, where a block may be a unit for storing data. As continuously changing data is recorded by all nodes in the blockchain, it may be impossible for any one node to arbitrarily manipulate the entire data.

본 개시에서, 암호화폐는 전술한 블록체인을 기반으로 한 암호화 방법을 사용하여, 거래 안전이 확보되고 위변조가 방지되는 디지털 자산일 수 있다. 예를 들어, 암호화폐에는 비트코인, 이더리움, 리플, 라이트 코인 등이 있다.In the present disclosure, the cryptocurrency may be a digital asset that secures transaction security and prevents forgery and alteration using the above-described blockchain-based encryption method. For example, cryptocurrencies include Bitcoin, Ethereum, Ripple and Litecoin.

이하, 첨부된 도면들을 참조하여, 본 개시의 다양한 실시예들을 설명한다. 첨부된 도면 및 도면에 대한 설명에서, 동일하거나 실질적으로 동등한(substantially equivalent) 구성요소에는 동일한 참조부호가 부여될 수 있다. 또한, 이하 다양한 실시예들의 설명에 있어서, 동일하거나 대응하는 구성요소를 중복하여 기술하는 것이 생략될 수 있으나, 이는 해당 구성요소가 그 실시예에 포함되지 않는 것을 의미하지는 않는다.Hereinafter, various embodiments of the present disclosure will be described with reference to the accompanying drawings. In the accompanying drawings and description of the drawings, identical or substantially equivalent components may be given the same reference numerals. In addition, in the following description of various embodiments, the same or corresponding elements may be omitted repeatedly, but this does not mean that the corresponding elements are not included in the embodiment.

도 1은 DEX를 이용한 암호화폐 교환을 위한 트랜잭션을 매칭하는 과정의 어느 한 실시예를 설명하는 도면이다. 도시된 실시예에서, 적어도 하나의 블록체인의 사용자 클라이언트(3a, 3b)는 블록체인 네트워크(4) 상에서 동작하는 DEX(Decentralized Exchanges)(5)를 통하여 암호화폐를 교환할 수 있다. DEX는 블록체인 상에서 동작하는 분산화된 암호화폐 거래소로서, 스마트 컨트랙트로 구현될 수 있다. DEX(5)의 동작에 해당하는 연산은 실질적으로 블록체인 상의 복수의 노드(2)에 의해 수행될 수 있다. 블록체인의 사용자 클라이언트 각각은 자신이 보유하고 있는 암호화폐를 다른 사용자 클라이언트와 교환하기 위한 트랜잭션을 발행할 수 있다. DEX는 블록체인 네트워크 상에서 이러한 트랜잭션들을 매칭하여, 각 사용자 클라이언트 사이에 암호화폐 교환이 가능하게 할 수 있다.1 is a diagram illustrating an embodiment of a process of matching a transaction for cryptocurrency exchange using DEX. In the illustrated embodiment, at least one blockchain user client 3a, 3b can exchange cryptocurrency through Decentralized Exchanges (DEX) 5 operating on the blockchain network 4. DEX is a decentralized cryptocurrency exchange that operates on a blockchain, and can be implemented as a smart contract. The operation corresponding to the operation of the DEX 5 can be performed by a plurality of nodes 2 on the blockchain. Each user client on the blockchain can issue a transaction to exchange their own cryptocurrency with another user client. DEX can match these transactions on the blockchain network, enabling the exchange of cryptocurrency between each user client.

본 개시에서, 노드(2)는 블록체인 네트워크(4)의 구성요소 중 하나로서, 해당 블록체인을 유지하기 위한 연산을 수행하는 주체일 수 있다. 블록체인의 유지에는 신규 블록의 생성 작업이 포함될 수 있다. 블록체인의 임의의 한 노드(2)는 사용자 클라이언트(3)가 발행한 트랜잭션을 이용하여 블록체인의 블록을 생성할 수 있다. 생성된 블록은 분산합의 과정을 통해 블록체인의 노드들 간에 공유되고 블록체인의 다음 블록으로 연결될 수 있다. 즉, 블록체인의 블록들은 트랜잭션들을 저장할 수 있다. 또한 노드(2)는 트랜잭션을 실행(어플리케이션, 예를 들어 스마트 컨트랙트에 적용)할 수 있다. 후술할 스마트 컨트랙트는 트랜잭션을 실행함에 따른 결과를 저장할 수 있다. 예를 들어 트랜잭션이 암호화폐 거래를 위한 주문이라면, 스마트 컨트랙트는 트랜잭션을 적용함에 따라 변화하는 각 사용자 클라이언트의 잔고 정보를 저장할 수 있다. 스마트 컨트랙트에 저장된 잔고 정보가 갱신되었다는 것은 트랜잭션에 따라 암호화폐 교환 내지 암호화폐 송금이 완료되었다는 것을 의미할 수 있다.In the present disclosure, the node 2 is one of the components of the blockchain network 4 and may be a subject that performs an operation for maintaining the corresponding blockchain. The maintenance of the blockchain may include the creation of new blocks. Any one node 2 of the blockchain can create a block of the blockchain using a transaction issued by the user client 3. The generated block can be shared between nodes in the blockchain through the distributed agreement process and connected to the next block in the blockchain. That is, blocks in the blockchain can store transactions. Also, the node 2 can execute a transaction (apply to an application, for example, a smart contract). The smart contract, which will be described later, may store a result of executing a transaction. For example, if the transaction is an order for a cryptocurrency transaction, the smart contract may store the balance information of each user client that changes as the transaction is applied. When the balance information stored in the smart contract is updated, it may mean that the exchange of cryptocurrency or the transfer of cryptocurrency has been completed according to the transaction.

본 개시에서, 사용자 클라이언트(3)는 트랜잭션을 발행(생성)할 수 있다. 하고, 또한, 사용자 클라이언트(3)는 블록체인의 복수의 노드(2)들 중 어느 하나를 통해, 스마트 컨트랙트에 저장된 잔고 정보 등을 확인할 수 있다. 사용자 클라이언트는 블록체인 클라이언트라고 불릴 수도 있다.In this disclosure, the user client 3 can issue (create) a transaction. In addition, the user client 3 can check the balance information stored in the smart contract through any one of the plurality of nodes 2 in the blockchain. User clients can also be called blockchain clients.

본 개시에서, 블록체인 네트워크(4)는 복수의 노드(2) 사이에 트랜잭션 또는 블락 등을 공유하는 네트워크를 의미할 수 있다.In the present disclosure, the blockchain network 4 may refer to a network that shares transactions or blocks between a plurality of nodes 2.

본 개시에서, 온 체인(ON Chain)은 블록체인 네트워크(4) 상을 의미할 수 있다. 어느 연산, 동작이 온 체인에서 수행된다는 표현은, 그 연산, 동작이 블록체인 네트워크(4) 상에서 수행된다는 의미로서, 예를 들어 적어도 하나의 노드(2)에 의해 그 연산, 동작이 수행된다는 뜻일 수 있다. 오프 체인(OFF Chain)은 블록체인 네트워크(4) 밖을 의미할 수 있다. 어느 연산, 동작이 오프 체인에서 수행된다는 표현은, 그 연산, 동작이 블록체인 네트워크(4)와는 구분되는 블록체인 네트워크(4) 밖의 네트워크에서 수행된다는 의미일 수 있다. 예를 들어, 블록체인 노드(2) 간의 블록 생성, 분산 합의 과정 등을 제외한, 사용자 클라이언트(3), 후술할 CEX(Centralized Exchanges)(1), 별도의 서버, 기타 통신 가능한 장치 등 사이의 방송망/브로드밴드 등을 통한 통신은 모두 오프 체인에서 수행된다고 볼 수 있다.In the present disclosure, on chain (ON Chain) may mean on the blockchain network (4). The expression that an operation or operation is performed on-chain means that the operation or operation is performed on the blockchain network 4, for example, that the operation or operation is performed by at least one node 2. Can be. Off-chain (OFF Chain) may mean outside the blockchain network (4). The expression that any operation or operation is performed off-chain may mean that the operation or operation is performed on a network outside the blockchain network 4 that is distinct from the blockchain network 4. For example, a broadcast network between a user client 3, CEX (Centralized Exchanges) 1 to be described later, a separate server, and other communicable devices, excluding block generation between blockchain nodes 2 and distributed consensus processes, etc. /Broadband communication can be considered to be performed off-chain.

본 개시에서, 스마트 컨트랙트는 블록체인 상에서 동작하는 어플리케이션이라고 볼 수 있다. 전술한 트랜잭션은 스마트 컨트랙트의 상태를 변경하기 위한 입력값의 역할을 할 수 있다. 상술한 블록체인 상 블록들의 트랜잭션은 스마트 컨트랙트의 상태를 변경시킬 수 있고, 스마트 컨트랙트는 스마트 컨트랙트의 최신 상태를 보관하고 있을 수 있다. 예를 들어, 본 개시에서, 블록체인 상에서 동작하는 전술한 분산화된 거래소 DEX는, 스마트 컨트랙트로 구현될 수 있다. 암호화폐 교환, 예치, 인출을 위한 트랜잭션은 스마트 컨트랙트인 DEX에 입력되어 스마트 컨트랙트의 상태를 변경시킬 수 있고, 이에 따라 변경된 상태인 잔고 정보가 스마트 컨트랙트에 저장될 수 있다.In the present disclosure, a smart contract can be viewed as an application running on a blockchain. The above-described transaction may serve as an input value for changing the state of the smart contract. Transactions of blocks on the above-described blockchain may change the state of the smart contract, and the smart contract may keep the latest state of the smart contract. For example, in the present disclosure, the aforementioned decentralized exchange DEX operating on a blockchain may be implemented as a smart contract. Transactions for cryptocurrency exchange, deposit, and withdrawal can be input to the smart contract, DEX, to change the state of the smart contract, and accordingly, the changed balance information can be stored in the smart contract.

본 개시에서 사용되는 블록체인은, 스마트 컨트랙트를 지원하는 어떤 블록체인이어도 무방하며, 예를 들어 이더리움과 같은 스마트 컨트랙트 지원 블록체인이 사용될 수 있다.The blockchain used in the present disclosure may be any blockchain that supports smart contracts, and for example, a smart contract-supporting blockchain such as Ethereum may be used.

본 개시에서, 트랜잭션(transaction)은 오더, 주문이라고 불릴 수도 있다. 트랜잭션은 예를 들어 "사용자 클라이언트(3a)가 사용자 클라이언트(3b)에게 소정의 암호화폐를 소정의 수량만큼 보낸다"등과 같이 암호화폐 송금, 교환 등의 내용을 하나의 문자열로 나타낸 것일 수 있다. 트랜잭션의 구체적인 내용에 대해서는 후술한다.In the present disclosure, a transaction may be referred to as an order or order. The transaction may be, for example, "user client 3a sends a predetermined amount of cryptocurrency to user client 3b", such as cryptocurrency remittance, exchange, etc., as one string. The details of the transaction will be described later.

도 1에 있어서, 블록체인의 사용자 클라이언트(3a, 3b) 각각은, 자신이 보유하고 있는 적어도 하나 이상의 타입의 암호화폐를 암호화폐 거래소인 DEX에 예치(deposit)할 수 있다. 도시된 바와 같이, 블록체인의 사용자 클라이언트(3a, 3b) 각각은, 보유하고 있는 암호화폐를 교환하기 위하여 트랜잭션(1000a, 1000b)을 발행할 수 있다. 트랜잭션은 소정의 암호화폐를 다른 암호화폐와 소정의 교환율로 교환하기 위한 주문(order)일 수 있다. 사용자 클라이언트(3a, 3b) 각각은 발행된 트랜잭션을 블록체인 상의 임의의 한 노드(2)로 전달할 수 있다.In Fig. 1, each of the user clients 3a and 3b of the blockchain can deposit at least one type of cryptocurrency owned by the blockchain to DEX, a cryptocurrency exchange. As shown, each of the user clients 3a, 3b of the blockchain can issue transactions 1000a, 1000b to exchange the cryptocurrency they hold. The transaction may be an order for exchanging a certain cryptocurrency with another cryptocurrency at a predetermined exchange rate. Each of the user clients 3a, 3b can deliver the issued transaction to any one node 2 on the blockchain.

트랜잭션을 전달받은 노드(2)는 트랜잭션을 블록체인 네트워크(4) 상의 복수의 노드(2)에 공유할 수 있다. 전달받은 트랜잭션들은 해당 블록체인의 블록에 저장될 수 있다. 본 실시예에서, 블록체인 상 블록들에 저장되는 복수의 트랜잭션들은, 암호화폐의 교환을 위한 오더 북(order book)의 역할을 할 수 있다. 즉, 도시된 실시예에서는 오더 북이 블록체인 상에 존재할 수 있다. 복수의 노드(2) 중 어느 하나의 노드(2)는 트랜잭션을 모아서 블록체인의 다음 블록을 생성하고, 생성된 블록을 복수의 노드(2)에 공유할 수 있다. 노드(2)가 트랜잭션을 수집하고 블록을 생성하는 방법은 공지된 블록체인의 블록 형성 방법을 따를 수 있다.The node 2 that received the transaction can share the transaction with a plurality of nodes 2 on the blockchain network 4. The received transactions can be stored in the block of the corresponding blockchain. In this embodiment, a plurality of transactions stored in blocks on the blockchain can serve as an order book for the exchange of cryptocurrency. That is, in the illustrated embodiment, the order book may exist on the blockchain. Any one of the plurality of nodes 2 may collect transactions to generate the next block of the blockchain, and share the generated block with the plurality of nodes 2. The method in which the node 2 collects the transaction and creates the block can follow the block formation method of a known blockchain.

본 개시에서, 오더 북은 트랜잭션 내지 주문을 나열한 기록으로서, 각 주체가 사거나 팔고자 하는, 즉 교환하고자 하는 디지털 자산(예: 암호화폐)의 가격과 수량을 리스팅한 것일 수 있다.In the present disclosure, the order book is a record listing transactions or orders, and may be a list of prices and quantities of digital assets (eg, cryptocurrency) that each subject wants to buy or sell, that is, to exchange.

도시된 실시예에서, DEX는 트랜잭션의 내용에 기초하여 매칭되는 트랜잭션을 결정할 수 있다. DEX에 의해 매칭된 트랜잭션의 내용에 따라, 암호화폐의 교환이 성립될 수 있다. 블록체인 네트워크(4) 상에서 동작하는 DEX, 즉 스마트 컨트랙트는, 암호화폐 교환에 따른 사용자 클라이언트의 잔고 변화를 업데이트하여 저장할 수 있다. 스마트 컨트랙트에 저장되는 잔고 정보는 암호화폐의 밸런스 북(balance book) 역할을 할 수 있다.In the illustrated embodiment, DEX may determine a matched transaction based on the content of the transaction. Depending on the content of the transaction matched by DEX, the exchange of cryptocurrencies can be established. The DEX operating on the blockchain network 4, that is, a smart contract, can update and store the change in the balance of the user client according to the exchange of cryptocurrency. The balance information stored in the smart contract may serve as a balance book for cryptocurrency.

이 후, 사용자 클라이언트(3a, 3b) 각각은, 필요에 따라 원하는 암호화폐를 DEX로부터 인출(withdrawal)할 수 있다. 이러한 인출은 스마트 컨트랙트에 저장된, 해당 사용자 클라이언트의 대상 암호화폐에 대한 잔고 정보에 기초하여 수행될 수 있다.Thereafter, each of the user clients 3a and 3b can withdrawal the desired cryptocurrency from DEX as needed. This withdrawal may be performed based on the balance information of the target cryptocurrency of the corresponding user client, stored in the smart contract.

도시된 실시예에서, DEX에 의한 트랜잭션 매칭은 그 처리가 다소 느릴 수 있다. DEX와 같이 블록체인 상에서 동작하는 암호화폐 거래소는, 거래소 해킹 등의 요인으로부터 비교적 자유로울 수 있다. 그러나, DEX에 의한 암호화폐 거래의 경우, 각 트랜잭션이 복수의 노드(2) 사이에 공유되며, 각 트랜잭션들을 이용해 블록체인의 새로운 블록을 생성해야 하는 등, 블록체인의 기본적 특성에 따라 트랜잭션 매칭 등의 연산이 느리게 수행될 수 있다. 이에 따라, 다수의 트랜잭션이 발생하게 되는 경우, 그 처리에 있어 병목현상이 발생할 수 있다.In the illustrated embodiment, transaction matching by DEX may be somewhat slow in processing. Cryptocurrency exchanges that operate on the blockchain, such as DEX, can be relatively free from factors such as exchange hacking. However, in the case of cryptocurrency transactions by DEX, each transaction is shared between a plurality of nodes (2), and a new block of the blockchain must be created using each transaction, such as matching transactions according to the basic characteristics of the blockchain. Can be performed slowly. Accordingly, when multiple transactions occur, a bottleneck may occur in the processing.

도 2는 본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정을 나타낸 도면이다. 본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정에서, DEX(2)에 더하여 CEX(1)가 추가로 사용될 수 있다. CEX(Centralized Exchange)는 중앙화된 거래소로서, 본 개시에서는 DEX를 보완하여 전술한 DEX의 역할 중 일부를 중앙화된 영역에서 수행할 수 있다. CEX는, DEX가 동작되는 블록체인 및 그 블록체인 네트워크(4)와는 분리된 영역, 예를 들어 일반적인 인터넷 네트워크 등에서 동작할 수 있다. 사용자 클라이언트(3a, 3b)는 각각 발행한 트랜잭션(1000a, 1000b)를 DEX가 아닌 CEX로 전달할 수 있다. CEX는 트랜잭션의 유효성을 검증하거나 트랜잭션 사이의 매칭을 수행하여, 매칭된 트랜잭션만을 블록체인의 한 노드(2a)로 전달할 수 있다.2 is a view showing a cryptocurrency exchange process according to various embodiments of the present disclosure. In a cryptocurrency exchange process according to various embodiments of the present disclosure, CEX(1) may be additionally used in addition to DEX(2). Centralized Exchange (CEX) is a centralized exchange, and in the present disclosure, DEX can be supplemented to perform some of the aforementioned DEX roles in a centralized area. The CEX may operate in a block where the DEX is operated and a separate area from the blockchain network 4, for example, a general Internet network. The user clients 3a and 3b may deliver the issued transactions 1000a and 1000b to CEX instead of DEX, respectively. CEX can verify the validity of a transaction or perform matching between transactions, so that only the matched transaction can be delivered to one node 2a of the blockchain.

구체적으로, 사용자 클라이언트(3a, 3b) 각각은 먼저 암호화폐를 DEX(5)에 예치할 수 있다. 예치 과정은 전술한 바와 같다. 사용자 클라이언트(3a, 3b) 각각은 보유한 암호화폐의 교환을 위한 트랜잭션(1000a, 1000b)을 발행할 수 있다. 사용자 클라이언트(3a, 3b) 각각은 트랜잭션(1000a, 1000b)을 블록체인 네트워크 외부(OFF Chain) 영역의 CEX(1)로 전달할 수 있다. 도시된 실시예에서, 두 사용자 클라이언트가 두 개의 트랜잭션을 CEX(1)로 전달하는 것으로 나타내어졌지만, 이는 설명을 위한 것이며, 복수의 사용자 클라이언트가 복수의 트랜잭션을 발행해 CEX(1)로 전달할 수 있다.Specifically, each of the user clients 3a and 3b may first deposit the cryptocurrency in the DEX 5. The deposit process is as described above. Each of the user clients 3a, 3b may issue transactions 1000a, 1000b for the exchange of the cryptocurrency possessed. Each of the user clients 3a and 3b may transfer the transactions 1000a and 1000b to the CEX 1 in the OFF chain area of the blockchain network. In the illustrated embodiment, two user clients are shown passing two transactions to CEX(1), but this is for illustration purposes, and multiple user clients can issue multiple transactions to deliver to CEX(1). .

CEX(1)는 전달받은 트랜잭션(1000a, 1000b)을 DEX를 대신하여 처리할 수 있다. 일 실시예에서, CEX(1)는 전달받은 트랜잭션(1000a, 1000b)이 각각 사용자 클라이언트(3a, 3b)로부터 유래된 것인지를, 트랜잭션의 디지털 서명을 복호화하여 확인할 수 있다.The CEX 1 can process the received transactions 1000a and 1000b on behalf of DEX. In one embodiment, the CEX 1 may verify whether the received transactions 1000a and 1000b are derived from the user clients 3a and 3b, respectively, by decrypting the digital signature of the transaction.

본 개시에서, 디지털 서명은 개인키, 공개키를 이용한 암호화 방법을 통해, 특정 데이터가 어느 주체로부터 유래된 것인지를 검증하기 위한 방법일 수 있다. 개인키를 이용해 암호화된 데이터는, 그 개인키와 쌍으로 존재하는 공개키를 이용해서만 복호화가 될 수 있다. 개인키는 공유되지 않고 해당 주체가 보유하고 있는 암호키이며, 공개키는 공유되어 누구나 확인할 수 있는 암호키일 수 있다. 공개키는 해당 주체의 주소 역할을 할 수 있다. 예를 들어 본 개시에서 트랜잭션이 디지털 서명되어 전송되었다는 것은, 트랜잭션에 해쉬 함수를 적용하여 얻은 해쉬 값을 개인키로 암호화하여 디지털 서명을 생성한 후, 디지털 서명을 그 트랜잭션 원본에 붙여 전송되었다는 것을 의미할 수 있다. 수신측(예: CEX(1))에서는 디지털 서명을 공개키로 복호화하여 해쉬 값을 얻고, 그 트랜잭션 원본에 다시 해쉬 함수를 적용하여 얻은 해쉬 값과 비교할 수 있다. 비교된 해쉬 값이 같으면, 디지털 서명된 트랜잭션은 그 개인키를 가지고 있는 주체로부터 유래된 것이 맞다고 확인될 수 있다.In the present disclosure, the digital signature may be a method for verifying from which subject the specific data is derived through an encryption method using a private key and a public key. Data encrypted using the private key can only be decrypted using the public key that exists in pair with the private key. The private key is not shared and is the encryption key held by the subject, and the public key is shared and may be an encryption key that anyone can check. The public key can serve as the address of the subject. For example, in the present disclosure, that a transaction is digitally signed and transmitted means that a hash value obtained by applying a hash function to the transaction is encrypted with a private key to generate a digital signature, and then a digital signature is transmitted by attaching it to the original transaction. Can be. On the receiving side (eg, CEX(1)), the digital signature can be decrypted with a public key to obtain a hash value, and compared to the hash value obtained by applying the hash function to the original transaction. If the compared hash values are the same, it can be verified that the digitally signed transaction is derived from the subject holding the private key.

본 개시에서, 해쉬 값은 원본 데이터에 대한 고정된 길이의 요약본(fixed length value)일 수 있다. 원본 데이터에 해쉬 함수를 적용하여 얻을 수 있다. 일반적으로 해쉬 함수를 통해 원본 데이터의 해쉬 값을 얻는 것은 쉬우나, 거꾸로 해쉬 값으로부터 원본 데이터를 찾아내는 것은 극히 어렵다. 또한, 원본 데이터가 조금만 변경되어도 전혀 다른 해쉬 값이 나오기 때문에, 전술한 바와 같은 디지털 서명을 통한 발송주체 확인에서 쓰일 수 있다.In this disclosure, the hash value can be a fixed length value for the original data. It can be obtained by applying a hash function to the original data. In general, it is easy to obtain the hash value of the original data through the hash function, but it is extremely difficult to find the original data from the inverted hash value. In addition, since the hash value is completely different even if the original data is slightly changed, it can be used in the verification of the sender through the digital signature as described above.

본 개시의 일 실시예에서, CEX(1)는 전달받은 트랜잭션(1000a, 1000b)의 암호화폐 교환 요청이 유효한 것인지를, DEX(5)에 저장된 잔고 정보에 기초하여 판단할 수 있다. 예를 들어, 트랜잭션(1000a)이 제1 암호화폐(예: 비트코인) 5개를 제2 암호화폐(예: 이더리움) 1개와 교환하기 위한 주문인 경우, CEX(1)는 사용자 클라이언트(3a)가 비트코인 5개를 가지고 있는지를 잔고 정보에 기초하여 확인할 수 있다. 일 실시예에서, CEX(1)는 전달받은 트랜잭션(1000a, 1000b)이 그 만료시간을 도과하여 무효인 트랜잭션인지 여부를 확인할 수도 있다. 일 실시예에서, CEX(1)는, 소정의 빈도 수 이상으로 트랜잭션을 남발하는 사용자 클라이언트를 트랜잭션 스패밍(transaction spamming)으로 판단하고, 소정의 필터링 정책을 적용하여, 해당 사용자 클라이언트로부터의 트랜잭션을 매칭에서 배제할 수도 있다.In one embodiment of the present disclosure, the CEX 1 may determine whether the cryptocurrency exchange request of the received transactions 1000a and 1000b is valid based on the balance information stored in the DEX 5. For example, if the transaction 1000a is an order for exchanging 5 first cryptocurrencies (e.g. Bitcoin) with 1 second cryptocurrency (e.g. Ethereum), CEX(1) is the user client 3a ) Can check whether it has 5 bitcoins based on the balance information. In one embodiment, the CEX 1 may check whether the received transactions 1000a and 1000b are invalid transactions by passing the expiration time. In one embodiment, CEX(1) determines a user client that is incurring a transaction more than a predetermined frequency as transaction spamming, and applies a predetermined filtering policy to match a transaction from the user client It can be excluded from.

CEX(1)는 복수의 사용자 클라이언트로부터 전달받은 복수의 트랜잭션 중에서, 소정의 기준에 따라 적어도 두 개의 트랜잭션을 매칭할 수 있다. 트랜잭션의 매칭은 트랜잭션의 내용에 기초하여 다양한 방법으로 수행될 수 있다. 도시된 실시예에서, CEX(1)는 소정의 기준에 충족하는 경우, 트랜잭션(1000a) 및 트랜잭션(1000b)를 매칭할 수 있다. 매칭된 두 트랜잭션은 매칭된 트랜잭션(2000)과 같이 표현할 수 있다. CEX(1)는 매칭된 트랜잭션(2000)을 블록체인의 한 노드(2a)로 전달할 수 있다. 이 노드(2a)는, 블록체인 네트워크(4) 상에 존재하고, DEX(5) 동작의 실질적인 연산을 수행하는 복수의 노드(2) 중 임의의 한 노드일 수 있다. CEX(1)와 블록체인 네트워크(4)의 연결성 및 CEX(1)의 구현 방식에 따라, CEX(1)는 하나 이상의 노드(2)로 트랜잭션을 전달할 수 있다. 본 개시의 일 실시예에서, CEX(1)는 전자 장치(10)로 구현될 수 있다. 전자 장치(10)에 대해서는 후술한다.The CEX 1 may match at least two transactions according to a predetermined criterion among a plurality of transactions received from a plurality of user clients. Transaction matching can be performed in various ways based on the content of the transaction. In the illustrated embodiment, the CEX 1 may match the transaction 1000a and the transaction 1000b when the predetermined criteria are satisfied. The matched two transactions can be expressed as the matched transaction 2000. The CEX 1 can deliver the matched transaction 2000 to one node 2a of the blockchain. This node 2a may be any one of a plurality of nodes 2 that exist on the blockchain network 4 and perform substantial operations of the DEX 5 operation. Depending on the connectivity of the CEX(1) and the blockchain network (4) and the implementation method of the CEX(1), the CEX(1) can deliver a transaction to one or more nodes (2). In one embodiment of the present disclosure, CEX 1 may be implemented as electronic device 10. The electronic device 10 will be described later.

노드(2a)는 전달받은 매칭된 트랜잭션(2000)을 블록체인 네트워크(4) 상의 복수의 노드(2)에 공유할 수 있다. 블록체인 네트워크(4) 상의 복수의 노드(2) 중 임의의 어느 한 노드(2b)는 매칭된 트랜잭션(2000)이 포함된 블록체인의 블록을, 해당 블록체인의 소정의 기준에 따라 생성할 수 있다. 생성된 블록은 블록체인을 통하여 복수의 노드(2) 사이에 공유되고, 블록 내 트랜잭션들의 내용에 따라 DEX의 잔고 정보가 갱신될 수 있다.The node 2a can share the received matched transaction 2000 to a plurality of nodes 2 on the blockchain network 4. Any one node 2b of the plurality of nodes 2 on the blockchain network 4 can generate a block of the blockchain including the matched transaction 2000, according to a predetermined standard of the blockchain. have. The generated block is shared between a plurality of nodes 2 through the blockchain, and the balance information of DEX can be updated according to the contents of transactions in the block.

이 후, 사용자 클라이언트(3a, 3b) 각각은, 갱신된 잔고 정보에 기초하여, 원하는 암호화폐를 DEX로부터 인출(withdrawal)할 수 있다. 인출 과정은 전술한 바와 같다.Thereafter, each of the user clients 3a and 3b can withdrawal the desired cryptocurrency from the DEX based on the updated balance information. The withdrawal process is as described above.

본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정은, DEX만을 이용한 암호화폐 교환 과정에 비하여, 트랜잭션 처리 속도가 더 빠를 수 있다.The cryptocurrency exchange process according to various embodiments of the present disclosure may have a faster transaction processing speed compared to a cryptocurrency exchange process using only DEX.

본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정은, DEX만을 이용한 암호화폐 교환 과정에 비하여, 다량의 트랜잭션이 발생하는 상황에서 처리 정체(congestion)을 막을 수 있다.The cryptocurrency exchange process according to various embodiments of the present disclosure can prevent processing congestion in a situation in which a large amount of transactions occur, compared to a cryptocurrency exchange process using only DEX.

본 개시의 다양한 실시예들에 따른 암호화폐 교환 과정은, DEX만을 이용한 암호화폐 교환 과정과 달리, 트랜잭션을 전송하는 특정 사용자 클라이언트에 대한 일종의 필터링(filtering) 정책의 적용이 가능할 수 있다.In the cryptocurrency exchange process according to various embodiments of the present disclosure, unlike a cryptocurrency exchange process using only DEX, it may be possible to apply a kind of filtering policy to a specific user client transmitting a transaction.

도 3은 본 개시의 다양한 실시예들에 따른 전자 장치(10)의 블록도를 나타낸 도면이다. 본 개시에서 상술한 CEX(1)는 도시된 전자 장치(10)로 구현될 수 있다. 일 실시예에 따르면, 전자 장치(10)는 통신 인터페이스(130), 메모리(120) 및/또는 프로세서(110)를 포함할 수 있다. 일 실시예에서는, 전자 장치(10)의 이 구성요소들 중 적어도 하나가 생략되거나, 다른 구성요소가 전자 장치(10)에 추가될 수 있다. 추가적으로(additionally) 또는 대체적으로(alternatively), 일부의 구성요소들이 통합되어 구현되거나, 단수 또는 복수의 개체로 구현될 수 있다.3 is a block diagram of an electronic device 10 according to various embodiments of the present disclosure. The CEX 1 described above in the present disclosure may be implemented with the illustrated electronic device 10. According to an embodiment, the electronic device 10 may include a communication interface 130, a memory 120 and/or a processor 110. In one embodiment, at least one of these components of the electronic device 10 may be omitted, or another component may be added to the electronic device 10. Additionally, alternatively or alternatively, some of the components may be integrally implemented or may be implemented as singular or plural entities.

전자 장치(10) 내, 외부의 구성요소들 중 적어도 일부의 구성요소들은 버스, GPIO(general purpose input/output), SPI(serial peripheral interface) 또는 MIPI(mobile industry processor interface) 등을 통해 서로 연결되어, 데이터 및/또는 시그널을 주고 받을 수 있다.At least some of the components inside and outside the electronic device 10 are connected to each other through a bus, general purpose input/output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI). , Data and/or signals.

통신 인터페이스(130)는, 전자 장치(10)와 다른 외부 전자 장치(20, 30) 또는 전자 장치(10)와 기타 서버 등 간의 무선 또는 유선 통신을 수행할 수 있다. 예를 들어, 통신 인터페이스(130)는 LTE(long-term evolution), LTE-A(LTE Advance), CDMA(code division multiple access), WCDMA(wideband CDMA), WiBro(Wireless BroaDBand), WiFi(wireless fidelity), 블루투스(Bluetooth), NFC(near field communication), GPS(Global Positioning System) 또는 GNSS(global navigation satellite system) 등의 방식에 따른 무선 통신을 수행할 수 있다. 예를 들어, 통신 인터페이스(130)는 USB(universal serial bus), HDMI(high definition multimedia interface), RS-232(recommended standard232) 또는 POTS(plain old telephone service) 등의 방식에 따른 유선 통신을 수행할 수 있다.The communication interface 130 may perform wireless or wired communication between the electronic device 10 and other external electronic devices 20 and 30 or the electronic device 10 and other servers. For example, the communication interface 130 includes long-term evolution (LTE), LTE Advance (LTE-A), code division multiple access (CDMA), wideband CDMA (WCDMA), wireless broaDBand (WiBro), and wireless fidelity (WiFi). ), Bluetooth, Bluetooth (near field communication), GPS (Global Positioning System) or GNSS (global navigation satellite system). For example, the communication interface 130 performs wired communication according to a scheme such as universal serial bus (USB), high definition multimedia interface (HDMI), recommended standard232 (RS-232), or plain old telephone service (POTS). Can be.

통신 인터페이스(130)는, 복수의 사용자 클라이언트(3)와 통신을 수행할 수 있다. 복수의 사용자 클라이언트(3)와의 통신은 블록 체인 네트워크(4)와는 구별되는, 블록 체인 네트워크(4) 밖(OFF Chain)에서의 일반적인 통신 네트워크를 통해 수행될 수 있다. 즉, CEX(1)에 해당하는 전자 장치(10) 및 사용자 클라이언트(3)는 블록체인의 노드가 아니므로, 이들 사이의 통신은 블록 체인 네트워크(4)와는 무관하게 수행될 수 있다.The communication interface 130 may communicate with a plurality of user clients 3. Communication with the plurality of user clients 3 may be performed through a general communication network outside the blockchain network 4 (OFF Chain), which is distinct from the blockchain network 4. That is, since the electronic device 10 and the user client 3 corresponding to the CEX 1 are not nodes of the blockchain, communication between them can be performed independently of the blockchain network 4.

또한 통신 인터페이스(130)는, 블록 체인 기반의 블록 체인 네트워크(4) 상의 하나 이상의 노드(node)와 통신을 수행할 수 있다. 전술한 바와 같이, 하나 이상의 노드(2)는, 블록체인 상에서, 암호화폐 교환을 위한 스마트 컨트랙트(smart contract), 즉 DEX(5)를 실행할 수 있다.Also, the communication interface 130 may communicate with one or more nodes on the blockchain-based blockchain network 4. As described above, the one or more nodes 2 may execute a smart contract, i.e., DEX 5, for cryptocurrency exchange on the blockchain.

메모리(120)는, 다양한 데이터를 저장할 수 있다. 메모리(120)에 저장되는 데이터는, 전자 장치(10)의 적어도 하나의 구성요소에 의해 획득되거나, 처리되거나, 사용되는 데이터로서, 소프트웨어(예: 프로그램)를 포함할 수 있다. 메모리(120)는, 휘발성 및/또는 비휘발성 메모리를 포함할 수 있다.The memory 120 can store various data. The data stored in the memory 120 may include software (eg, a program) as data acquired, processed, or used by at least one component of the electronic device 10. The memory 120 may include volatile and/or nonvolatile memory.

본 개시에서, 프로그램은 메모리(120)에 저장되는 소프트웨어로서, 전자 장치(10)의 리소스를 제어하기 위한 운영체제, 어플리케이션 및/또는 어플리케이션이 전자 장치(10)의 리소스들을 활용할 수 있도록 다양한 기능을 어플리케이션에 제공하는 미들 웨어 등을 포함할 수 있다.In the present disclosure, the program is software stored in the memory 120, and various functions are applied so that an operating system, an application, and/or an application for controlling the resources of the electronic device 10 can utilize the resources of the electronic device 10. It may include middleware to provide.

메모리(120)는 하나 이상의 트랜잭션을 저장할 수 있다. 이 트랜잭션은 복수의 사용자 클라이언트(3)로부터 수신된 것일 수 있다. 여기서 트랜잭션은 복수의 암호화폐 중, 적어도 두 개의 암호화폐를 소정의 교환율로 교환하기 위한 트랜잭션일 수 있다.The memory 120 can store one or more transactions. This transaction may have been received from a plurality of user clients 3. Here, the transaction may be a transaction for exchanging at least two cryptocurrencies among a plurality of cryptocurrencies at a predetermined exchange rate.

프로세서(110)는, 소프트웨어(예: 프로그램)를 구동하여 프로세서(110)에 연결된 전자 장치(10)의 적어도 하나의 구성요소를 제어할 수 있다. 또한 프로세서(110)는 본 개시와 관련된 다양한 연산, 처리, 데이터 생성, 가공 등의 동작을 수행할 수 있다. 또한 프로세서(110)는 데이터 등을 메모리(120)로부터 로드하거나, 메모리(120)에 저장할 수 있다.The processor 110 may control at least one component of the electronic device 10 connected to the processor 110 by driving software (eg, a program). In addition, the processor 110 may perform various operations related to the present disclosure, such as processing, data generation, and processing. Also, the processor 110 may load data or the like from the memory 120 or store the data in the memory 120.

프로세서(110)는 블록체인 네트워크(4) 밖에서(OFF Chain), 트랜잭션을 수집할 수 있다. 즉, 프로세서(110)는, 통신 인터페이스(130)를 통해 복수의 사용자 클라이언트(3)로부터 트랜잭션을 수신할 수 있다. 트랜잭션은 해당 트랜잭션을 전송한 클라이언트의 개인키로 디지털 서명되었을 수 있다. 트랜잭션은 소정의 암호화폐를 소정의 교환율로 다른 암호화폐와 교환하기 위한 트랜잭션일 수 있다. 예를 들어, 프로세서(110)는 통신 인터페이스(130)를 통해, 복수의 사용자 클라이언트(3) 중 한 사용자 클라이언트(예: 제1 클라이언트)(3a)로부터, 해당 사용자 클라이언트의 개인키(예: 제1 개인키)로 디지털 서명되고, 한 암호화폐(예: 제1 암호화폐)를 다른 암호화폐(예: 제2 암호화폐)와 소정의 교환율(예: 제1 교환율)로 교환하기 위한 트랜잭션(예: 제1 트랜잭션)을 수신할 수 있다. 또한, 프로세서(110)는 통신 인터페이스(130)를 통해, 복수의 사용자 클라이언트(3) 중 한 사용자 클라이언트(예: 제2 클라이언트)(3b)로부터, 해당 사용자 클라이언트의 개인키(예: 제2 개인키)로 디지털 서명되고, 한 암호화폐(예: 제2 암호화폐)를 다른 암호화폐(예: 제1 암호화폐)와 소정의 교환율(예: 제2 교환율)로 교환하기 위한 트랜잭션(예: 제2 트랜잭션)을 수신할 수 있다.The processor 110 may collect transactions outside the blockchain network 4 (OFF Chain). That is, the processor 110 may receive a transaction from a plurality of user clients 3 through the communication interface 130. The transaction may have been digitally signed with the private key of the client sending the transaction. The transaction may be a transaction for exchanging a certain cryptocurrency with another cryptocurrency at a predetermined exchange rate. For example, the processor 110, through the communication interface 130, from a user client (for example, a first client) 3a of a plurality of user clients 3, the private key of the user client (for example, 1 Private key) is digitally signed, and a transaction for exchanging one cryptocurrency (e.g., first cryptocurrency) with another cryptocurrency (e.g., second cryptocurrency) at a predetermined exchange rate (e.g., first exchange rate) (E.g., the first transaction). In addition, the processor 110, through the communication interface 130, from a user client (for example, a second client) 3b of a plurality of user clients 3, the private key of the user client (eg, a second individual) Key), a transaction for exchanging one cryptocurrency (e.g., the second cryptocurrency) with another cryptocurrency (e.g., the first cryptocurrency) at a predetermined exchange rate (e.g., a second exchange rate) : Second transaction).

프로세서(110)는, 블록체인 네트워크(4) 밖에서(OFF Chain), 트랜잭션의 유효성을 다양한 방식으로 검증할 수 있다. 프로세서(110)는 트랜잭션의 유효성을, 그 디지털 서명, 사용자 클라이언트의 잔고 정보, 트랜잭션의 만료 시간 등의 정보에 기초하여 검증할 수 있다. 일 실시예에서, 프로세서(110)는, 해당 사용자 클라이언트의 개인키(예: 제1 개인키, 제2 개인키)에 각각 대응되는 공개키(예: 제1 공개키, 제2 공개키)에 기초하여, 해당 트랜잭션들 각각의 디지털 서명을 검증할 수 있다. 일 실시예에서, 프로세서(110)는, 트랜잭션을 발행한 사용자 클라이언트의 잔고(balance) 정보에 기초하여 해당 트랜잭션이 유효한지 여부를 검증할 수 있다. 즉, 프로세서(110)는, 소정의 트랜잭션(예: 제1 트랜잭션)에서 사용자 클라이언트(예: 제1 클라이언트)가 교환을 원하는 암호화폐(예: 제1 암호화폐)의 잔고가, 해당 사용자 클라이언트(예: 제1 클라이언트)의 잔고 정보에 비추어 적정한지를 결정할 수 있다. 예를 들어, 비트코인 5개를 이더리움 1개와 교환하기 위한 트랜잭션의 경우, 프로세서(110)는 해당 사용자 클라이언트가 실제로 비트코인 5개를 가지고 있는지를 확인하여, 트랜잭션의 유효성을 검증할 수 있다. 해당 사용자 클라이언트의 잔고는, 블록체인 네트워크(4) 상의 스마트 컨트랙트에 저장된 잔고 정보로부터 획득할 수 있다. 프로세서(110)는 다른 트랜잭션들(예: 제2 트랜잭션)에 대해서도 마찬가지로 잔고 정보에 기초한 유효성 검증을 수행할 수 있다.The processor 110 may verify the validity of the transaction in various ways outside the blockchain network 4 (OFF Chain). The processor 110 may verify the validity of the transaction based on information such as the digital signature, balance information of the user client, and expiration time of the transaction. In one embodiment, the processor 110 is assigned to a public key (eg, a first public key, a second public key) corresponding to a private key (eg, a first private key and a second private key) of the corresponding user client, respectively. Based on this, the digital signature of each of the corresponding transactions can be verified. In one embodiment, the processor 110 may verify whether the corresponding transaction is valid based on balance information of the user client that issued the transaction. That is, the processor 110, the balance of the cryptocurrency (eg, the first cryptocurrency) that the user client (eg, the first client) wants to exchange in a given transaction (eg, the first transaction) is the corresponding user client ( Example: In view of the balance information of the first client), it is possible to determine whether it is appropriate. For example, in the case of a transaction for exchanging 5 Bitcoins with 1 Ethereum, the processor 110 may verify whether the corresponding user client actually has 5 Bitcoins, thereby validating the transaction. The balance of the corresponding user client can be obtained from the balance information stored in the smart contract on the blockchain network 4. The processor 110 may also perform validation based on the balance information for other transactions (eg, the second transaction).

프로세서(110)는, 블록체인 네트워크(4) 밖에서(OFF Chain), 트랜잭션들을 각각의 교환율에 기초하여 매칭(matching)할 수 있다. 프로세서(110)는 수신한 복수의 트랜잭션 중, 소정의 기준에 따라 매칭되는 트랜잭션을 찾아 두 트랜잭션(예: 제1 트랜잭션 및 제2 트랜잭션)을 매칭할 수 있다. 일 실시예에서, 매칭은 각 트랜잭션의 교환율에 기초하여 수행될 수 있으며, 구체적인 매칭 과정은 후술한다.The processor 110 may match transactions outside the blockchain network 4 (OFF Chain) based on each exchange rate. The processor 110 may match two transactions (eg, the first transaction and the second transaction) by searching for a matching transaction according to a predetermined criterion among the plurality of received transactions. In one embodiment, matching may be performed based on the exchange rate of each transaction, and a specific matching process will be described later.

프로세서(110)는, 통신 인터페이스(130)를 제어하여, 매칭된 트랜잭션(예: 제1 트랜잭션 및 제2 트랜잭션)을 블록체인 네트워크(4) 상의 하나 이상의 노드(2a)로 전달할 수 있다.The processor 110 may control the communication interface 130 to deliver matched transactions (eg, first and second transactions) to one or more nodes 2a on the blockchain network 4.

본 개시에 따른 전자 장치(10)의 다양한 실시예들은 서로 조합될 수 있다. 각 실시예들은 경우의 수에 따라 조합될 수 있으며, 조합되어 만들어진 전자 장치(10)의 실시예 역시 본 개시의 범위에 속한다. 또한 전술한 본 개시에 따른 전자 장치(10)의 내/외부 구성 요소들은 실시예에 따라 추가, 변경, 대체 또는 삭제될 수 있다. 또한 전술한 전자 장치(10)의 내/외부 구성 요소들은 하드웨어 컴포넌트로 구현될 수 있다.Various embodiments of the electronic device 10 according to the present disclosure may be combined with each other. Each of the embodiments can be combined according to the number of cases, and embodiments of the electronic device 10 made in combination are also within the scope of the present disclosure. In addition, internal/external components of the electronic device 10 according to the present disclosure described above may be added, changed, replaced, or deleted according to embodiments. In addition, the internal/external components of the above-described electronic device 10 may be implemented as hardware components.

일 실시예에서, CEX(1)는 하나의 전자 장치(10)가 아닌 다른 형태로 구현될 수도 있다. 일 실시예에서, CEX(1)는 전술한 블록체인 네트워크(4)의 블록체인이 아닌 별도의 블록체인 상에서 동작하는 또 다른 스마트 컨트랙트로 구현될 수도 있다. 이 경우, 그 별도의 블록체인 상의 한 노드는 전술한 전자 장치(10)에 의해 구현될 수 있고, 전술한 전자 장치(10)의 실시예들을 수행할 수 있다. 일 실시예에서, 그 별도의 블록체인은 프라이빗 체인(private chain)일 수 있다. 프라이빗 체인은, 불특정 다수가 노드가 될 수 있는 일반적인 블록체인과는 달리, 소정의 조건을 만족하는 엔티티(entity)만이 노드가 될 수 있는 블록체인을 의미할 수 있다.In one embodiment, the CEX 1 may be implemented in a form other than one electronic device 10. In one embodiment, CEX (1) may be implemented as another smart contract that operates on a separate blockchain than the blockchain of the above-described blockchain network (4). In this case, one node on the separate blockchain may be implemented by the above-described electronic device 10, and may perform embodiments of the above-described electronic device 10. In one embodiment, the separate blockchain may be a private chain. The private chain may mean a blockchain in which only an entity that satisfies a predetermined condition can become a node, unlike a general blockchain in which an unspecified number of nodes can be nodes.

일 실시예에서, 전술한 노드(2)는 전자 장치(20)에 의해 구현될 수 있다. 전자 장치(20) 역시 CEX(1), 다른 노드들(2), 사용자 클라이언트(3)와 통신하기 위한 통신 인터페이스, 필요한 정보를 저장하는 메모리 및/또는 다양한 연산을 수행하는 프로세서를 포함할 수 있다. 전자 장치(20)의 메모리는 DEX(5)를 구현하기 위한 스마트 컨트랙트를 저장할 수 있다. 스마트 컨트랙트는 복수의 명령어를 포함하는 일련의 프로그램 내지는 애플리케이션일 수 있다. 스마트 컨트랙트에 포함된 명령어가 전자 장치(20)의 프로세서에 의해 실행됨으로써, 본 개시에 따른 DEX(5)의 동작이 수행될 수 있다.In one embodiment, the node 2 described above may be implemented by the electronic device 20. The electronic device 20 may also include a CEX 1, other nodes 2, a communication interface for communicating with the user client 3, a memory for storing necessary information, and/or a processor for performing various operations. . The memory of the electronic device 20 may store a smart contract for implementing the DEX 5. The smart contract may be a series of programs or applications including a plurality of instructions. By executing the instructions included in the smart contract by the processor of the electronic device 20, the operation of the DEX 5 according to the present disclosure can be performed.

일 실시예에서, 전술한 사용자 클라이언트(3)는 전자 장치(30)에 의해 구현될 수 있다. 전자 장치(30) 역시 CEX(1), 노드들(2), 다른 사용자 클라이언트(3)와 통신하기 위한 통신 인터페이스, 필요한 정보를 저장하는 메모리 및/또는 다양한 연산을 수행하는 프로세서를 포함할 수 있다.In one embodiment, the user client 3 described above may be implemented by the electronic device 30. The electronic device 30 may also include a CEX 1, nodes 2, a communication interface for communicating with other user clients 3, a memory for storing necessary information, and/or a processor for performing various operations. .

본 개시에서, 전자 장치(10, 20, 30)는 다양한 형태의 장치가 될 수 있다. 예를 들어, 전자 장치는 휴대용 통신 장치, 컴퓨터 장치, 휴대용 멀티미디어 장치, 웨어러블 장치 또는 상술한 장치들 중 하나 또는 그 이상의 조합에 따른 장치일 수 있다. 본 개시의 전자 장치(10, 20, 30)는 전술한 장치들에 한정되지 않는다.In the present disclosure, the electronic devices 10, 20, and 30 may be various types of devices. For example, the electronic device may be a portable communication device, a computer device, a portable multimedia device, a wearable device, or a device according to one or more combinations of the aforementioned devices. The electronic devices 10, 20, and 30 of the present disclosure are not limited to the aforementioned devices.

도 4는 본 개시의 일 실시예에 따른, CEX, 노드, 사용자 클라이언트가 암호화폐 교환을 위한 트랜잭션을 처리하는 순서를 도식화한 도면이다. 여기서 노드(2)는, 블록체인의 복수의 노드(2) 중 임의의 어느 한 노드를 의미할 수 있다. 각 동작들이 수행됨에 있어, 각 동작의 주체 또는 객체로서 등장하는 노드(2)는 각각 다른 노드일 수 있다.4 is a diagram illustrating a sequence in which a CEX, a node, and a user client process a transaction for cryptocurrency exchange according to an embodiment of the present disclosure. Here, the node 2 may mean any one of a plurality of nodes 2 of the blockchain. As each operation is performed, the node 2 appearing as the subject or object of each operation may be a different node.

사용자 클라이언트(3a) 및 사용자 클라이언트(3b)는 소정의 암호화폐를 소정의 수량만큼 DEX(5)에 예치할 수 있다(S4010, S4020). 이와 같이 예치하기 위하여, 사용자 클라이언트는 DEX가 실행되는 블록체인의 적어도 하나의 노드(2)에, 소정 수량의 암호화폐를 보낼 수 있다. DEX는 사용자 클라이언트의 지갑과 같은 역할을 수행하여, 수신된 암호화폐를 보관할 수 있다. 스마트 컨트랙트인 DEX의 지갑으로 전달된 암호화페에 대한 정보는, 블록체인 상의 다른 노드(2)들에 의해 확인될 수 있다.The user client 3a and the user client 3b may deposit a predetermined amount of cryptocurrency in the DEX 5 in a predetermined quantity (S4010, S4020). To deposit in this way, the user client can send a predetermined amount of cryptocurrency to at least one node 2 of the blockchain on which DEX is executed. DEX acts as the wallet of a user client and can store the received cryptocurrency. Information about the cryptocurrency delivered to the wallet of DEX, a smart contract, can be confirmed by other nodes 2 on the blockchain.

이 후, 사용자 클라이언트(3a) 및 사용자 클라이언트(3b)는 각각 트랜잭션(1000a) 및 트랜잭션(1000b)를 CEX(1) 내지 전자 장치(10)로 전송할 수 있다(S4030, S4040). 트랜잭션(1000a)는 제1 암호화폐를 제2 암호화폐와 교환하기 위한 주문일 수 있다. 트랜잭션(1000b)는 제2 암호화폐를 제1 암호화폐와 교환하기 위한 주문일 수 있다.Thereafter, the user client 3a and the user client 3b may transmit the transaction 1000a and the transaction 1000b to the CEX 1 to the electronic device 10 (S4030, S4040), respectively. The transaction 1000a may be an order for exchanging a first cryptocurrency with a second cryptocurrency. The transaction 1000b may be an order for exchanging the second cryptocurrency with the first cryptocurrency.

CEX(1) 내지 전자 장치(10)는, 유효성 검증을 수행할 수 있다(S4050). 전술한 바와 같이, CEX(1)는 디지털 서명, 잔고 정보 및/또는 만료시간에 기초하여 트랜잭션이 유효한지 여부를 검증할 수 있다.The CEX 1 to the electronic device 10 may perform validation (S4050). As described above, the CEX 1 can verify whether the transaction is valid based on the digital signature, balance information, and/or expiration time.

먼저 CEX(1) 내지 전자 장치(10)는, 디지털 서명에 기초하여 트랜잭션이 유효한지 여부를 검증할 수 있다. CEX(1)는 수신된 트랜잭션(1000a)의 디지털 서명을, 해당 사용자 클라이언트(3a)의 공개키(예: 제1 공개키)로 복호화할 수 있다. 이에 따라 CEX(1)는 트랜잭션(1000a) 및 트랜잭션(1000a)의 복호화된 디지털 서명을 이용하여, 해당 트랜잭션(1000a)이 그 사용자 클라이언트(3a)로부터 유래한 것인지 여부를 검증할 수 있다. 트랜잭션(1000b)에 대해서도 마찬가지 검증이 수행될 수 있다.First, the CEX 1 to the electronic device 10 can verify whether a transaction is valid based on a digital signature. The CEX 1 may decrypt the received digital signature of the transaction 1000a with the public key (eg, the first public key) of the corresponding user client 3a. Accordingly, the CEX 1 can verify whether the transaction 1000a originates from the user client 3a using the transaction 1000a and the decrypted digital signature of the transaction 1000a. The same verification can be performed for the transaction 1000b.

구체적으로, 트랜잭션(1000a)은 해당 트랜잭션(1000a)의 해쉬 값을 해당 사용자 클라이언트(3a)의 개인키(예: 제1 개인키)로 서명한 디지털 서명과 함께 전자 장치(10)으로 전달될 수 있다. 전자 장치(10)의 프로세서(110)는, 수신된 트랜잭션(1000a)의 디지털 서명을, 해당 사용자 클라이언트(3a)의 공개키(예: 제1 공개키)로 복호화할 수 있다. 프로세서(110)는 그 디지털 서명을 복호화하여 얻은 해쉬 값과, 전달받은 트랜잭션(1000a)에 해쉬 함수를 적용하여 얻은 해쉬 값이 같은지를 판단할 수 있다. 두 값이 같은 경우, 해당 트랜잭션(1000a)은 그 공개키(예: 제1 공개키)에 해당하는 사용자 클라이언트(3a)로부터 유래한 것이라고 판단할 수 있다. 프로세서(110)는 다른 트랜잭션(1000b)에 대해서도 같은 방식으로 디지털 서명에 기초한 유효성 검증을 수행할 수 있다.Specifically, the transaction 1000a may be delivered to the electronic device 10 along with a digital signature signed with the private key (eg, the first private key) of the user client 3a for the hash value of the transaction 1000a. have. The processor 110 of the electronic device 10 may decrypt the digital signature of the received transaction 1000a with the public key (eg, the first public key) of the corresponding user client 3a. The processor 110 may determine whether the hash value obtained by decrypting the digital signature and the hash value obtained by applying a hash function to the received transaction 1000a are the same. When the two values are the same, it can be determined that the transaction 1000a originates from the user client 3a corresponding to the public key (eg, the first public key). The processor 110 may perform validation based on a digital signature in the same manner for other transactions 1000b.

일 실시예에서, 트랜잭션(1000a)은 해당 사용자 클라이언트(3a)로부터 전자 장치(10)로 직접 전달되는 것이 아니라, 다른 경로를 거쳐서 전달될 수도 있다. 이러한 경우에도, 전술한 바와 같이 디지털 서명을 이용하여, 그 트랜잭션(1000a)이 해당 사용자 클라이언트(3a)로부터 유래된 것인지를 판단할 수 있다.In one embodiment, the transaction 1000a is not directly transmitted from the corresponding user client 3a to the electronic device 10, but may be delivered through another path. Even in this case, as described above, it is possible to determine whether the transaction 1000a is derived from the corresponding user client 3a using the digital signature.

또한 CEX(1) 내지 전자 장치(10)는 블록체인 상의 임의의 한 노드(2)로 잔고 정보를 요청하여, 잔고 정보를 획득할 수 있다(S4051, S4052). CEX(1)는 사용자 클라이언트(3a)의 잔고 정보에 기초하여 사용자 클라이언트(3a)가 발행한 트랜잭션(1000a)가 유효한지, 또한 사용자 클라이언트(3b)의 잔고 정보에 기초하여 사용자 클라이언트(3b)가 발행한 트랜잭션(1000b)가 유효한지를 판단할 수 있다.In addition, the CEX 1 to the electronic device 10 may request the balance information to any one node 2 on the blockchain to obtain the balance information (S4051, S4052). CEX (1) is based on the balance information of the user client (3a) whether the transaction (1000a) issued by the user client (3a) is valid, and also based on the balance information of the user client (3b), the user client (3b) It is possible to determine whether the issued transaction 1000b is valid.

또한, CEX(1) 내지 전자 장치(10)는, 트랜잭션의 만료시간에 관한 정보를 이용하여 해당 트랜잭션이 유효한지 여부를 검증할 수 있다. CEX(1)는 만료시간에 대한 정보가 나타내는 해당 트랜잭션의 만료시간과 현재시간을 비교하여, 해당 트랜잭션의 유효성을 판단할 수 있다.In addition, the CEX 1 to the electronic device 10 may verify whether the corresponding transaction is valid using information on the expiration time of the transaction. CEX(1) may determine the validity of the transaction by comparing the current time and the expiration time of the corresponding transaction indicated by the information on the expiration time.

구체적으로, 트랜잭션(1000a, 1000b)은 각각 해당 트랜잭션이 나타내는 주문이 유효한 만료시간에 대한 정보를 가질 수 있다. 실시예에 따라 만료시간에 대한 정보는 타임스탬프 또는 블록 넘버 등과 같이 만료시간을 근사할 수 있는 값일 수 있다. 프로세서(110)는 해당 만료시간과 현재시간을 비교하여, 만료시간이 도과한 트랜잭션은 유효하지 않은 것으로 판단할 수 있다. 유효하지 않은 트랜잭션은 매칭에서 배제될 수 있다. 해당 트랜잭션의 만료시간이 도과되지 않았으면, 프로세서(110)는 해당 트랜잭션이 유효한 트랜잭션이라고 판단할 수 있다. Specifically, each of the transactions 1000a and 1000b may have information on an expiration time when the order indicated by the corresponding transaction is valid. According to an embodiment, the information on the expiration time may be a value that can approximate the expiration time, such as a time stamp or block number. The processor 110 may compare the corresponding expiration time with the current time, and determine that a transaction whose expiration time has elapsed is invalid. Invalid transactions may be excluded from matching. If the expiration time of the transaction has not been exceeded, the processor 110 may determine that the transaction is a valid transaction.

일 실시예에서, 프로세서(110)는 CEX(1) 자체에서 부과하는 필요사항(requirement)에 기초하여 트랜잭션이 유효한지 여부를 검증할 수도 있다. CEX(1)는 해당 암호화폐 거래소의 특성상 별도의 필요사항을 트랜잭션에 요구할 수 있다. 프로세서(110)는 그 필요사항에 대한 정보를 기반으로 각 트랜잭션이 그 필요사항을 준수하고 있는지 여부를 판단하고, 이에 따라 해당 트랜잭션이 유효한지 여부를 검증할 수 있다. 필요사항에 대한 정보는 메모리(120)에 저장될 수 있다.In one embodiment, the processor 110 may verify whether the transaction is valid based on a requirement imposed by the CEX 1 itself. CEX(1) may require separate requirements for transactions due to the nature of the cryptocurrency exchange. The processor 110 may determine whether each transaction complies with the requirement based on information on the need, and accordingly, may verify whether the corresponding transaction is valid. Information about the needs may be stored in the memory 120.

CEX(1) 내지 전자 장치(10)는, 트랜잭션의 교환율에 기초하여 소정의 기준을 만족하는 트랜잭션을 매칭할 수 있다(S4060). CEX(1)는 트랜잭션(1000a) 및 트랜잭션(1000b) 각각이 나타내는 교환율을 도출할 수 있다. CEX(1)는 트랜잭션(1000a)의 교환율과 트랜잭션(1000b)의 교환율이 소정의 조건을 만족하는 경우, 두 트랜잭션(1000a, 1000b)을 매칭할 수 있다.The CEX 1 to the electronic device 10 may match a transaction that satisfies a predetermined criterion based on the exchange rate of the transaction (S4060). The CEX 1 may derive an exchange rate represented by each of the transactions 1000a and 1000b. When the exchange rate of the transaction 1000a and the exchange rate of the transaction 1000b satisfy a predetermined condition, the CEX 1 may match the two transactions 1000a and 1000b.

CEX(1) 내지 전자 장치(10)는, 매칭된 트랜잭션(2000)을 임의의 한 노드(2)로 전달할 수 있다(S4070). 이 노드는, 전술한 잔고 정보를 획득한 노드와 같은 노드일 수도 있고, 다른 노드일 수 있다. 노드(2)는 전달받은 매칭된 트랜잭션(2000)을 기초로 블록체인의 블록을 생성할 수 있고, 이에 따라 상술한 바와 같이 잔고 정보가 갱신될 수 있다.The CEX 1 to the electronic device 10 may deliver the matched transaction 2000 to any one node 2 (S4070 ). This node may be the same node as the node that obtained the balance information described above, or may be another node. The node 2 may generate a block of the blockchain based on the matched transaction 2000 received, and thus the balance information may be updated as described above.

사용자 클라이언트(3a, 3b)는 필요에 따라, 자신의 잔고 정보에 기초하여, 자신이 보유한 소정 암호화폐의 소정 수량을 인출할 수 있다(S4080, S4090). 인출은 매칭된 트랜잭션에 따라 갱신된 잔고 정보에 기초하여 수행될 수 있다. 인출되는 암호화폐는 사용자 클라이언트의 공개키로서 나타나지는 해당 사용자 클라이언트의 주소로 인출될 수 있다.The user clients 3a, 3b may, if necessary, withdraw a predetermined quantity of a predetermined cryptocurrency possessed by the user based on his/her balance information (S4080, S4090). The withdrawal can be performed based on the updated balance information according to the matched transaction. The withdrawn cryptocurrency can be withdrawn to the address of the corresponding user client, which appears as the public key of the user client.

도 5는 본 개시의 일 실시예에 따른, 노드가 전달받은 매칭된 트랜잭션을 처리하는 과정을 나타낸 도면이다. 전술한 바와 같이, 매칭된 트랜잭션(2000)은 복수의 노드(2) 중 하나 이상의 노드로 전달될 수 있다. 설명의 편의를 위하여, 이하에서는 매칭된 트랜잭션(2000)이 노드(2a)로 전달된 것으로 가정한다. 노드(2a)로 전달된 매칭된 트랜잭션(2000)은, 블록 체인 네트워크(4) 상의 복수의 노드(2) 사이에 공유되고, 블록체인의 한 블록에 포함될 수 있다. 블록에 포함되게 된 매칭된 트랜잭션(2000)의 내용에 따라, 블록체인 상의 DEX에 저장된 잔고 정보가 갱신될 수 있다.5 is a diagram illustrating a process of processing a matched transaction received by a node according to an embodiment of the present disclosure. As described above, the matched transaction 2000 can be delivered to one or more of the plurality of nodes 2. For convenience of description, it is assumed below that the matched transaction 2000 is delivered to the node 2a. The matched transaction 2000 delivered to the node 2a is shared between a plurality of nodes 2 on the blockchain network 4 and may be included in one block of the blockchain. Depending on the contents of the matched transaction 2000 to be included in the block, the balance information stored in the DEX on the blockchain may be updated.

구체적으로, 노드(2a)는 전달받은 매칭된 트랜잭션(2000)을 블록체인 네트워크(4) 상의 복수의 노드(2)에 공유할 수 있다. 복수의 노드(2) 각각은 매칭된 트랜잭션(2000)을 비롯한 다른 트랜잭션들을 이용하여 블록체인의 다음 블록을 생성하기 위한 연산을 수행할 수 있다.Specifically, the node 2a can share the received matched transaction 2000 to a plurality of nodes 2 on the blockchain network 4. Each of the plurality of nodes 2 may perform an operation for generating the next block of the blockchain using other transactions including the matched transaction 2000.

복수의 노드(2) 중 어느 한 노드(2b)는 소정의 기준에 따라 해당 블록체인의 다음 블록을 생성할 수 있다. 이 다음 블록에는 매칭된 트랜잭션(2000)도 포함될 수 있다. 이를 통해, 매칭된 트랜잭션(2000)은 블록체인의 블록에 기록될 수 있다. 노드(2b)는 생성된 새로운 블록 내용을, 복수의 노드(2)에 공유할 수 있다. 복수의 노드(2)에 의해 실행되는 블록체인 상의 DEX(5)는, 블록 내용에 따라 저장하고 있는 잔고 정보를 갱신할 수 있다. 이에 따라, 사용자 클라이언트(예: 제1 클라이언트, 제2 클라이언트) 각각의, 해당 암호화폐(예: 제1 암호화폐, 제2 암호화폐)에 대한 잔고 정보가 갱신될 수 있다.Any one node 2b of the plurality of nodes 2 may generate the next block of the corresponding blockchain according to a predetermined criterion. The matched transaction 2000 may also be included in this next block. Through this, the matched transaction 2000 can be recorded in a block of the blockchain. The node 2b can share the generated new block content to the plurality of nodes 2. The DEX 5 on the blockchain executed by the plurality of nodes 2 can update the stored balance information according to the block contents. Accordingly, the balance information of each of the user clients (eg, the first client and the second client) and the corresponding cryptocurrency (eg, the first cryptocurrency and the second cryptocurrency) may be updated.

즉, 매칭된 트랜잭션(2000)은 관련된 사용자 클라이언트(예: 제1 클라이언트, 제2 클라이언트)의 잔고 정보를 변경하는데 사용될 수 있다. 매칭된 트랜잭션(2000)은 블록체인의 새로운 블록이 생성될 때 기록될 수 있으며, 생성된 블록은 복수의 노드(2) 각각에 공유(broadcast)될 수 있다.That is, the matched transaction 2000 can be used to change the balance information of the related user client (eg, first client, second client). The matched transaction 2000 can be recorded when a new block of the blockchain is created, and the generated block can be shared to each of the plurality of nodes 2.

도 6은 본 개시의 일 실시예에 따른, CEX가 노드로부터 잔고 정보를 획득하는 과정을 나타낸 도면이다. 전술한 바와 같이, 생성된 새로운 블록 내용에 따라 DEX의 잔고 정보가 갱신될 수 있다. 이에 따라, 블록체인 상에서 실행되는 DEX(5)의 잔고 정보 또는 밸런스 북이 갱신될 수 있고, 블록체인 네트워크(4) 상의 각 노드들은 DEX로부터 잔고 정보를 확인할 수 있다.6 is a diagram illustrating a process in which CEX acquires balance information from a node according to an embodiment of the present disclosure. As described above, the balance information of the DEX may be updated according to the generated new block content. Accordingly, the balance information or balance book of the DEX 5 executed on the blockchain can be updated, and each node on the blockchain network 4 can check the balance information from the DEX.

도시된 실시예에서, CEX(1) 내지 전자 장치(10)는 노드(2c)로 잔고 정보를 요청할 수 있다. 노드(2c)는 DEX(5)를 통해 잔고 정보를 획득하고 이를 CEX(1)로 전송할 수 있다. 일 실시예에서, 전달되는 잔고 정보는, 트랜잭션을 발행한 사용자 클라이언트(예: 제1 클라이언트, 제2 클라이언트)의 거래 대상 암호화폐(예: 제1 암호화폐, 제2 암호화폐)에 대한 잔고 정보일 수 있다.In the illustrated embodiment, the CEX 1 to the electronic device 10 may request balance information to the node 2c. The node 2c may acquire balance information through the DEX 5 and transmit it to the CEX 1. In one embodiment, the delivered balance information is the balance information for the cryptocurrency (eg, the first cryptocurrency, the second cryptocurrency) to be traded by the user client (eg, the first client and the second client) that issued the transaction. Can be

일 실시예에서, 이 과정은 CEX(1)와 노드 간의 요청과 응답에 의한 것이 아니라, CEX(1)가 노드(2c)에 액세스하여, 잔고 정보의 상태를 지속적으로 모니터링하는 방식으로 수행될 수도 있다. CEX(1)는 이를 통해 최신의 잔고 정보를 계속 획득할 수 있다. 이 후, CEX(1)는 지속적으로 획득한 각 사용자 클라이언트(3)의 주소(공개키)에 대한 잔고 정보를 저장할 수 있다.In one embodiment, this process may be performed in a manner in which CEX(1) accesses node 2c and continuously monitors the status of the balance information, not by request and response between CEX(1) and the node. have. Through this, the CEX 1 can continuously obtain the latest balance information. Thereafter, the CEX 1 may store the balance information for the address (public key) of each user client 3 continuously acquired.

일 실시예에서, 이 과정은 CEX(1)가 노드(2)로 매칭된 트랜잭션을 보내기 전에 해당 트랜잭션 내용들을 저장해 놓음으로써 생략될 수도 있다. CEX(1)는 매칭된 트랜잭션을 DEX(5), 즉 노드(2)로 보내기 전에 그 트랜잭션 내용들을 모두 저장해 놓음으로써 현재의 각 사용자 클라이언트(3)의 잔고 정보를 노드와의 통신 없이 알 수 있다. 이 경우 CEX(1)는 노드(2)로의 잔고 정보 요청을 할 필요가 없을 수 있다.In one embodiment, this process may be omitted by storing the corresponding transaction contents before the CEX 1 sends the matched transaction to the node 2. CEX(1) can know the current balance information of each user client (3) without communication with the node by storing all the transaction contents before sending the matched transaction to DEX(5), that is, node (2). . In this case, the CEX 1 may not need to request the balance information to the node 2.

일 실시예에서, 블록체인 네트워크(4) 상의 복수의 노드(2) 각각이 가지고 있는 잔고 정보는 서로 간에 불일치할 수도 있다. 즉, 어느 한 시점에서 블록체인 상의 유효한 잔고 상태(global state)와, 임의의 한 노드가 가지는 잔고 상태는 다를 수 있다. 이에 따라 CEX(1) 측에서 모니터링하는 블록체인의 상태는 CEX(1)가 어느 노드를 통해 잔고 정보를 획득하는지에 따라 달라질 수 있다.In one embodiment, the balance information of each of the plurality of nodes 2 on the blockchain network 4 may be inconsistent with each other. That is, at any one time, the valid global state on the blockchain and the balance state of any one node may be different. Accordingly, the state of the blockchain monitored by the CEX(1) may vary depending on which node the CEX(1) acquires the balance information.

일 실시예에서, 실제 잔고와 CEX(1)가 획득하는 잔고 정보와의 불일치에 따른 문제를 막기 위하여, CEX(1) 즉 전자 장치(10)는 트랜잭션이 발행되고 일정 시간 후 또는 일정 개수의 블락이 처리된 후에, 어느 한 노드로부터 잔고 정보를 획득해 올 수 있다. 참고로 마찬가지 이유에서, 사용자 클라이언트(3)가 잔고 정보에 기초하여 소정의 암호화폐 수량을 DEX(5)로부터 인출하는 경우에도, DEX(5) 내지 소정의 한 노드(2)는 인출 요청이 있고 일정 시간 후 또는 일정 개수의 블락이 처리된 후에, 그 인출 요청을 처리할 수 있다.In one embodiment, in order to prevent a problem caused by a mismatch between the balance information obtained by the actual balance and the CEX(1), the CEX(1), that is, the electronic device 10, is issued a transaction and a certain number of blocks after a transaction is issued. After this processing, balance information can be obtained from any one node. For reference, for the same reason, even when the user client 3 fetches a predetermined amount of cryptocurrency from the DEX 5 based on the balance information, the DEX 5 to one node 2 has a request to withdraw. After a certain period of time or after a certain number of blocks have been processed, the withdrawal request can be processed.

일 실시예에서, 실제 잔고와 CEX(1)가 획득하는 잔고 정보와의 불일치에 따른 문제를 막기 위하여, 사용자 클라이언트(3)는 직접 DEX(5)에 일정한 수량의 암호화폐만이 거래 가능하도록 설정해 둘 수도 있다. 설정된 수량만큼의 암호화폐는 바로 거래가 가능하지만, 그 이상의 수량에 대해서는 인출 요청이 발생한 후 일정 시간 후 또는 일정 개수의 블락이 처리된 후에 거래(인출)가 가능하도록 할 수 있다.In one embodiment, in order to prevent problems due to inconsistencies between the actual balance and the balance information acquired by CEX(1), the user client 3 directly sets the DEX 5 to be able to trade only a certain amount of cryptocurrency You can also put it. It is possible to immediately trade for the set number of cryptocurrencies, but for more quantity, a transaction (withdrawal) can be made after a certain time or after a certain number of blocks have been processed.

일단, CEX(1) 내지 전자 장치(10)가 잔고 정보를 획득하면, 이를 기초로 각 트랜잭션의 유효성이 검증될 수 있다. 구체적으로 전자 장치(10)의 프로세서(110)는, 사용자 클라이언트가 교환의 대가로 지불하려는 보유 암호화폐의 잔고(예: 제1 클라이언트의 제1 암호화폐의 잔고, 제2 클라이언트의 제2 암호화폐의 잔고)에 대한 정보를 획득할 수 있다. 프로세서(110)는 획득한 암호화폐의 잔고 정보 및 트랜잭션의 매도량에 기초하여 트랜잭션의 유효성을 검증할 수 있다. 프로세서(110)는, 사용자 클라이언트(3a)가 발행한 트랜잭션(1000a)의 내용에 나타나는 사용자 클라이언트(3a)의 제1 암호화폐 보유량을, 획득된 잔고 정보 상의 사용자 클라이언트(3a)의 제1 암호화폐 보유량과 비교할 수 있다. 트랜잭션(1000a)의 제1 암호화폐 보유량이, 잔고 정보 상의 제1 암호화폐 보유량 범위 내이면, 해당 트랜잭션(1000a)이 유효한 트랜잭션이라고 판단될 수 있다. 트랜잭션(1000b)에 대해서도 마찬가지 방식으로 검증이 수행될 수 있다.Once, the CEX 1 to the electronic device 10 acquire balance information, the validity of each transaction can be verified based on this. Specifically, the processor 110 of the electronic device 10, the balance of the cryptocurrency that the user client intends to pay in exchange for exchange (eg, the balance of the first cryptocurrency of the first client, the second cryptocurrency of the second client) Of the balance). The processor 110 may verify the validity of the transaction based on the acquired balance information of the cryptocurrency and the amount of the transaction. The processor 110 stores the first cryptocurrency holding amount of the user client 3a that appears in the content of the transaction 1000a issued by the user client 3a, and the first cryptocurrency of the user client 3a on the obtained balance information. It can be compared with the reserve. If the first cryptocurrency holding amount of the transaction 1000a is within the range of the first cryptocurrency holding amount on the balance information, it may be determined that the transaction 1000a is a valid transaction. The verification may be performed in the same manner for the transaction 1000b.

도 7은 본 개시의 일 실시예에 따른, CEX가 특정 사용자 클라이언트의 트랜잭션을 필터링하는 과정을 나타낸 도면이다. 일 실시예에서, CEX(1)는 이러한 스패밍을 막기 위하여 일종의 필터링 정책을 적용할 수 있으며, 필터링 정책은 다양한 방식으로 구현될 수 있다. 예를 들어, CEX(1)는 유효하지 않은 트랜잭션을 발송한 이력이 있는 사용자 클라이언트가 발송한 트랜잭션을 매칭에서 배제할 수 있다. 또한, 사용자 클라이언트의 식별자를 활용하여 스패밍을 하는 사용자 클라이언트를 식별하는 필터링 정책이 사용될 수도 있다. 본 개시에 따른 형태의 암호화폐 거래소에 중앙화된 트랜잭션 필터링 정책이 적용 가능하다는 점은, DEX만으로 구성된 암호화폐 거래소와는 다른 점이다.7 is a diagram illustrating a process in which CEX filters a transaction of a specific user client according to an embodiment of the present disclosure. In one embodiment, the CEX 1 may apply a sort of filtering policy to prevent such spamming, and the filtering policy may be implemented in various ways. For example, the CEX(1) may exclude a transaction sent by a user client having a history of sending an invalid transaction from matching. In addition, a filtering policy that identifies a user client spamming by using the identifier of the user client may be used. The fact that the centralized transaction filtering policy can be applied to the cryptocurrency exchange of the type according to the present disclosure is different from the cryptocurrency exchange composed of only DEX.

일 실시예에서, CEX(1) 내지 전자 장치(10)는, 복수의 클라이언트 중 잔고 정보에 기초하여 보았을 때, 유효하지 않은 트랜잭션을 미리 정의된 빈도수(frequency) 이상의 빈도수로 발송하는 사용자 클라이언트를 선별하고, 이 사용자 클라이언트로부터 수신된 트랜잭션을 매칭에서 배제할 수 있다. 사용자 클라이언트의 이러한 행위는 트랜잭션 스패밍 또는 오더 스패밍이라고 불릴 수 있다.In one embodiment, the CEX (1) to the electronic device (10), when viewed based on the balance information among a plurality of clients, selects a user client that sends an invalid transaction at a frequency greater than or equal to a predefined frequency And, the transaction received from this user client can be excluded from matching. This behavior of the user client can be called transaction spamming or order spamming.

구체적으로, 전자 장치(10)의 프로세서(110)는, 복수의 사용자 클라이언트(3a - 3e)로부터 트랜잭션들을 수신할 수 있다. 전술한 바와 같이, 프로세서(110)는, 트랜잭션의 내용과 해당 사용자 클라이언트의 잔고 정보에 기초하여, 그 트랜잭션이 유효한지 여부를 판단할 수 있다.Specifically, the processor 110 of the electronic device 10 may receive transactions from a plurality of user clients 3a-3e. As described above, the processor 110 may determine whether the transaction is valid based on the content of the transaction and the balance information of the corresponding user client.

이 때 프로세서(110)는, 유효하지 않은 트랜잭션을 계속해서 전송하여, 전자 장치(10)의 트랜잭션 처리에 부하를 일으키는 사용자 클라이언트를 선별할 수 있다. 전자 장치(10)는 미리 정의된 기준 빈도수(frequency) 값을 그 메모리(120)에 저장하고 있을 수 있다. 프로세서(110)는 어느 한 사용자 클라이언트(3e)가 유효하지 않은 트랜잭션을 소정의 빈도수 이상으로 전송하는 경우, 그 소정의 빈도수가 미리 정의된 기준 빈도수 값을 넘는지를 판단할 수 있다. 기준 빈도수를 넘는 빈도로 유효하지 않은 트랜잭션을 전송하는 사용자 클라이언트(3e)는 스패밍을 하는 사용자 클라이언트로 결정될 수 있다. 메모리(120)는 사용자 클라이언트(3e)의 클라이언트 식별자를 저장할 수 있다.At this time, the processor 110 may continue to transmit an invalid transaction, and select a user client that causes a load on the transaction processing of the electronic device 10. The electronic device 10 may store a predefined reference frequency value in the memory 120. When a user client 3e transmits an invalid transaction more than a predetermined frequency, the processor 110 may determine whether the predetermined frequency exceeds a predefined reference frequency value. The user client 3e transmitting an invalid transaction at a frequency exceeding the reference frequency may be determined as a user client spamming. The memory 120 may store a client identifier of the user client 3e.

CEX(1)는, 이후 사용자 클라이언트(3e)로부터 전송되는 트랜잭션은 수신하지 않거나, 수신하더라도 그 트랜잭션을 트랜잭션 매칭 과정에서 배제할 수 있다. 이는 저장된 클라이언트 식별자와 어떤 트랜잭션을 보내온 사용자 클라이언트의 식별자를 대비함으로써 수행될 수 있다. 일 실시예에서, 트랜잭션은 그 트랜잭션을 보내온 사용자 클라이언트의 클라이언트 식별자 정보를 포함할 수 있다. 일 실시예에서, CEX(1)는 디지털 서명 값을 이용하여 스패밍을 하는 사용자 클라이언트로 결정된 사용자 클라이언트를 식별해낼 수도 있다. 일 실시예에서, CEX(1)는 암호화폐 거래소에 등록된 사용자 클라이언트 식별자를 이용하여, 전술한 클라이언트 식별자 대비를 수행할 수도 있다.The CEX 1 may not receive a transaction transmitted from the user client 3e or may exclude the transaction from the transaction matching process even if it is received. This can be done by comparing the stored client identifier with the identifier of the user client that sent the transaction. In one embodiment, the transaction may include client identifier information of the user client that sent the transaction. In one embodiment, CEX 1 may use a digital signature value to identify a user client determined to be a spamming user client. In one embodiment, CEX(1) may perform the above-described client identifier comparison using a user client identifier registered in a cryptocurrency exchange.

도 8은, 본 개시의 일 실시예에 따른, CEX의 오더 북 및 트랜잭션 매칭 과정을 나타낸 도면이다. 전술한 바와 같이, 오더 북은 트랜잭션 내지 주문을 나열한 기록으로서, 각 주체가 사거나 팔고자 하는, 즉 교환하고자 하는 디지털 자산(예: 암호화폐)의 가격과 수량을 리스팅한 것일 수 있다. CEX(1)는 트랜잭션들을 사용자 클라이언트(3)로부터 수신할 수 있고, 소정의 기준 하에 트랜잭션을 서로 매칭할 수 있다.8 is a diagram illustrating a CEX order book and transaction matching process according to an embodiment of the present disclosure. As described above, the order book is a record listing transactions or orders, and may be a list of prices and quantities of digital assets (eg, cryptocurrency) that each subject wants to buy or sell, that is, to exchange. The CEX 1 can receive transactions from the user client 3 and match the transactions with each other under certain criteria.

본 개시에서, 한 트랜잭션은 자신이 보유한 암호화폐의 매도할 수량 및 교환 대상인 암호화폐의 매수할 수량을 특정할 수 있다. 즉, 한 트랜잭션(예: 제1 트랜잭션)은 매도할 암호화폐(예: 제1 암호화폐)의 매도할 수량(예: 제1 매도량) 및 매수할 암호화폐(예: 제2 암호화폐)의 매수할 수량(예: 제1 매수량)을 특정할 수 있다. 또한, 한 트랜잭션(예: 제2 트랜잭션)은 매도할 암호화폐(예: 제2 암호화폐)의 매도할 수량(예: 제2 매도량) 및 매수할 암호화폐(예: 제1 암호화폐)의 매수할 수량(예: 제2 매수량)을 특정할 수 있다.In the present disclosure, a transaction can specify the quantity of cryptocurrency to sell and the quantity of cryptocurrency to be exchanged. That is, a transaction (eg, the first transaction) is a quantity to be sold (eg, the first selling amount) of the cryptocurrency to be sold (eg, the first selling amount) and a quantity to be purchased of the cryptocurrency to be purchased (eg, the second cryptocurrency). (Eg, the first purchase quantity) can be specified. In addition, a transaction (e.g., a second transaction) is a quantity to be sold (e.g., a second cryptocurrency) to be sold (e.g., a second cryptocurrency) and a quantity to be purchased (e.g., a first cryptocurrency) to be sold. (Eg, the second purchase quantity) can be specified.

일 실시예에서, 트랜잭션은 유저 주소(user address), 암호화폐 A,암호화폐 B, 수량 A(amount A) 및/또는 수량 B(amount B) 정보를 포함할 수 있다. 유저 주소는 해당 트랜잭션을 발행한 사용자 클라이언트의 주소로서, 해당 사용자 클라이언트의 공개키 값일 수 있다. 암호화폐 A, 수량 A는 각각 보유하고 있는 암호화폐의 종류 및 수량을 나타내는 정보로서, 매도하고자 하는 암호화폐와 그 수량을 특정하기 위한 값일 수 있다. 암호화폐 B, 수량 B 는 각각 교환하고자 하는 암호화폐의 종류 및 수량을 나타내는 정보로서, 매수하고자 하는 암호화폐와 그 수량을 특정하기 위한 값일 수 있다. 즉, 트랜잭션은 수량 A의 암호화폐 A를 매도하여 수량 B의 암호화폐 B를 매수하기 위한, 즉 암호화폐 A를 암호화폐 B로 교환하기 위한 주문일 수 있다.In one embodiment, the transaction may include user address, cryptocurrency A, cryptocurrency B, quantity A (amount A) and/or quantity B (amount B) information. The user address is the address of the user client that issued the transaction, and may be a public key value of the user client. The cryptocurrency A and the quantity A are information indicating the type and quantity of the cryptocurrency, respectively, and may be values for specifying the cryptocurrency to be sold and the quantity. Cryptocurrency B and quantity B are information indicating the type and quantity of the cryptocurrency to be exchanged, respectively, and may be values for specifying the cryptocurrency to be purchased and the quantity. That is, the transaction may be an order for selling cryptocurrency B of quantity A to buy cryptocurrency B of quantity B, that is, to exchange cryptocurrency A for cryptocurrency B.

일 실시예에서, 트랜잭션은 유저 주소(user address), 사이드(side), 암호화폐 A,암호화폐 B, 수량 A(amount A) 및/또는 수량 B(amount B) 정보를 포함할 수 있다. 유저 주소는 전술한 바와 같다. 사이드 정보는 해당 트랜잭션이 매도(ask)를 위한 주문인지, 매수(bid)를 위한 주문인지 그 타입을 나타내는 정보일 수 있다. 사이드 정보가 해당 트랜잭션이 매수 주문임을 나타내는 경우, 해당 트랜잭션은 수량 A의 암호화폐 A를 대가로 수량 B의 암호화폐 B를 매수하는 주문일 수 있다. 또한, 사이드 정보가 해당 트랜잭션이 매도 주문임을 나타내는 경우, 해당 트랜잭션은 수량 A의 암호화폐 A를 대가로 수량 B의 암호화폐 B를 매도하는 주문일 수 있다.In one embodiment, the transaction may include user address, side, cryptocurrency A, cryptocurrency B, quantity A (amount A) and/or quantity B (amount B) information. The user address is as described above. The side information may be information indicating the type of whether the corresponding transaction is an order for asking or a bid. When the side information indicates that the transaction is a purchase order, the transaction may be an order to purchase the cryptocurrency B of the quantity B in exchange for the cryptocurrency A of the quantity A. Further, when the side information indicates that the transaction is a sell order, the transaction may be an order to sell the cryptocurrency B of the quantity B in exchange for the cryptocurrency A of the quantity A.

일 실시예에서, 트랜잭션은 버전 정보, 식별자 및/또는 디지털 서명을 더 포함할 수 있다. 버전 정보는 해당 트랜잭션의 버전을 나타낼 수 있다. 식별자는 해당 트랜잭션의 식별자를 나타낼 수 있다. 디지털 서명은 해당 트랜잭션의 디지털 서명으로서, 해당 트랜잭션의 해쉬 값을 사용자 클라이언트의 개인키로 암호화한 것일 수 있다.In one embodiment, the transaction may further include version information, an identifier and/or a digital signature. The version information may indicate the version of the transaction. The identifier may indicate the identifier of the transaction. The digital signature is a digital signature of the transaction, and may be a hash value of the transaction encrypted with the private key of the user client.

도시된 오더 북(8010)은 특정 암호화폐의 매도 또는 매수에 관한 트랜잭션(주문)들을 리스팅한 것일 수 있다. 오더 북(8010)은 그 특정 암호화폐를 매도하기 위한 매도 주문(8050)들과, 그 특정 암호화폐를 매수하기 위한 매수 주문(8060)들을 포함할 수 있다.The illustrated order book 8010 may list transactions (orders) related to the sale or purchase of a specific cryptocurrency. The order book 8010 may include sell orders 8050 for selling the specific cryptocurrency, and buy orders 8060 for buying the specific cryptocurrency.

매수 주문(8060) 각각은 특정 암호화폐(예: 제2 암호화폐)를 매수하고자 하는 주문으로, 특정 암호화폐의 수량(열 8040) 및 매수 희망 가격(열 8030)을 가질 수 있다. 도시된 오더 북(8010)은 특정 암호화폐가 KRW(Korean Won)과 교환되는 것을 기준으로 작성되어 있다. 이에 따라 가격(열 8030)은 각각 특정 암호화폐의 기본 단위(1개)의 KRW에 따른 가격을 나타내고 있다. 예를 들어 매수 주문(8080)은, 특정 암호화폐 0.220개를, 암호화폐 1개당 19,988,000원에 매수하고자 하는 주문일 수 있다. 단, 전술한 바와 같이, 가격은 KRW 등의 실물 화폐를 기준으로 한 가격이 아니라, 다른 암호화폐를 기준으로 한 가격일 수 있다. 다른 암호화폐를 기준으로 한 가격으로 암호화폐를 교환(매수/매도)한다는 것은, 일정한 교환율로 해당 암호화폐를 다른 암호화폐와 교환한다는 것과 같은 의미일 수 있다. 예를 들어 가격(열 8030)은 다른 암호화폐(예: 제1 암호화폐)를 기준으로 한 가격, 즉 특정 암호화폐(예: 제2 암호화폐) 대비 다른 암호화폐(예: 제1 암호화폐)의 교환율로 대신 채워질 수 있다. 예를 들어 매수 주문(8080)의 가격(열 8030)은, 5 BTC/ETH(1개의 ETH 당 5개의 BTC로의 교환율)와 같이 나타내어질 수도 있다.Each purchase order 8060 is an order to purchase a specific cryptocurrency (for example, a second cryptocurrency), and may have a quantity of a specific cryptocurrency (column 8040) and a desired purchase price (column 8030). The illustrated order book 8010 is prepared based on the exchange of a specific cryptocurrency with KRW (Korean Won). Accordingly, the price (column 8030) represents the price according to KRW of each basic unit (1) of a specific cryptocurrency. For example, the purchase order 8080 may be an order to purchase 0.220 specific cryptocurrencies for 19,988,000 won per cryptocurrency. However, as described above, the price may be a price based on other cryptocurrencies, not a price based on real money such as KRW. Exchanging (buying/selling) cryptocurrency at a price based on other cryptocurrencies may mean that the cryptocurrency is exchanged with other cryptocurrencies at a constant exchange rate. For example, the price (column 8030) is a price based on another cryptocurrency (e.g., the first cryptocurrency), i.e., a different cryptocurrency (e.g., the first cryptocurrency) compared to a specific cryptocurrency (e.g., the second cryptocurrency). Can be filled instead with the exchange rate. For example, the price of a buy order 8080 (column 8030) may be expressed as 5 BTC/ETH (exchange rate of 5 BTC per ETH).

매도 주문(8050) 각각은 특정 암호화폐(예: 제2 암호화폐)를 매도하고자 하는 주문으로, 특정 암호화폐의 수량(열 8020) 및 매도 희망 가격(열 8030)을 가질 수 있다. 예를 들어 매도 주문(8050)은, 특정 암호화폐 1. 388개를, 암호화폐 1개당 19,997,000원에 매도하고자 하는 주문일 수 있다. 마찬가지로 실시예에 따라, 매도 희망 가격 역시 KRW이 아닌 다른 암호화폐와의 교환율을 기준으로 작성될 수도 있다. 즉, 매도 주문(8050)들은, 특정 암호화폐(예: 제2 암호화폐)를 KRW이 아닌, 다른 암호화폐(예: 제1 암호화폐)를 받고 팔고자 하는 주문들일 수 있다.Each of the sell orders 8050 is an order to sell a specific cryptocurrency (for example, a second cryptocurrency), and may have a quantity of a specific cryptocurrency (column 8020) and a desired selling price (column 8030). For example, the order to sell 8050 may be an order to sell 1.88 specific cryptocurrencies for 19,997,000 won per cryptocurrency. Similarly, according to an embodiment, the desired selling price may also be prepared based on an exchange rate with a cryptocurrency other than KRW. That is, the sell orders 8050 may be orders that want to receive and sell a specific cryptocurrency (eg, the second cryptocurrency) other than the KRW, other cryptocurrency (eg, the first cryptocurrency).

CEX(1)가 트랜잭션 간에 매칭을 하는 경우, 이는 트랜잭션(주문)의 교환율에 기초하여 수행될 수 있다. 일 실시예에서, CEX(1) 내지 전자 장치(10)는, 두 트랜잭션의 교환율이 대응되는 경우(즉, 소정의 조건을 만족하는 경우)에 두 트랜잭션을 매칭할 수 있다. 즉, 프로세서(110)는, 트랜잭션의 내용으로부터 해당 트랜잭션의 교환율을 도출하고, 이 교환율을 이용하여 트랜잭션들을 매칭할 수 있다. 이 때 각 트랜잭션의 교환율은 각 트랜잭션의 매도량과 매수량의 비로 계산될 수 있다.When the CEX 1 matches between transactions, this can be done based on the exchange rate of the transaction (order). In one embodiment, the CEX 1 to the electronic device 10 may match the two transactions when the exchange rates of the two transactions correspond (ie, when a predetermined condition is satisfied). That is, the processor 110 may derive an exchange rate of the corresponding transaction from the content of the transaction, and match the transactions using the exchange rate. At this time, the exchange rate of each transaction can be calculated by the ratio of the selling amount and the buying amount of each transaction.

예를 들어, 제1 클라이언트가 자신이 보유한 제1 암호화폐를 이용하여 제2 암호화폐를 매수하기 위해, 제1 트랜잭션을 발행할 수 있다. 제1 트랜잭션은 매수하고자 하는 제2 암호화폐의 수량인 제1 매수량을 특정할 수 있다. 또한, 제1 트랜잭션은 그에 대한 대가로 교환할(매도할) 제1 암호화폐의 수량인 제1 매도량을 특정할 수 있다. 이 경우 제1 트랜잭션의 교환율인 제1 교환율은 제1 매도량을 제1 매수량으로 나눈 값일 수 있다. 이 제1 교환율은 제2 암호화폐 1개 당 교환될 제1 암호화폐의 개수를 나타낼 수 있다. 또한, 제2 클라이어트는 자신이 보유한 제2 암호화폐를 이용하여 제1 암호화폐를 매수하기 위해, 제2 트랜잭션을 발행할 수 있다. 제2 트랜잭션은 매수하고자 하는 제1 암호화폐의 수량인 제2 매수량을 특정할 수 있다. 또한, 제2 트랜잭션은 그에 대한 대가로 교환할(매도할) 제2 암호화폐의 수량인 제2 매도량을 특정할 수 있다. 이 경우 제2 트랜잭션의 교환율인 제2 교환율은 제2 매도량을 제2 매수량으로 나눈 값일 수 있다. 이 제2 교환율은 제1 암호화폐 1개 당 교환될 제2 암호화폐의 개수를 나타낼 수 있다.For example, the first client may issue a first transaction in order to purchase the second cryptocurrency using the first cryptocurrency owned by the first client. The first transaction may specify the first purchase quantity, which is the quantity of the second cryptocurrency to be purchased. In addition, the first transaction may specify the first selling amount, which is the quantity of the first cryptocurrency to be exchanged (sold) in exchange for it. In this case, the first exchange rate, which is the exchange rate of the first transaction, may be a value obtained by dividing the first selling quantity by the first buying quantity. This first exchange rate may indicate the number of first cryptocurrencies to be exchanged per one second cryptocurrency. In addition, the second client may issue a second transaction to purchase the first cryptocurrency using the second cryptocurrency owned by the second client. The second transaction may specify the second purchase quantity, which is the quantity of the first cryptocurrency to be purchased. In addition, the second transaction may specify the second selling amount, which is the quantity of the second cryptocurrency to be exchanged (sold) in exchange for it. In this case, the second exchange rate, which is the exchange rate of the second transaction, may be a value obtained by dividing the second selling quantity by the second buying quantity. This second exchange rate may indicate the number of second cryptocurrencies to be exchanged per one first cryptocurrency.

이 때, CEX(1) 내지 전자 장치(10)는, 제1 교환율과 제2 교환율이 대응되는지를 판단하여, 대응되는 경우, 제1 트랜잭션과 제2 트랜잭션을 서로 매칭할 수 있다. 구체적으로 전자 장치(10)의 프로세서는 제1 교환율의 역수가 제2 교환율과 일치하는 경우, 제1 트랜잭션과 제2 트랜잭션을 서로 매칭할 수 있다.At this time, the CEX 1 to the electronic device 10 may determine whether the first exchange rate and the second exchange rate correspond, and if so, match the first transaction and the second transaction with each other. Specifically, when the reciprocal of the first exchange rate coincides with the second exchange rate, the processor of the electronic device 10 may match the first transaction and the second transaction with each other.

또한 일 실시예에서, CEX(1) 내지 전자 장치(10)는, 각 트랜잭션이 메이커 주문인지, 테이커 주문인지에 기초하여, 후술할 소정의 기준에 따라 두 트랜잭션을 매칭하고, 그 매칭된 트랜잭션에 따른 암호화폐의 교환이 수행될 교환율을 결정해 줄 수 있다.In addition, in one embodiment, the CEX (1) to the electronic device 10, based on whether each transaction is a maker order or a taker order, matches two transactions according to a predetermined criterion to be described later, and the matched transaction Therefore, the exchange rate at which the exchange of cryptocurrency will be performed can be determined.

본 개시에서, 메이커(maker) 주문은 암호화폐 교환을 위한 주문의 한 타입으로서, 즉시 체결되지는 않고 오더 북 상에 희망 거래 조건을 만드는 주문일 수 있다. 즉, 메이커 주문에 따른 트랜잭션이 오더 북에 기재될 수 있다. 메이커 매수/매도 주문은 매수/매도하고자 하는 암호화폐(예: 비트코인)의 가격과 수량을 오더 북에 등재할 수 있다. 여기서 가격은 다른 암호화폐를 기준으로 한 가격이거나, KRW(Korean Won) 등 실물 화폐(fiat money)를 기준으로 한 가격일 수 있다. 메이커 매수 주문은 보통 즉시 체결되는 매도 호가보다 낮은 가격으로 주문되고, 메이커 매도 주문은 보통 즉시 체결되는 매수 호가보다 높은 가격으로 주문될 수 있다.In the present disclosure, a maker order is a type of order for cryptocurrency exchange, and may be an order that is not immediately executed and creates a desired transaction condition on an order book. That is, a transaction according to a maker order can be described in the order book. In order to buy/sell a maker, the price and quantity of the cryptocurrency (eg Bitcoin) that you want to buy/sell can be listed in the order book. Here, the price may be based on another cryptocurrency, or may be based on fiat money such as KRW (Korean Won). The maker buy order is usually ordered at a price lower than the immediately-assigned selling price, and the maker sell order can be ordered at a price higher than the normally-assigned buying price.

본 개시에서, 테이커(taker) 주문은 암호화폐 교환을 위한 주문의 한 타입으로서, 오더 북에 등재된 주문을 가져와서 즉시 체결되는 주문일 수 있다. 테이커 매수/매도 주문은, 오더 북에 있는 주문들 중 매수/매도하고자 하는 주문을 선택하여 즉시 매수/매도를 성사할 수 있다. 테이커 매수 주문은 보통 오더 북에 등재된 매도 주문들보다 높은 가격으로 입력되고, 현재 호가와 가장 가까운 가격의 테이커 매수 주문부터 체결될 수 있다. 테이커 매도 주문은 보통 오더 북에 등재된 매수 주문들보다 낮은 가격으로 입력되고, 현재 호가와 가장 가까운 가격의 테이커 매도 주문부터 체결될 수 있다.In the present disclosure, a taker order is a type of order for cryptocurrency exchange, and may be an order that is immediately executed by taking an order registered in an order book. For Take/Sell orders, you can immediately buy/sell by selecting the order you want to buy/sell from the orders in the order book. The taker buy order is usually entered at a higher price than the sell orders listed in the order book, and can be executed from the taker buy order with the price closest to the current price. The taker sell order is usually entered at a lower price than the buy orders listed in the order book, and can be executed from the taker sell order with the price closest to the current price.

일 실시예에서, 트랜잭션은 해당 트랜잭션이 메이커(maker) 주문인 지 테이커(taker) 주문인지를 나타내는 정보를 더 포함할 수 있다. 전술한 바와 같이, 트랜잭션은 유저 주소(user address), 사이드 정보, 암호화폐 A,암호화폐 B, 수량 A(amount A) 및/또는 수량 B(amount B) 정보를 포함할 수 있다. 예를 들어, 제1 클라이언트의 제1 트랜잭션은, 그 사이드 정보가 해당 제1 트랜잭션이 매수(bid) 주문임을 나타낼 수 있고, 암호화폐 A 정보는 제1 암호화폐, 암호화폐 B 정보는 제2 암호화폐를 지시할 수 있다. 또한, 제2 클라이언트의 제2 트랜잭션은, 그 사이드 정보가 해당 제2 트랜잭션이 매도(ask) 주문임을 나타낼 수 있고, 암호화폐 A 정보는 제1 암호화폐, 암호화폐 B 정보는 제2 암호화폐를 지시할 수 있다.In one embodiment, the transaction may further include information indicating whether the corresponding transaction is a maker order or a taker order. As described above, the transaction may include user address, side information, cryptocurrency A, cryptocurrency B, quantity A (amount A) and/or quantity B (amount B) information. For example, the first transaction of the first client, the side information may indicate that the first transaction is a bid order, cryptocurrency A information is the first cryptocurrency, cryptocurrency B information is the second password Can dictate currency. In addition, the second transaction of the second client, the side information may indicate that the second transaction is an asking order, cryptocurrency A information is the first cryptocurrency, cryptocurrency B information is the second cryptocurrency I can order.

이 때 제1 트랜잭션이 메이커 주문, 제2 트랜잭션이 테이커 주문인 경우, 제1 트랜잭션의 수량 A(amount A) / 수량 B(amount B) 값이 제2 트랜잭션의 수량 A(amount A) / 수량 B(amount B) 값보다 크거나 같은 경우, 두 트랜잭션은 서로 매칭될 수 있다. 이 때 제1 트랜잭션의 수량 A(amount A) / 수량 B(amount B) 값을 최종 교환율로 하여, 두 트랜잭션에 따른 암호화폐 교환이 수행될 수 있다.At this time, if the first transaction is a maker order and the second transaction is a taker order, the quantity A(amount A) / quantity B(amount B) of the first transaction is the quantity A(amount A) / quantity B of the second transaction If it is greater than or equal to the (amount B) value, the two transactions can match each other. At this time, as the final exchange rate, the quantity A (amount A) / quantity B (amount B) of the first transaction may be exchanged for cryptocurrency according to the two transactions.

이 때 제2 트랜잭션이 메이커 주문, 제1 트랜잭션이 테이커 주문인 경우, 제1 트랜잭션의 수량 A(amount A) / 수량 B(amount B) 값이 제2 트랜잭션의 수량 A(amount A) / 수량 B(amount B) 값보다 크거나 같은 경우, 두 트랜잭션은 서로 매칭될 수 있다. 이 때 제2 트랜잭션의 수량 A(amount A) / 수량 B(amount B) 값을 최종 교환율로 하여, 두 트랜잭션에 따른 암호화폐 교환이 수행될 수 있다.At this time, if the second transaction is a maker order and the first transaction is a taker order, the quantity A(amount A) / quantity B(amount B) of the first transaction is the quantity A(amount A) / quantity B of the second transaction If it is greater than or equal to the (amount B) value, the two transactions can match each other. At this time, the exchange amount of the cryptocurrency according to the two transactions may be performed using the value of the quantity A (amount A) / quantity B (amount B) of the second transaction as the final exchange rate.

일 실시예에서, 매칭된 두 트랜잭션에서 서로 교환하고자 하는 수량이 일치하는 경우, 두 트랜잭션의 내용 그대로에 따라 암호화폐 교환이 수행될 수 있다.In one embodiment, when the quantity to be exchanged with each other in the two matched transactions is identical, the exchange of cryptocurrency may be performed according to the contents of the two transactions.

일 실시예에서, 프로세서(110)는 매칭된 두 트랜잭션에서 서로 교환하고자 하는 암호화폐 수량이 불일치하는 경우, 두 트랜잭션의 내용에 기초하여 교환하고자 하는 수량의 일부에 대해서만 암호화폐 교환을 수행할 수 있다(partial fill). 예를 들어, 전술한 여러 방법에 따라 교환율이 결정될 수 있고, 매칭된 두 트랜잭션 중 어느 하나의 트랜잭션이 나타내는 보유 암호화폐 량이, 결정된 교환율로 교환을 수행하였을 때, 모두 소진되지 못할 수 있다. 이 경우, 트랜잭션 내용에 비추어 가능한 양만이 교환되고, 전자 장치(10)의 프로세서(110)는 해당 트랜잭션에서 교환되지 못하고 남은 수량에 대한 정보를 메모리(120)에 저장할 수 있다.In one embodiment, the processor 110 may perform cryptocurrency exchange only for a part of the quantity to be exchanged based on the contents of the two transactions, when the quantity of the cryptocurrency to exchange with each other in the two matched transactions is inconsistent. (partial fill). For example, the exchange rate may be determined according to the above-described various methods, and when the exchange amount of the retained cryptocurrency indicated by any one of the two matched transactions is exchanged at the determined exchange rate, they may not be exhausted. In this case, only a possible amount is exchanged in light of the transaction content, and the processor 110 of the electronic device 10 can store information about the remaining quantity in the memory 120 that cannot be exchanged in the transaction.

구체적으로, 남은 수량에 대한 정보는 남은 수량을 가지는 트랜잭션의 식별자, 그 트랜잭션이 가지고 있던 사이드 정보, 암호화폐 A, 암호화폐 B 정보 및/또는 남은 수량(unfilledAmount) 정보를 포함할 수 있다. 남은 수량(unfilledAmount) 정보는, 상술한 소진되지 못한 남은 수량으로서 사이드 정보가 매수(bid)를 가리키는 경우 암호화폐 A의 남은 수량, 사이드 정보가 매도(ask)를 가리키는 경우 암호화폐 B의 남은 수량을 나타낼 수 있다. 일 실시예에서, 남은 수량에 대한 정보는 이 후 다른 오더와의 매칭에 사용될 수 있다.Specifically, the information on the remaining quantity may include the identifier of the transaction having the remaining quantity, side information held by the transaction, cryptocurrency A, cryptocurrency B information, and/or unfilledAmount information. The remaining quantity (unfilledAmount) information is the remaining quantity of cryptocurrency A when the side information indicates the bid (bid) and the remaining quantity of cryptocurrency B when the side information indicates the sell (ask) Can be represented. In one embodiment, information about the remaining quantity can then be used for matching with other orders.

도 9는 본 개시에 따른 전자 장치(10)에 의해 수행될 수 있는, 암호화폐 교환을 위한 트랜잭션을 매칭하는 방법의 일 실시예를 나타낸 도면이다. 도시된 흐름도에서 본 개시에 따른 방법 또는 알고리즘의 각 단계들이 순차적인 순서로 설명되었지만, 각 단계들은 순차적으로 수행되는 것 외에, 본 개시에 의해 임의로 조합될 수 있는 순서에 따라 수행될 수도 있다. 본 흐름도에 따른 설명은, 방법 또는 알고리즘에 변화 또는 수정을 가하는 것을 제외하지 않으며, 임의의 단계가 필수적이거나 바람직하다는 것을 의미하지 않는다. 일 실시예에서, 적어도 일부의 단계가 병렬적, 반복적 또는 휴리스틱하게 수행될 수 있다. 일 실시예에서, 적어도 일부의 단계가 생략되거나, 다른 단계가 추가될 수 있다.9 is a diagram illustrating an embodiment of a method of matching a transaction for cryptocurrency exchange, which can be performed by the electronic device 10 according to the present disclosure. Although each step of the method or algorithm according to the present disclosure has been described in a sequential order in the illustrated flow chart, each step may be performed in an order that can be arbitrarily combined by the present disclosure in addition to being sequentially performed. The description according to this flow chart does not exclude that any changes or modifications are made to the method or algorithm, and does not mean that any steps are necessary or desirable. In one embodiment, at least some of the steps can be performed in parallel, iteratively or heuristically. In one embodiment, at least some steps may be omitted or other steps may be added.

본 개시에 따른 전자 장치(10)는, 암호화폐 교환을 위한 트랜잭션을 매칭함에 있어서, 본 개시의 다양한 실시예에 따른 트랜잭션을 매칭하는 방법을 수행할 수 있다. 본 개시의 일 실시예에 따른 트랜잭션을 매칭하는 방법은, 제1 트랜잭션을 수신하는 단계(S100), 제2 트랜잭션을 수신하는 단계(S200), 디지털 서명을 검증하는 단계(S300), 트랜잭션의 유효성을 검증하는 단계(S400), 제1 트랜잭션과 제2 트랜잭션을 매칭(matching)하는 단계(S500) 및/또는 매칭된 제1 트랜잭션 및 제2 트랜잭션을 블록 체인 네트워크 상의 노드로 전달하는 단계(S600)를 포함할 수 있다.The electronic device 10 according to the present disclosure may perform a method of matching transactions according to various embodiments of the present disclosure in matching transactions for cryptocurrency exchange. A method of matching a transaction according to an embodiment of the present disclosure includes receiving a first transaction (S100), receiving a second transaction (S200), verifying a digital signature (S300), and validity of the transaction Verifying (S400), matching the first transaction and the second transaction (S500), and/or transferring the matched first and second transactions to a node on the blockchain network (S600) It may include.

단계 S100에서, 전자 장치(10)의 통신 인터페이스(130)는 복수 개의 사용자 클라이언트(3) 중 제1 클라이언트로부터 제1 트랜잭션을 수신할 수 있다. 제1 트랜잭션은 제1 클라이언트의 제1 개인키로 디지털 서명되었을 수 있고, 제1 암호화폐를 제1 교환율로 제2 암호화폐와 교환하기 위한 트랜잭션일 수 있다.In step S100, the communication interface 130 of the electronic device 10 may receive a first transaction from the first client among the plurality of user clients 3. The first transaction may be digitally signed with the first private key of the first client, and may be a transaction for exchanging the first cryptocurrency with the second cryptocurrency at a first exchange rate.

단계 S200에서, 통신 인터페이스(130)는 복수 개의 사용자 클라이언트(3) 중 제2 클라이언트로부터 제2 트랜잭션을 수신할 수 있다. 제2 트랜잭션은 제2 클라이언트의 제2 개인키로 디지털 서명되었을 수 있고, 제2 암호화폐를 제2 교환율로 제1 암호화폐와 교환하기 위한 트랜잭션일 수 있다.In step S200, the communication interface 130 may receive a second transaction from the second client among the plurality of user clients 3. The second transaction may be digitally signed with the second private key of the second client, and may be a transaction for exchanging the second cryptocurrency with the first cryptocurrency at a second exchange rate.

일 실시예에서, 전자 장치(10)의 통신 인터페이스(130)는 사용자 클라이언트(3)가 아닌, 적어도 하나 이상의 노드(2)로부터 트랜잭션을 수신할 수도 있다. 이 경우 노드(2)는 사용자 클라이언트(3)로부터 수신한 트랜잭션을 CEX(1)로 전달해줄 수 있다. 또는 일 실시예에서, 사용자 클라이언트(3)가 블록체인의 노드(2) 중 하나의 역할을 동시에 수행할 수도 있다.In one embodiment, the communication interface 130 of the electronic device 10 may receive a transaction from at least one node 2 rather than the user client 3. In this case, the node 2 may deliver the transaction received from the user client 3 to the CEX 1. Alternatively, in one embodiment, the user client 3 may simultaneously perform the role of one of the nodes 2 of the blockchain.

단계 S300에서, 전자 장치(10)의 프로세서(110)는 전술한 제1 개인키에 대응되는 제1 공개키에 기초하여 제1 트랜잭션의 디지털 서명을 검증할 수 있다. 또한, 프로세서(110)는 전술한 제2 개인키에 대응되는 제2 공개키에 기초하여 제2 트랜잭션의 디지털 서명을 검증할 수 있다.In step S300, the processor 110 of the electronic device 10 may verify the digital signature of the first transaction based on the first public key corresponding to the first private key described above. Further, the processor 110 may verify the digital signature of the second transaction based on the second public key corresponding to the second private key described above.

단계 S400에서, 프로세서(110)는 전술한 복수의 노드(2) 중 적어도 하나의 노드에 저장된 제1 클라이언트의 제1 암호화폐에 대한 잔고 정보에 기초하여 제1 트랜잭션의 유효성을 검증할 수 있다. 또한 프로세서(110)는 적어도 하나의 노드에 저장된 제2 클라이언트의 제2 암호화폐에 대한 잔고 정보에 기초하여 제2 트랜잭션의 유효성을 검증할 수 있다.In step S400, the processor 110 may verify the validity of the first transaction based on the balance information for the first cryptocurrency of the first client stored in at least one node among the plurality of nodes 2 described above. In addition, the processor 110 may verify the validity of the second transaction based on the balance information of the second cryptocurrency of the second client stored in at least one node.

단계 S500에서, 프로세서(110)는 제1 트랜잭션의 제1 교환율과 제2 트랜잭션의 제2 교환율에 기초하여 제1 트랜잭션과 제2 트랜잭션을 매칭할 수 있다.In step S500, the processor 110 may match the first transaction and the second transaction based on the first exchange rate of the first transaction and the second exchange rate of the second transaction.

단계 S600에서, 프로세서(110)는 매칭된 제1 트랜잭션 및 제2 트랜잭션을 블록 체인 네트워크(4) 상의 복수의 노드(2) 중 적어도 어느 하나의 노드로 전달할 수 있다.In step S600, the processor 110 may deliver the matched first transaction and second transaction to at least one of the plurality of nodes 2 on the blockchain network 4.

일 실시예에서, 적어도 하나의 노드로 전달된 매칭된 제1 트랜잭션 및 제2 트랜잭션은, 블록 체인 네트워크(4) 상의 복수의 노드(2) 간에 공유되어, 블록 체인의 한 블록에 포함될 수 있다. 매칭된 제1 트랜잭션 및 제2 트랜잭션에 기초하여, 복수의 노드(2) 각각에 저장된 제1 클라이언트의 제1 암호화폐 및 제2 암호화폐에 대한 잔고 정보와, 제2 클라이언트의 제1 암호화폐 및 제2 암호화폐에 대한 잔고 정보가 각각 갱신될 수 있다.In one embodiment, the matched first transaction and the second transaction delivered to at least one node are shared between a plurality of nodes 2 on the blockchain network 4 and may be included in one block of the blockchain. Based on the matched first transaction and the second transaction, the balance information for the first cryptocurrency and the second cryptocurrency of the first client stored in each of the plurality of nodes 2 and the first cryptocurrency of the second client and The balance information for the second cryptocurrency can be updated, respectively.

일 실시예에서, 디지털 서명을 검증하는 단계(S300)는, 프로세서(110)가 제1 트랜잭션의 디지털 서명을 제1 공개키로 복호화하고, 복호화된 제1 트랜잭션의 디지털 서명 및 제1 트랜잭션을 이용하여 제1 트랜잭션이 제1 클라이언트로부터 유래한 것인지 여부를 검증하는 단계를 더 포함할 수 있다. 또한, 디지털 서명을 검증하는 단계(S300)는, 프로세서(110)가 제2 트랜잭션의 디지털 서명을 제2 공개키로 복호화하고, 복호화된 제2 트랜잭션의 디지털 서명 및 제2 트랜잭션을 이용하여 제2 트랜잭션이 제2 클라이언트로부터 유래한 것인지 여부를 검증하는 단계를 더 포함할 수 있다.In one embodiment, the step of verifying the digital signature (S300), the processor 110 decrypts the digital signature of the first transaction with a first public key, and uses the digital signature and the first transaction of the decrypted first transaction The method may further include verifying whether the first transaction originates from the first client. Also, in the step of verifying the digital signature (S300), the processor 110 decrypts the digital signature of the second transaction with the second public key, and uses the digital signature and the second transaction of the decrypted second transaction to perform the second transaction. The method may further include verifying whether it originated from the second client.

일 실시예에서, 제1 트랜잭션은 제1 암호화폐의 매도할 수량인 제1 매도량 및 제2 암호화폐의 매수할 수량인 제1 매수량을 특정할 수 있고, 제2 트랜잭션은 제2 암호화폐의 매도할 수량인 제2 매도량 및 제1 암호화폐의 매수할 수량인 제2 매수량을 특정할 수 있다.In one embodiment, the first transaction may specify the first selling amount, which is the quantity to be sold of the first cryptocurrency, and the first purchase quantity, which is the quantity to be purchased of the second cryptocurrency, and the second transaction is the selling quantity of the second cryptocurrency. The second purchase quantity, which is the quantity, and the second purchase quantity, which is the quantity to be purchased of the first cryptocurrency, may be specified.

일 실시예에서, 트랜잭션의 유효성을 검증하는 단계(S400)는, 프로세서(110)가 복수의 노드(2) 중 적어도 하나의 노드로부터 제1 클라이언트의 제1 암호화폐의 잔고 정보 및 제2 클라이언트의 제2 암호화폐의 잔고 정보를 획득하는 단계를 포함할 수 있다. 또한, 트랜잭션의 유효성을 검증하는 단계(S400)는, 프로세서(110)가 제1 클라이언트의 제1 암호화폐의 잔고 정보 및 제1 트랜잭션의 제1 매도량을 대비하여, 제1 트랜잭션의 유효성을 검증하는 단계를 더 포함할 수 있다. 또한, 트랜잭션의 유효성을 검증하는 단계(S400)는, 제2 클라이언트의 제2 암호화폐의 잔고 정보 및 제2 트랜잭션의 제2 매도량을 대비하여, 제2 트랜잭션의 유효성을 검증하는 단계를 더 포함할 수 있다.In one embodiment, the step of verifying the validity of the transaction (S400), the processor 110 from the at least one node of the plurality of nodes (2) of the first client's first cryptocurrency balance information and the second client And obtaining the balance information of the second cryptocurrency. Further, in the step of verifying the validity of the transaction (S400), the processor 110 compares the balance information of the first cryptocurrency of the first client and the first selling amount of the first transaction to verify the validity of the first transaction It may further include a step. In addition, the step of verifying the validity of the transaction (S400), further comprising the step of verifying the validity of the second transaction, in preparation for the balance information of the second cryptocurrency of the second client and the second selling amount of the second transaction Can be.

일 실시예에서, 트랜잭션을 매칭하는 방법은, 프로세서(110)가 복수 개의 사용자 클라이언트(3) 중, 획득된 잔고 정보에 기초하여 유효하지 않은 트랜잭션을 미리 정의된 빈도수 이상의 빈도수로 발송하는 사용자 클라이언트를 선별하는 단계를 포함할 수 있다. 또한, 트랜잭션을 매칭하는 방법은, 프로세서(110)가 선별된 사용자 클라이언트의 식별자를 저장하는 단계 및 저장된 식별자에 대응하는 식별자를 가지는 사용자 클라이언트로부터 수신되는 트랜잭션을 다른 트랜잭션과의 매칭에서 배제하는 단계를 더 포함할 수 있다.In one embodiment, the method of matching the transaction, the processor 110, a plurality of user clients (3), based on the obtained balance information, a user client sending an invalid transaction at a frequency equal to or greater than a predefined frequency Screening. In addition, the method of matching the transaction includes the steps of the processor 110 storing the identifier of the selected user client and excluding the transaction received from the user client having the identifier corresponding to the stored identifier from matching with other transactions. It may further include.

일 실시예에서, 제1 트랜잭션과 제2 트랜잭션을 매칭하는 단계(S500)는, 프로세서(110)가 제1 트랜잭션의 제1 매도량 및 제1 매수량에 기초하여 제1 교환율을 도출하는 단계 및 제2 트랜잭션의 제2 매도량 및 제2 매수량에 기초하여 제2 교환율을 도출하는 단계를 포함할 수 있다. 또한 1 트랜잭션과 제2 트랜잭션을 매칭하는 단계(S500)는, 프로세서(110)가 제1 교환율과 제2 교환율이 대응되는 경우(소정의 기준을 만족하는 경우) 제1 트랜잭션과 제2 트랜잭션을 매칭하는 단계를 포함할 수 있다.In one embodiment, matching the first transaction and the second transaction (S500) includes: the processor 110 deriving a first exchange rate based on the first selling amount and the first buying amount of the first transaction, and And deriving a second exchange rate based on the second selling quantity and the second buying quantity of the two transactions. In addition, in step S500 of matching the first transaction and the second transaction, when the first exchange rate and the second exchange rate correspond to the processor 110 (if a predetermined criterion is satisfied), the first transaction and the second transaction It may include the step of matching.

일 실시예에서, 제1 트랜잭션은 제1 트랜잭션의 만료시간에 관한 정보를 더 포함할 수 있다. 또한 제2 트랜잭션은 제2 트랜잭션의 만료시간에 관한 정보를 더 포함할 수 있다.In one embodiment, the first transaction may further include information regarding the expiration time of the first transaction. Also, the second transaction may further include information regarding the expiration time of the second transaction.

일 실시예에서, 트랜잭션의 유효성을 검증하는 단계(S400)는, 프로세서(110)가 제1 트랜잭션의 만료시간에 관한 정보에 기초하여, 제1 트랜잭션이 유효한지 여부를 검증하는 단계를 더 포함할 수 있다. 또한, 트랜잭션의 유효성을 검증하는 단계(S400)는, 프로세서(110)가 제2 트랜잭션의 만료시간에 관한 정보에 기초하여, 제2 트랜잭션이 유효한지 여부를 검증하는 단계를 더 포함할 수 있다.In one embodiment, verifying the validity of the transaction (S400), the processor 110 based on the information on the expiration time of the first transaction, further comprising the step of verifying whether the first transaction is valid Can be. In addition, verifying the validity of the transaction (S400) may further include verifying whether the second transaction is valid based on the information regarding the expiration time of the second transaction.

일 실시예에서, 갱신된 잔고 정보에 기초하여, 제1 암호화폐와 제2 암호화폐는 제1 공개키로 나타내어지는 제1 클라이언트의 제1 주소로 인출될 수 있다. 또한, 갱신된 잔고 정보에 기초하여, 제1 암호화폐와 제2 암호화폐는 제2 공개키로 나타내어지는 제2 클라이언트의 제2 주소로 인출될 수 있다.In one embodiment, based on the updated balance information, the first cryptocurrency and the second cryptocurrency may be fetched to the first address of the first client represented by the first public key. In addition, based on the updated balance information, the first cryptocurrency and the second cryptocurrency may be fetched to the second address of the second client indicated by the second public key.

본 개시의 다양한 실시예들은 기기(machine)가 읽을 수 있는 저장매체(machine-readable storage medium)에 소프트웨어로 구현될 수 있다. 소프트웨어는 본 개시의 다양한 실시예들을 구현하기 위한 소프트웨어일 수 있다. 소프트웨어는 본 개시가 속하는 기술분야의 프로그래머들에 의해 본 개시의 다양한 실시예들로부터 추론될 수 있다. 예를 들어 소프트웨어는 기기가 읽을 수 있는 명령어(예: 코드 또는 코드 세그먼트)를 포함하는 프로그램일 수 있다. 기기는 저장 매체로부터 호출된 명령어에 따라 동작이 가능한 장치로서, 예를 들어 컴퓨터일 수 있다. 일 실시예에서, 기기는 본 개시의 실시예들에 따른 전자 장치(10)일 수 있다. 일 실시예에서, 기기의 프로세서는 호출된 명령어를 실행하여, 기기의 구성요소들이 해당 명령어에 해당하는 기능을 수행하게 할 수 있다. 일 실시예에서, 프로세서는 본 개시의 실시예들에 따른 프로세서(110)일 수 있다. 저장 매체는 기기에 의해 읽혀질 수 있는, 데이터가 저장되는 모든 종류의 기록 매체(recording medium)를 의미할 수 있다. 저장 매체는, 예를 들어 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장장치 등을 포함할 수 있다. 일 실시예에서, 저장 매체는 메모리(120)일 수 있다. 일 실시예에서, 저장매체는 네트워크로 연결된 컴퓨터 시스템 등에 분산된 형태로서 구현될 수도 있다. 소프트웨어는 컴퓨터 시스템 등에 분산되어 저장되고, 실행될 수 있다. 저장 매체는 비일시적(non-transitory) 저장매체일 수 있다. 비일시적 저장매체는, 데이터가 반영구적 또는 임시적으로 저장되는 것과 무관하게 실재하는 매체(tangible medium)를 의미하며, 일시적(transitory)으로 전파되는 신호(signal)를 포함하지 않는다.Various embodiments of the present disclosure may be implemented in software in a machine-readable storage medium. The software can be software for implementing various embodiments of the present disclosure. Software may be inferred from various embodiments of the present disclosure by programmers in the art to which this disclosure pertains. For example, the software may be a program that includes instructions that can be read by a device (eg, code or code segment). The device is a device operable according to instructions called from a storage medium, and may be, for example, a computer. In one embodiment, the device may be an electronic device 10 according to embodiments of the present disclosure. In one embodiment, the device's processor executes the invoked command so that the components of the device perform a function corresponding to the command. In one embodiment, the processor may be the processor 110 according to embodiments of the present disclosure. A storage medium can mean any kind of recording medium in which data is stored, which can be read by a device. The storage medium may include, for example, ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like. In one embodiment, the storage medium may be memory 120. In one embodiment, the storage medium may be implemented as a distributed form such as a computer system connected by a network. The software may be distributed and stored in a computer system or the like and executed. The storage medium may be a non-transitory storage medium. A non-transitory storage medium means a tangible medium irrespective of whether data is stored semi-permanently or temporarily, and does not include a signal propagated in transitory.

이상 다양한 실시예들에 의해 본 개시의 기술적 사상이 설명되었지만, 본 개시의 기술적 사상은 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 이해할 수 있는 범위에서 이루어질 수 있는 다양한 치환, 변형 및 변경을 포함한다. 또한, 그러한 치환, 변형 및 변경은 첨부된 청구범위 내에 포함될 수 있는 것으로 이해되어야 한다.Although the technical spirit of the present disclosure has been described by various embodiments above, the technical spirit of the present disclosure makes various substitutions, modifications, and changes that can be made within a range understood by those skilled in the art to which this disclosure belongs. Includes. In addition, it should be understood that such substitutions, modifications and variations can be included within the scope of the appended claims.

Claims (13)

복수의 사용자 클라이언트 및 블록 체인 네트워크 상에서 암호화폐 교환을 위한 스마트 컨트랙트(smart contract)를 실행하는 하나 이상의 노드(node)와 통신하는 전자 장치에 있어서,
상기 복수의 사용자 클라이언트로부터 획득한, 복수의 암호화폐 중 적어도 두 개의 암호화폐를 교환하기 위한 트랜잭션(transaction)들을 저장하는 메모리; 및
상기 복수의 사용자 클라이언트 중 제1 클라이언트로부터, 제1 암호화폐를 제2 암호화폐와 교환하기 위한 제1 트랜잭션을 획득하고,
상기 복수의 사용자 클라이언트 중 제2 클라이언트로부터, 상기 제2 암호화폐를 상기 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 획득하고,
상기 제1 트랜잭션에 기초하여, 상기 제1 암호화폐의 상기 제2 암호화폐에 대한 상기 제1 트랜잭션의 제1 교환율을 도출하고,
상기 제2 트랜잭션에 기초하여, 상기 제2 암호화폐의 상기 제1 암호화폐에 대한 상기 제2 트랜잭션의 제2 교환율을 도출하고,
상기 제1 교환율 및 상기 제2 교환율에 기초하여, 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭(matching)하고,
상기 매칭된 제1 트랜잭션 및 제2 트랜잭션을 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 중 하나로 전달하는 프로세서를 포함하는, 전자 장치.
In an electronic device communicating with a plurality of user clients and one or more nodes executing a smart contract for the exchange of cryptocurrency on a blockchain network,
A memory storing transactions for exchanging at least two cryptocurrencies among the plurality of cryptocurrencies obtained from the plurality of user clients; And
Obtaining a first transaction for exchanging a first cryptocurrency with a second cryptocurrency from a first client of the plurality of user clients,
Obtaining a second transaction for exchanging the second cryptocurrency with the first cryptocurrency from a second client among the plurality of user clients,
Deriving a first exchange rate of the first transaction with respect to the second cryptocurrency of the first cryptocurrency based on the first transaction,
Deriving a second exchange rate of the second transaction for the first cryptocurrency of the second cryptocurrency based on the second transaction,
Matching the first transaction and the second transaction based on the first exchange rate and the second exchange rate,
And a processor that delivers the matched first transaction and second transaction to one of the one or more nodes on the blockchain network.
제1항에 있어서, 상기 프로세서는,
상기 하나 이상의 노드 중 한 노드로부터, 상기 복수의 사용자 클라이언트의 상기 복수의 암호화폐에 대한 잔고 정보를 획득하고,
상기 잔고 정보에 기초하여, 상기 복수의 사용자 클라이언트 중, 유효하지 않은 트랜잭션을 미리 정의된 빈도수(frequency) 이상의 빈도수로 발송하는 사용자 클라이언트를 선별하고,
상기 선별된 사용자 클라이언트로부터 수신되는 트랜잭션을 다른 트랜잭션과의 매칭에서 배제하는, 전자 장치.
The method of claim 1, wherein the processor,
Acquire balance information for the plurality of cryptocurrencies of the plurality of user clients from one of the one or more nodes,
Based on the balance information, among the plurality of user clients, a user client that sends an invalid transaction at a frequency equal to or greater than a predefined frequency is selected, and
An electronic device excluding a transaction received from the selected user client from matching with another transaction.
제1항에 있어서, 상기 프로세서는,
상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는, 전자 장치.
The method of claim 1, wherein the processor,
An electronic device for validating the first transaction and the second transaction.
제3항에 있어서,
상기 제1 트랜잭션은 상기 제1 클라이언트의 제1 개인키로 디지털 서명되고, 상기 제2 트랜잭션은 상기 제2 클라이언트의 제2 개인키로 디지털 서명되고,
상기 프로세서는,
상기 제1 개인키에 대응되는 제1 공개키 및 상기 제2 개인키에 대응되는 제2 공개키에 기초하여, 각각 상기 제1 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션의 디지털 서명을 검증하는, 전자 장치.
According to claim 3,
The first transaction is digitally signed with the first private key of the first client, and the second transaction is digitally signed with the second private key of the second client,
The processor,
And verifying the digital signature of the first transaction and the digital signature of the second transaction, respectively, based on the first public key corresponding to the first private key and the second public key corresponding to the second private key. Device.
제3항에 있어서, 상기 프로세서는,
상기 하나 이상의 노드 중 한 노드로부터, 상기 제1 클라이언트의 상기 제1 암호화폐에 대한 잔고 정보 및 상기 제2 클라이언트의 상기 제2 암호화폐에 대한 잔고 정보를 획득하고,
상기 잔고 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는, 전자 장치.
The method of claim 3, wherein the processor,
Obtains balance information on the first cryptocurrency of the first client and balance information on the second cryptocurrency of the second client from one of the one or more nodes,
An electronic device that verifies the validity of the first transaction and the second transaction based on the balance information.
제3항에 있어서, 상기 프로세서는,
상기 제1 트랜잭션 및 상기 제2 트랜잭션 각각으로부터, 상기 제1 트랜잭션의 만료시간에 관한 정보 및 상기 제2 트랜잭션의 만료시간에 관한 정보를 획득하고,
상기 만료시간에 관한 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는, 전자 장치.
The method of claim 3, wherein the processor,
Acquire information about the expiration time of the first transaction and information about the expiration time of the second transaction from each of the first transaction and the second transaction,
An electronic device that verifies the validity of the first transaction and the second transaction based on the information on the expiration time.
복수의 암호화폐 중 적어도 두 개의 암호화폐를 교환하기 위한 트랜잭션들을 발행하는 복수의 사용자 클라이언트 및 블록 체인 네트워크 상에서 암호화폐 교환을 위한 스마트 컨트랙트를 실행하는 하나 이상의 노드와 통신하며, 메모리 및 프로세서를 포함하는 전자 장치에서 수행되는 방법에 있어서,
상기 프로세서가, 상기 복수의 사용자 클라이언트 중 제1 클라이언트로부터, 제1 암호화폐를 제2 암호화폐와 교환하기 위한 제1 트랜잭션을 획득하는 단계;
상기 프로세서가, 상기 복수의 사용자 클라이언트 중 제2 클라이언트로부터, 상기 제2 암호화폐를 상기 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 획득하는 단계;
상기 프로세서가, 상기 제1 트랜잭션에 기초하여, 상기 제1 암호화폐의 상기 제2 암호화폐에 대한 상기 제1 트랜잭션의 제1 교환율을 도출하는 단계;
상기 프로세서가, 상기 제2 트랜잭션에 기초하여, 상기 제2 암호화폐의 상기 제1 암호화폐에 대한 상기 제2 트랜잭션의 제2 교환율을 도출하는 단계;
상기 프로세서가, 상기 제1 교환율 및 상기 제2 교환율에 기초하여, 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭하는 단계; 및
상기 프로세서가, 상기 매칭된 제1 트랜잭션 및 제2 트랜잭션을 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 중 하나로 전달하는 단계를 포함하는, 방법.
A plurality of user clients issuing transactions for exchanging at least two cryptocurrencies among a plurality of cryptocurrencies and one or more nodes executing smart contracts for exchanging cryptocurrencies on a blockchain network, including memory and processors In the method performed in the electronic device,
Obtaining, by the processor, a first transaction for exchanging a first cryptocurrency with a second cryptocurrency from a first client among the plurality of user clients;
The processor obtaining a second transaction for exchanging the second cryptocurrency with the first cryptocurrency from a second client of the plurality of user clients;
Deriving, by the processor, a first exchange rate of the first transaction for the second cryptocurrency of the first cryptocurrency based on the first transaction;
Deriving, by the processor, a second exchange rate of the second transaction for the first cryptocurrency of the second cryptocurrency based on the second transaction;
The processor matching the first transaction and the second transaction based on the first exchange rate and the second exchange rate; And
And the processor passing the matched first transaction and second transaction to one of the one or more nodes on the blockchain network.
제7항에 있어서, 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭하는 단계는,
상기 프로세서가, 상기 하나 이상의 노드 중 한 노드로부터, 상기 복수의 사용자 클라이언트의 상기 복수의 암호화폐에 대한 잔고 정보를 획득하는 단계;
상기 프로세서가, 상기 잔고 정보에 기초하여, 상기 복수의 사용자 클라이언트 중, 유효하지 않은 트랜잭션을 미리 정의된 빈도수 이상의 빈도수로 발송하는 사용자 클라이언트를 선별하는 단계; 및
상기 선별된 사용자 클라이언트로부터 수신되는 트랜잭션을 다른 트랜잭션과의 매칭에서 배제하는 단계를 포함하는, 방법.
The method of claim 7, wherein matching the first transaction and the second transaction comprises:
The processor, from one of the one or more nodes, obtaining the balance information for the plurality of cryptocurrency of the plurality of user clients;
Selecting, by the processor, a user client sending an invalid transaction at a frequency equal to or greater than a predefined frequency from among the plurality of user clients based on the balance information; And
And excluding the transaction received from the selected user client from matching with another transaction.
제7항에 있어서,
상기 프로세서가, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계를 더 포함하는, 방법.
The method of claim 7,
And the processor further comprising validating the first transaction and the second transaction.
제9항에 있어서, 상기 제1 트랜잭션은 상기 제1 클라이언트의 제1 개인키로 디지털 서명되고, 상기 제2 트랜잭션은 상기 제2 클라이언트의 제2 개인키로 디지털 서명되고,
상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계는,
상기 프로세서가, 상기 제1 개인키에 대응되는 제1 공개키 및 상기 제2 개인키에 대응되는 제2 공개키에 기초하여, 각각 상기 제1 트랜잭션의 디지털 서명 및 상기 제2 트랜잭션의 디지털 서명을 검증하는 단계를 포함하는, 방법.
The method of claim 9, wherein the first transaction is digitally signed with the first private key of the first client, the second transaction is digitally signed with the second private key of the second client,
The step of validating the first transaction and the second transaction may include:
The processor performs digital signature of the first transaction and digital signature of the second transaction, respectively, based on the first public key corresponding to the first private key and the second public key corresponding to the second private key. A method comprising verifying.
제9항에 있어서, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계는,
상기 프로세서가, 상기 하나 이상의 노드 중 한 노드로부터, 상기 제1 클라이언트의 상기 제1 암호화폐에 대한 잔고 정보 및 상기 제2 클라이언트의 상기 제2 암호화폐에 대한 잔고 정보를 획득하는 단계; 및,
상기 프로세서가, 상기 잔고 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계를 포함하는, 방법.
The method of claim 9, wherein validating the first transaction and the second transaction comprises:
The processor, from one of the one or more nodes, obtaining balance information for the first cryptocurrency of the first client and balance information for the second cryptocurrency of the second client; And,
And the processor verifying validity of the first transaction and the second transaction based on the balance information.
제9항에 있어서, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계는,
상기 프로세서가, 상기 제1 트랜잭션 및 상기 제2 트랜잭션 각각으로부터, 상기 제1 트랜잭션의 만료시간에 관한 정보 및 상기 제2 트랜잭션의 만료시간에 관한 정보를 획득하는 단계; 및
상기 프로세서가, 상기 만료시간에 관한 정보에 기초하여, 상기 제1 트랜잭션 및 상기 제2 트랜잭션의 유효성을 검증하는 단계를 포함하는, 방법.
The method of claim 9, wherein validating the first transaction and the second transaction comprises:
Acquiring, by the processor, information regarding an expiration time of the first transaction and information about an expiration time of the second transaction from each of the first transaction and the second transaction; And
And the processor verifying validity of the first transaction and the second transaction based on the information regarding the expiration time.
복수의 암호화폐 중 적어도 두 개의 암호화폐를 교환하기 위한 트랜잭션들을 발행하는 복수의 사용자 클라이언트 및 블록 체인 네트워크 상에서 암호화폐 교환을 위한 스마트 컨트랙트를 실행하는 하나 이상의 노드와 통신하는 컴퓨터 상에서 수행되기 위한 프로그램을 기록한 비일시적 컴퓨터 판독 가능 기록 매체에 있어서,
상기 프로그램은, 프로세서에 의한 실행 시, 상기 프로세서가,
상기 복수의 사용자 클라이언트 중 제1 클라이언트로부터, 제1 암호화폐를 제2 암호화폐와 교환하기 위한 제1 트랜잭션을 획득하고,
상기 복수의 사용자 클라이언트 중 제2 클라이언트로부터, 상기 제2 암호화폐를 상기 제1 암호화폐와 교환하기 위한 제2 트랜잭션을 획득하고,
상기 제1 트랜잭션에 기초하여, 상기 제1 암호화폐의 상기 제2 암호화폐에 대한 상기 제1 트랜잭션의 제1 교환율을 도출하고,
상기 제2 트랜잭션에 기초하여, 상기 제2 암호화폐의 상기 제1 암호화폐에 대한 상기 제2 트랜잭션의 제2 교환율을 도출하고,
상기 제1 교환율 및 상기 제2 교환율에 기초하여, 상기 제1 트랜잭션과 상기 제2 트랜잭션을 매칭하고,
상기 매칭된 제1 트랜잭션 및 제2 트랜잭션을 상기 블록 체인 네트워크 상의 상기 하나 이상의 노드 중 하나로 전달하도록 하는 실행 가능한 명령을 포함하는, 컴퓨터 판독 가능한 기록 매체.
A program for executing on a computer communicating with one or more nodes executing a smart contract for cryptocurrency exchange on a blockchain network and a plurality of user clients issuing transactions for exchanging at least two cryptocurrencies among a plurality of cryptocurrencies. A recorded non-transitory computer-readable recording medium,
When the program is executed by the processor, the processor,
Obtaining a first transaction for exchanging a first cryptocurrency with a second cryptocurrency from a first client of the plurality of user clients,
Obtaining a second transaction for exchanging the second cryptocurrency with the first cryptocurrency from a second client of the plurality of user clients,
Deriving a first exchange rate of the first transaction with respect to the second cryptocurrency of the first cryptocurrency based on the first transaction,
Based on the second transaction, deriving a second exchange rate of the second transaction relative to the first cryptocurrency of the second cryptocurrency,
Matching the first transaction and the second transaction based on the first exchange rate and the second exchange rate,
And executable instructions to direct the matched first transaction and second transaction to one of the one or more nodes on the blockchain network.
KR1020190054796A 2019-05-10 2019-05-10 Apparatus for matching transactions for exchanging cryptocurrencies and method thereof KR102123487B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190054796A KR102123487B1 (en) 2019-05-10 2019-05-10 Apparatus for matching transactions for exchanging cryptocurrencies and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190054796A KR102123487B1 (en) 2019-05-10 2019-05-10 Apparatus for matching transactions for exchanging cryptocurrencies and method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020180089983A Division KR101979254B1 (en) 2018-08-01 2018-08-01 Apparatus for matching transactions for exchanging cryptocurrencies and method thereof

Publications (2)

Publication Number Publication Date
KR20200014682A KR20200014682A (en) 2020-02-11
KR102123487B1 true KR102123487B1 (en) 2020-06-16

Family

ID=69569069

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190054796A KR102123487B1 (en) 2019-05-10 2019-05-10 Apparatus for matching transactions for exchanging cryptocurrencies and method thereof

Country Status (1)

Country Link
KR (1) KR102123487B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946864B (en) * 2021-10-15 2024-03-19 北京智融云河科技有限公司 Confidential information acquisition method, device, equipment and storage medium
KR102443198B1 (en) * 2022-05-31 2022-09-14 김인호 Cryptocurrency exchange platform management system and operation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101628624B1 (en) 2015-06-01 2016-06-09 주식회사 코인플러그 System and method for global remittance service based on the bitcoin
KR101876674B1 (en) 2017-04-18 2018-07-10 주식회사 케이뱅크은행 Method of managing common account using block chain and system performing the same
JP2018518758A (en) 2015-05-21 2018-07-12 マスターカード インターナシヨナル インコーポレーテツド Method and system for integrating exchange processing and issuer processing for blockchain based transactions
KR101878869B1 (en) 2017-11-17 2018-08-16 주식회사 미탭스플러스 Distributed Ledger Device and Distributed Ledger Method for User Identification Management Based on Block Chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018518758A (en) 2015-05-21 2018-07-12 マスターカード インターナシヨナル インコーポレーテツド Method and system for integrating exchange processing and issuer processing for blockchain based transactions
KR101628624B1 (en) 2015-06-01 2016-06-09 주식회사 코인플러그 System and method for global remittance service based on the bitcoin
KR101876674B1 (en) 2017-04-18 2018-07-10 주식회사 케이뱅크은행 Method of managing common account using block chain and system performing the same
KR101878869B1 (en) 2017-11-17 2018-08-16 주식회사 미탭스플러스 Distributed Ledger Device and Distributed Ledger Method for User Identification Management Based on Block Chain

Also Published As

Publication number Publication date
KR20200014682A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
US11531981B2 (en) Digital contracts in blockchain environments
US10592985B2 (en) Systems and methods for a commodity contracts market using a secure distributed transaction ledger
US10491378B2 (en) Decentralized nodal network for providing security of files in distributed filesystems
KR101979254B1 (en) Apparatus for matching transactions for exchanging cryptocurrencies and method thereof
US10445709B2 (en) Real time virtual draft system and method
US10592642B2 (en) Systems and methods for decentralized content distribution
US9967334B2 (en) Computing device configuration and management using a secure decentralized transaction ledger
US20200211092A1 (en) Adaptive product listing using blockchain inventory and smart contracts
EP3439231A1 (en) Private node, processing method for private node, and program for same
US9530126B2 (en) Secure mobile payment processing
US20160148198A1 (en) Secure crypto currency point-of-sale (pos) management
US11133936B1 (en) Methods and systems for introducing self-contained intent functionality into decentralized computer networks
US11381632B2 (en) Method and system for transferring data
US20220052921A1 (en) Methods and systems for introducing self-contained intent functionality into decentralized computer networks
US11329819B2 (en) Information processing system, method for changing public key, program, and method for building information processing system
US20200402026A1 (en) Blockchain management system, blockchain management apparatus, information providing apparatus, and blockchain management method
US20230108366A1 (en) Systems for encryption using blockchain distributed ledgers
KR102123487B1 (en) Apparatus for matching transactions for exchanging cryptocurrencies and method thereof
CN117616410A (en) Multiparty computing in a computer slicing environment
US20230298001A1 (en) Non-fungible token (nft) purchase and transfer system
US20200153637A1 (en) Information processing system, method for providing data, and method for building information processing system
KR20200000595A (en) Blockchain based certificate management method and device, server and system thereof
KR20190114292A (en) Ready Pending trading system based electronic wallet and method for trading the same
US10972349B1 (en) Cryptographic verification of data inputs for executables on a network
KR20190130377A (en) Network server mediating game item transaction between user terminals and method of operating thereof

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant