Method and apparatus for automatically providing liquidity for virtual asset transaction
The automated liquidity supply method and device address the lack of liquidity in virtual asset trading by using a liquidity pool to generate real-time exchange ratios and present virtual trading orders on an order book, enhancing market convenience and stability.
Patent Information
- Application Number
- PCT/KR2024/095443
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-22
- Filing Date
- 2024-02-26
- Publication Date
- 2024-09-12
AI Technical Summary
The virtual asset trading market on blockchain networks faces challenges such as lack of liquidity, slow processing speed, and high gas fees, which hinder transaction volume and market maturity, necessitating a solution for continuous liquidity supply in a decentralized manner.
An automated liquidity supply method and device that utilize a liquidity pool to generate real-time exchange ratios between virtual assets, creating virtual trading orders and presenting them on an order book, ensuring immediate execution of matching user orders, thereby maintaining market liquidity and facilitating order book-based trading.
This approach enhances transaction convenience, revitalizes the virtual asset trading market by providing continuous liquidity, adapting to market conditions, and ensuring smooth trading operations despite low transaction volumes.
Smart Images

Figure KR2024095443_12092024_PF_FP_ABST
Abstract
Description
Method and device for automatically providing liquidity for virtual asset trading
[0001] The present disclosure relates to a method and device for automatically supplying liquidity to a virtual asset trading market, and more specifically, to a method and device for preventing liquidity shortages in a virtual asset trading market and activating virtual asset trading on a blockchain network by providing users with virtual trading orders created using an automated liquidity provider in the virtual asset trading market in the form of an order book.
[0002] The content described below merely provides background information related to the present embodiment and does not constitute prior art.
[0003] With the rapid development of blockchain-based decentralized finance (DeFi), financial transactions using virtual assets are becoming more active. In particular, as diverse types of virtual assets emerge, demand for transactions that allow them to be exchanged is steadily increasing.
[0004] For trading these virtual assets, real-time order book-based trading, similar to that used in existing securities trading, can be utilized. However, utilizing these order books for virtual asset trading presents challenges not only with blockchain-related characteristics like slow processing speeds and high gas fees for transaction processing, but also with limited trading volume, i.e., market liquidity. In particular, in the virtual asset trading market, which is still in its early stages of development and not yet fully matured, this lack of liquidity can be a significant obstacle to market activity.
[0005] To address this liquidity shortage and foster a healthy market environment, an automated market maker (AMM) is used instead of order book-based real-time trading. An AMM is a protocol that provides liquidity based on the trading price of a virtual asset, determined by a pre-set algorithm. In other words, since the trading price of a virtual asset in the market is automatically determined by an algorithm that allows the price to fluctuate under fixed liquidity conditions, problems caused by insufficient liquidity, such as price distortions or failure to conduct transactions, can be alleviated.
[0006] However, despite the emergence of automated market makers, market demand for order book-based trading persists due to its various advantages: user-friendliness, the ability for market participants to actively submit prices, and the ability to monitor market movements in real time. Therefore, there is a need to develop a new virtual asset trading method that enables continuous liquidity provision in a decentralized manner while also enabling order book-based trading on the blockchain.
[0007] A liquidity automatic supply method and device according to one embodiment obtains a real-time exchange rate of a second virtual asset for a first virtual asset from at least one liquidity pool existing on a blockchain network, and generates a virtual transaction order to trade the first virtual asset for the second virtual asset based on the real-time exchange rate, and continuously presents the virtual transaction order on an order book, so that when a user transaction order matching the virtual transaction order occurs, the transaction can be immediately executed.
[0008] The problems to be solved by the present invention are not limited to the problems mentioned above, and other problems not mentioned will be clearly understood by those skilled in the art from the description below.
[0009] According to one embodiment of the present disclosure, a liquidity automatic supply method performed in a virtual asset trading system for trading a first virtual asset with a second virtual asset is provided, the method including: obtaining a real-time exchange rate of a second virtual asset for a preset quantity of the first virtual asset from at least one liquidity pool; generating a virtual transaction order for trading the first virtual asset with the second virtual asset based on the real-time exchange rate; presenting the virtual transaction order on an order book; and executing a transaction corresponding to a user transaction order when a user transaction order matching the virtual transaction order occurs.
[0010] According to another embodiment of the present disclosure, a liquidity automatic supply device is provided, comprising: a memory storing one or more instructions; and a processor executing the one or more instructions stored in the memory, wherein the processor, by executing the one or more instructions, obtains a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from at least one liquidity pool, creates a virtual transaction order to trade the first virtual asset for the second virtual asset based on the real-time exchange rate, and presents the virtual transaction order on an order book.
[0011] In one embodiment, a virtual asset trading system is provided that enables continuous liquidity supply in a decentralized manner by creating virtual trading orders using a liquidity pool on a blockchain network, while also enabling order book-based trading on the blockchain, thereby providing transaction convenience to users of the virtual asset trading market and further activating the virtual asset trading market.
[0012] FIG. 1 is a schematic diagram of a virtual asset trading system in which an automatic liquidity supply method according to one embodiment of the present disclosure is performed.
[0013] FIG. 2 is a diagram illustrating a process of presenting a virtual transaction order generated by an automatic liquidity supply method according to one embodiment of the present disclosure on an order book.
[0014] FIG. 3 is a diagram for explaining a process for executing a virtual asset transaction according to one embodiment of the present disclosure.
[0015] FIG. 4 is a block diagram showing an automatic liquid supply device according to one embodiment of the present disclosure.
[0016] Figure 5 is a flowchart of an automatic liquidity supply method according to one embodiment of the present disclosure.
[0017] Hereinafter, some embodiments of the present disclosure will be described in detail using exemplary drawings. When designating components in each drawing, it should be noted that, where possible, identical components are given the same reference numerals, even if they appear in different drawings. Furthermore, when describing the present disclosure, detailed descriptions of related known structures or functions will be omitted if they are deemed to obscure the gist of the present disclosure.
[0018] When describing components of embodiments according to the present disclosure, references such as first, second, etc. may be used. These references are merely intended to distinguish the components from other components and are not intended to limit the nature, order, or sequence of the components. When a part of the specification is said to "include" or "have" a component, this does not mean that other components are excluded, but rather that other components may be included, unless explicitly stated otherwise.
[0019] FIG. 1 is a schematic diagram of a virtual asset trading system in which an automatic liquidity supply method according to one embodiment of the present disclosure is performed.
[0020] Referring to FIG. 1, a virtual asset trading system (10) may include an automatic liquidity supply device (100), a liquidity pool (300), and a user terminal (2). Here, the automatic liquidity supply device (100) includes an automated liquidity provider (110) and an order book (120). The automatic liquidity supply device (100), the liquidity pool (300), and the user terminal (2) may be implemented in the form of a Decentralized Application (DApp) on a single blockchain network (blockchain network) (1), and may be interconnected through the blockchain network (1) to exchange data.
[0021] The virtual asset trading system (10) may be a blockchain network-based trading platform for selling or buying a first virtual asset for a second virtual asset, which is a different type of virtual asset. Here, the virtual asset includes a cryptocurrency or a fungible token that can be exchanged based on its exchange value. For example, the virtual asset may be any one of various blockchain-based cryptocurrencies, such as Bitcoin (BTC), Ethereum (ETH), Ripple (XRP), etc., or a fungible token, such as an ERC-20-based token.
[0022] That is, the virtual asset trading system (10) may have one or more buy orders that provide a second virtual asset in a quantity corresponding to a first virtual asset and seek to acquire the first virtual asset, and one or more sell orders that provide the first virtual asset and seek to acquire the second virtual asset in a quantity corresponding to the first virtual asset. Here, the quantity of each order is determined by the quantity of the first virtual asset to be sold or purchased, and the price of each order is determined by the quantity of the second virtual asset corresponding to the order quantity. Users of the virtual asset trading system (10) may submit a desired transaction order using a user terminal (2) or conclude a transaction by providing a virtual asset corresponding to the submitted transaction order, thereby realizing an exchange between two different types of virtual assets, that is, the first virtual asset and the second virtual asset.
[0023] A liquidity pool (300) is a virtual asset pool of an automated market maker (AMM) protocol in which a certain quantity of two different types of virtual assets are deposited to continuously supply liquidity to virtual asset transactions on a blockchain network (1).
[0024] Specifically, participants in the first virtual asset trading market may include users seeking to sell or buy the first virtual asset, as well as liquidity providers who deposit their virtual assets in a liquidity pool (300) and receive compensation for their deposits. For example, liquidity providers deposit at least one of the first virtual asset and the second virtual asset into the liquidity pool (300) for the first and second virtual assets via the blockchain network (1).
[0025] The AMM protocol can provide a transaction where one virtual asset, either a first virtual asset or a second virtual asset, within a liquidity pool can be exchanged for another at an exchange rate determined by a preset algorithm. For example, a liquidity pool (300) containing a first virtual asset and a second virtual asset can return a corresponding amount of the second virtual asset when a certain amount of the first virtual asset is provided, at an exchange rate determined by a preset algorithm.
[0026] An automated liquidity supply device (100) can continuously provide liquidity to a virtual asset trading system (10). Specifically, an automated liquidity provider (110) of the automated liquidity supply device (100) obtains a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from one or more liquidity pools (300) existing on a blockchain network (1). Here, the preset quantity is a preset order quantity of the first virtual asset for a virtual trading order. The preset quantity may be determined based on a spread ratio for the virtual trading order, which will be described in more detail later.
[0027] The real-time exchange rate is determined by a preset algorithm based on the quantity ratio of two different virtual assets that make up the liquidity pool (300). The AMM protocol for the liquidity pool (300) maintains the overall liquidity of the liquidity pool through a preset algorithm and provides trading liquidity for each of the first and second virtual assets.
[0028] In one embodiment, if the liquidity pool (300) is comprised of a first virtual asset and a second virtual asset, the automated liquidity provider (110) obtains the quantity ratio of the two virtual assets in the liquidity pool comprised of the first virtual asset and the second virtual asset. Thereafter, the automated liquidity provider (110) calculates the quantity of the second virtual asset corresponding to the preset quantity of the first virtual asset based on the obtained quantity ratio and a preset algorithm.
[0029] According to another embodiment, the automated liquidity provider (110) may obtain a real-time exchange rate between a first virtual asset and a third virtual asset, and a real-time exchange rate between a third virtual asset and a second virtual asset from at least one liquidity pool, and calculate a real-time exchange rate of the second virtual asset for the first virtual asset based on these.
[0030] Specifically, in addition to liquidity pools for the first and second virtual assets, a blockchain network (1) may also contain liquidity pools comprised of other virtual assets. For example, a liquidity pool containing deposits for the second and third virtual assets may exist, as well as a liquidity pool containing deposits for the third and first virtual assets.
[0031] Since the real-time exchange rate for the liquidity pool may vary depending on the increase or decrease in the quantity of virtual assets constituting the liquidity pool, a more advantageous real-time exchange rate may be provided when the second virtual asset is exchanged for a third virtual asset in the liquidity pool for the second virtual asset and the third virtual asset, and the exchanged third virtual asset is exchanged for the first virtual asset in the liquidity pool for the third virtual asset and the first virtual asset, than when the first virtual asset and the second virtual asset are directly exchanged in the liquidity pool for the first virtual asset and the third virtual asset. Accordingly, the automated liquidity provider (110) may obtain the real-time exchange rate for the second virtual asset and the third virtual asset, and the real-time exchange rate for the third virtual asset and the first virtual asset from the liquidity provider, and may also calculate the real-time exchange rate for the first virtual asset and the first virtual asset.
[0032] An automated liquidity provider (110) generates a virtual trading order to trade the first virtual asset for the second virtual asset based on the acquired real-time exchange rate and presents it on the order book (120). Here, the virtual trading order includes a first virtual trading order to sell the first virtual asset and a second virtual trading order to buy the first virtual asset.
[0033] An automated liquidity provider (110) determines a virtual sell price and a virtual buy price of a first virtual asset converted into a quantity of a second virtual asset based on a real-time exchange rate in a liquidity pool (300).
[0034] Here, the virtual ask price refers to the ask price per unit quantity of the first virtual asset corresponding to the first virtual transaction order. The automated liquidity provider (110) calculates the unit ask price of the first virtual asset based on the real-time exchange rate, that is, the quantity of the second virtual asset that can be received in return for providing one first virtual asset from the liquidity pool (300), and then determines the smallest value as the virtual ask price among the values that are positive integer multiples of the preset ask price unit (tick size) of the first virtual asset that are greater than or equal to the calculated unit ask price.
[0035] Here, the bid price unit is the minimum bid unit. All trading orders for the first virtual asset must have a value that is a positive integer multiple of the bid price unit. The bid price unit may be set differently depending on the type of the first and second virtual assets.
[0036] Conversely, the virtual bid price refers to the buy order price per unit quantity of the first virtual asset corresponding to the first virtual transaction order. The automated liquidity provider (110) calculates the unit buy price of the first virtual asset calculated based on the real-time exchange rate, i.e., the quantity of the second virtual asset that must be provided to receive one first virtual asset from the liquidity pool (300), and then determines the largest value as the virtual buy price among values that are positive integer multiples of the preset bid price unit of the first virtual asset that are less than or equal to the calculated unit buy price.
[0037] An automated liquidity provider (110) generates a first virtual transaction order to sell the first virtual asset based on a virtual ask price and a preset quantity, and generates a second virtual transaction order to purchase the first virtual asset based on a virtual buy price and a preset quantity. That is, the first virtual transaction order is a transaction order to sell the first virtual asset in a preset quantity at a selling price of the second virtual asset in a quantity corresponding to the virtual ask price, and the second virtual transaction order is an order to purchase the first virtual asset in a preset quantity at a buying price of the second virtual asset in a quantity corresponding to the virtual buy price.
[0038] Here, the preset quantity is determined as an amount that makes the current spread ratio determined based on the first virtual transaction order and the second virtual transaction order smaller than the preset spread ratio. Specifically, the ask price of the first virtual transaction order forms the lowest ask price, and the bid price of the second virtual transaction order forms the highest ask price. However, if the spread ratio between the ask and bid prices becomes excessively large, trading of the first virtual asset may become strained. Therefore, the automated liquidity provider (110) can dynamically determine the quantities for the first virtual transaction order and the second virtual transaction order so that the current spread ratio determined based on the ask price of the first virtual transaction order and the bid price of the second virtual transaction order remains smaller than the preset spread ratio. In other words, the preset quantity is a value that fluctuates depending on the current situation of the first virtual asset trading market, and the automated liquidity provider (110) can adaptively adjust the preset quantity so that trading of the first virtual asset can proceed smoothly.
[0039] The automated liquidity provider (110) transmits the generated first virtual trading order and second virtual trading order to the order book (120). The order book (120) presents the first virtual trading order and second virtual trading order to the user using the order book.
[0040] The order book (120) includes a sell order window displaying sell orders for the first virtual asset and a buy order window displaying buy orders for the first virtual asset. The first virtual transaction order may be displayed in the sell order window, and the second virtual transaction order may be displayed in the buy order window. Here, virtual transaction orders may always exist in the order book, but this is not limited to this, and not only virtual transaction orders generated by an automated liquidity provider (110) but also limit order transaction orders submitted from a user terminal (2) may exist. In this case, the sell order window and buy order window of the order book (120) display virtual transaction orders and limit order transaction orders submitted by the user together.
[0041] A user can submit a user transaction order matching a virtual transaction order via a user terminal (2). For example, a user can submit a buy order for the first virtual asset by transferring a quantity of a second virtual asset corresponding to the price of the first virtual transaction order to the first virtual transaction order contract. The first virtual transaction order contract in the order book (120) automatically executes the transaction in response to the user's buy order.
[0042] An automated liquidity provider (110) transfers a second virtual asset provided by a user to a liquidity pool (300). The liquidity pool (300) exchanges the second virtual asset provided by the user for a quantity of a first virtual asset determined by a real-time exchange rate according to the user's transaction order and transfers the exchanged second virtual asset to the automated liquidity provider (110). The order book (120) completes the first virtual transaction order by transferring to the user an quantity corresponding to the user's transaction order from the total quantity of the first virtual asset transferred from the liquidity pool (300).
[0043] As described above, in the virtual asset trading system (10), a seller or buyer who wishes to trade a first virtual asset can use a user terminal (2) to check the first virtual trading order and the second virtual trading order, which are virtual trading orders visualized in the order book (120) bid / ask window, and submit a transaction for the corresponding user trading order, thereby enabling trading of the first virtual asset. In other words, even if there are no trading orders from other users in the virtual asset trading system (10), a transaction can be concluded through a virtual trading order that is constantly present.
[0044] Here, the user terminal (2) may be a fixed computing device such as a PC or a mobile computing device such as a smartphone, laptop, tablet PC, etc., but is not limited thereto, and any computing device including software necessary to perform the function of a user node in a virtual asset transaction system (10) based on a blockchain network is sufficient.
[0045] FIG. 2 is a diagram illustrating a process of presenting a virtual transaction order generated by an automatic liquidity supply method according to one embodiment of the present disclosure on an order book.
[0046] Referring to FIG. 2, the liquidity automatic supply device (100) requests the DEX Aggregator (350) for a real-time exchange rate between the first virtual asset and the second virtual asset. The DEX Aggregator (350) is an external module that collects real-time exchange rates from various decentralized exchanges (DEXs) that provide exchange transactions of virtual assets on a blockchain network, i.e., various liquidity pools, and provides a real-time exchange rate for specific two virtual assets requested by the liquidity automatic supply device (100) based on the collected exchange rate, or can transfer one virtual asset to the liquidity pool and receive a corresponding other virtual asset.
[0047] The DEX Aggregator (350) can collect real-time exchange rates for each of the first liquidity pool (310) for the first virtual asset and the second virtual asset, the second liquidity pool (320) for the second virtual asset and the third virtual asset, and the third liquidity pool (330) for the first virtual asset and the third virtual asset, and transmit them to the liquidity automatic supply device (100).
[0048] The automatic liquidity supply device (100) may generate a virtual transaction order to trade a first virtual asset for a second virtual asset based on the real-time exchange rate for the first liquidity pool (310), but is not limited thereto. According to another embodiment, the automatic liquidity supply device (100) may calculate an indirect exchange rate between the first virtual asset and the second virtual asset based on the real-time exchange rate of the second liquidity pool (320) and the real-time exchange rate of the third liquidity pool (330) obtained from the DEX Aggregator (350), and may generate a virtual transaction order using a more advantageous exchange rate between the calculated indirect exchange rate and the real-time exchange rate of the first liquidity pool (310).
[0049] Each AMM protocol of each liquidity pool (310, 320, 330) determines a real-time exchange rate according to a preset algorithm based on the quantity ratio of the virtual assets constituting each liquidity pool. For example, the AMM protocol of the first liquidity pool (310) calculates a real-time exchange rate according to a preset algorithm based on the quantity ratio of the first virtual asset and the quantity of the second virtual asset. Here, the preset algorithm may be a formula including a fixed coefficient regarding the total quantity of the first virtual asset and the second virtual asset existing in the first liquidity pool (310). For example, the preset algorithm for determining the real-time exchange rate in the first liquidity pool (310) may be expressed by a formula such as Mathematical Formula 1.
[0050]
[0051] Here, x is the quantity of the first virtual asset existing in the first liquidity pool (310), and y is the quantity of the second virtual asset existing in the first liquidity pool (310). k is a constant that is maintained at a constant value regardless of fluctuations in the quantities of the first virtual asset and the second virtual asset.
[0052] When Δx of the first virtual asset is provided to the first liquidity pool (310), the AMM protocol can calculate Δy, which is the quantity of the second virtual asset corresponding to the quantity of the first virtual asset provided within the first liquidity pool (310), according to Equation 2. The calculated Δy is as shown in Equation 2.
[0053]
[0054] Conversely, if Δy of a second virtual asset is provided to the first liquidity pool (310), the AMM protocol can calculate Δx, the quantity of the first virtual asset corresponding to the quantity of the second virtual asset provided within the first liquidity pool (310), according to Equation 3. The calculated Δx is as shown in Equation 3.
[0055]
[0056] The liquidity automatic supply device (100) determines a virtual sell price of a first virtual asset converted into a quantity of a second virtual asset based on a real-time exchange rate and generates a first virtual transaction order.
[0057] When a first virtual transaction order is executed to sell a preset quantity of a first virtual asset at a virtual sell price, the preset quantity of the first virtual asset must be supplied to the automatic liquidity supply device (100) from the first liquidity pool (310). Accordingly, the automatic liquidity supply device (100) can determine the virtual sell price of the first virtual asset using mathematical equation 4.
[0058]
[0059] Here, P Smeans a virtual sell order. A is the preset quantity of the first virtual asset for the first virtual transaction order, i.e., the order quantity, and p t is a preset price unit.
[0060] refers to the quantity of the second virtual asset that must be provided to the first liquidity pool (310) in order to receive one first virtual asset from the first liquidity pool (310), i.e., the unit selling price. Here, the unit selling price is determined according to the real-time exchange rate in the case of exchanging the second virtual asset for the first virtual asset in the first liquidity pool (310) in the amount of A. Therefore, if Δx is replaced with A in the above mathematical expression 3, Δy, which is the total quantity of the second virtual asset required to receive the first virtual asset in the amount of A, can be calculated, and Δy can be divided by A. You can get it.
[0061] Also, the virtual ask price P S is the preset price unit p t It must be determined by a value that is a positive integer multiple of v. Ceil(v,u) is defined as an operation that determines the smallest value that satisfies the condition that is greater than or equal to v among the values that are positive integer multiples of u. In other words, the virtual ask price P S is determined as the minimum value among the values that are multiples of the preset bid price unit of the first virtual asset that is greater than or equal to the unit selling price, which is the price actually required to receive one first virtual asset from the first liquidity pool (310). The liquidity automatic supply device (100) determines the virtual selling price P S And create a first virtual transaction order based on the order quantity A.
[0062] Similarly, the liquidity automatic supply device (100) determines a virtual buy price for the first virtual asset, converted into a quantity of the second virtual asset based on the real-time exchange rate, and generates a second virtual transaction order. The virtual buy price for the first virtual asset can be determined using the following mathematical equation (5).
[0063]
[0064] Here, P S refers to a virtual buy order. A is the preset order quantity of the first virtual asset for the second virtual transaction order.
[0065] refers to the quantity of the second virtual asset that can be provided from the first liquidity pool (310) when one first virtual asset is provided to the first liquidity pool (310), i.e., the unit purchase price. The unit purchase price is determined according to the real-time exchange rate when exchanging the first virtual asset in the first liquidity pool (310) in the amount of A for the second virtual asset. Therefore, if Δx in the above mathematical expression 2 is replaced with A, the total quantity of the second virtual asset that can be received when A of the first virtual asset is provided can be calculated, and Δy can be divided by A. You can get it.
[0066] As with the virtual ask price, the virtual bid price P B p, which is a preset price unit t It must be determined by a value that is a positive integer multiple of v. floor(v,u) is defined as an operation that determines the largest value that satisfies the condition of being less than or equal to v among the values that are positive integer multiples of u. In other words, the virtual bid price P B is determined as the maximum value among the values that are multiples of the preset bid price unit of the first virtual asset that is less than or equal to the unit purchase price, which is the price that can actually be received when one first virtual asset is provided in the first liquidity pool (310). The liquidity automatic supply device (100) determines the virtual buy price PB And a second virtual transaction order is created based on the order quantity A.
[0067] When the first virtual transaction order for order quantity A and the second virtual transaction order are created, the prices of the two virtual transaction orders form the lowest selling price and the highest buying price among the existing transaction orders, respectively, so the spread ratio is the virtual selling price P S and virtual bid price P B It can be determined by mathematical formula 6 based on .
[0068]
[0069] Under the same conditions, the greater the quantity of virtual assets deposited in the first liquidity pool (310), the higher the virtual sell price P S The value of is decreasing and the virtual bid price P B As the value of increases, the spread ratio decreases. On the other hand, if the order quantity A increases, the virtual ask price P S is increasing and the virtual bid price P B As the price decreases, the spread ratio increases. Here, the preset first virtual asset order quantity A is the virtual sell price P of the first virtual transaction order. S And the virtual buy price P of the second virtual transaction order B The spread ratio determined based on the spread ratio can be determined as a value within a quantity range that makes the value smaller than the preset spread ratio.
[0070] The range of values of A under the condition that the spread ratio is maintained at a value smaller than the preset spread ratio value r can be expressed as in mathematical expression 7.
[0071]
[0072] That is, the range of order quantity A for the first virtual transaction order and the second virtual transaction order is determined based on the preset spread ratio value and the current quantity of the first virtual asset deposited in the first liquidity pool (310).
[0073] The process of generating the first virtual transaction order and the second virtual transaction order described using mathematical equations 1 to 7 above is exemplarily described assuming a case where a single first liquidity pool (310) that determines a real-time exchange rate between virtual assets according to the CPAMM (constant product AMM) protocol is used, and the process of generating the first virtual transaction order and the second virtual transaction order by the automatic liquidity supply device (100) is not limited to the mathematical equations and contents described above. In addition to the CPAMM described above as the mathematical equation 1, various AMM protocols can be used, and in addition to the first liquidity pool (310), multiple liquidity pools can be used together. Therefore, it will be apparent to those skilled in the art that mathematical equations different from the mathematical equations 1 to 7 described above can be derived in this case.
[0074] In another embodiment, the liquidity automatic supply device (100) may create a first virtual transaction order with a virtual sell price that is higher by a preset bias price α than the virtual sell price calculated through the aforementioned process, and may create a second virtual transaction order with a virtual buy price that is lower by a preset bias price α than the virtual buy price calculated through the aforementioned process. In this case, when the first or second virtual transaction order is executed, a profit may be generated due to the artificially adjusted bias price.
[0075] According to another embodiment, the liquidity automatic supply device (100) may generate multiple first virtual trading orders for different virtual sell orders and multiple second virtual trading orders for different virtual buy orders.
[0076] Specifically, the liquidity automatic supply device (100) obtains a plurality of real-time exchange rates of the second virtual asset for the first virtual asset, each different from the first quantity and the second quantity, and determines virtual sell prices and virtual buy prices corresponding to the plurality of real-time exchange rates. Here, the plurality of real-time exchange rates may include a first-stage real-time exchange rate corresponding to the exchange of the first quantity of virtual assets, and a second-stage real-time exchange rate corresponding to the exchange of the second quantity of virtual assets, when the first quantity of virtual assets and the second quantity of virtual assets are sequentially exchanged.
[0077] When the first quantity of the first virtual asset in the liquidity pool is exchanged for the second virtual asset according to the first-stage real-time exchange rate, the virtual asset composition ratio changes. Therefore, when additionally exchanging the second quantity of the first virtual asset for the second virtual asset, the exchange must be performed according to the second-stage real-time exchange rate, which is different from the first-stage real-time exchange rate, and thus the virtual ask price and virtual buy price also change. For example, the liquidity automatic supply device (100) can sequentially determine the first-stage virtual ask price for the first quantity of the first virtual asset and the second-stage virtual ask price for the second quantity of the first virtual asset, and the second-stage virtual ask price is determined at a relatively higher price than the first-stage virtual ask price. The liquidity automatic supply device (100) can generate one first virtual transaction order based on the first-stage virtual ask price and the first quantity, and generate another first virtual transaction order based on the second-stage virtual ask price and the second quantity.
[0078] As with the first virtual trading order, the liquidity automatic supply device (100) can create a second virtual trading order based on the first-stage virtual buy order and the first quantity, and another second virtual trading order based on the second-stage virtual buy order and the second quantity. Here, the second-stage virtual buy order is determined at a relatively lower price than the first-stage virtual buy order.
[0079] The liquidity automatic supply device (100) presents the first virtual transaction order (31) to the sell order window of the order book (30) and the second virtual transaction order (32) to the buy order window of the order book (30). Here, in addition to the first virtual transaction order (31) and the second virtual transaction order (32), the first designated sell order (35) and the second designated sell order (33) submitted by the user by specifying the order price, and the first designated buy order (34) and the second designated buy order (36) can be displayed together and listed according to price in the order window of the order book (30).
[0080] According to one embodiment, the order book (30) can determine the order quantity for each order based on currently existing virtual trading orders, designated sell orders, and designated buy orders, and display the order quantity corresponding to each order in order of price. Specifically, the order book (30) displays the order quantity corresponding to each price in order of price in a sell order window based on the first virtual trading order (31), the first designated sell order (35), and the second designated sell order (33), and displays the order quantity corresponding to each price in order of price in a buy order window based on the second virtual trading order (32), the first designated buy order (34), and the second designated buy order (36).
[0081] For example, if the sell price of the first designated sell order (35) is the first price, and the sell prices of the first virtual transaction order (31) and the second designated sell order (33) are the second prices that are lower than the first price, the order book (30) may sort the first and second prices in order from the top of the sell price window, and then display the quantity value of the first designated sell order (35) in the order quantity for the first price, and display the quantity value that adds the quantities of the first virtual transaction order (31) and the second designated sell order (33) in the order quantity for the second price.
[0082] Meanwhile, if the buy price of the second virtual transaction order (32) and the first designated buy order (34) is the third price, and the sell price of the second designated buy order (36) is the fourth price which is lower than the third price, the order book (30) may arrange the third and fourth prices in order from the top of the buy price window, and then display the quantity value that adds the quantity of the second virtual transaction order (32) and the first designated buy order (34) to the order quantity for the third price, and display the quantity value of the second designated buy order (36) to the order quantity for the fourth price.
[0083] One or more transaction orders existing on the order book (30) are recorded on the blockchain, and when the virtual asset corresponding to the price and quantity of each transaction order is transferred to the corresponding contract, the contract automatically performs an action to execute the transaction order. Users who wish to buy or sell the first virtual asset on the same blockchain network can execute a transaction in response to the sell orders and buy orders displayed on the order book (30). Here, even if there are no transaction orders by other users, such as the first designated sell order (35), the second designated sell order (33), the first designated buy order (34), and the second designated buy order (36), the user can execute a transaction in response to the first virtual transaction order (31) and the second virtual transaction order (32) continuously generated by the liquidity automatic supply device (100) in the order book (30). That is, the automatic liquidity supply device (100) can automatically supply liquidity to the trading market of the first virtual asset to enable trading at all times by generating a first virtual transaction order (31) and a second virtual transaction order (32) so that the liquidity pool can actually function as a seller or buyer of the first virtual asset.
[0084] FIG. 3 is a diagram for explaining a process for executing a virtual asset transaction according to one embodiment of the present disclosure.
[0085] Referring to FIG. 3, a user (20) submits a user trading order (21) transaction that matches a first virtual trading order (31) generated by an automatic liquidity supply device (100). Here, the first virtual trading order (31) is an order to sell A1 units of the first virtual asset at a price of P1 each, and the user trading order (21) is an order to purchase the first virtual asset under the same conditions as the first virtual trading order (31).
[0086] A user (20) provides A2 second virtual assets along with a user transaction order (21) to the liquidity automatic supply device (100). Here, A2 is the product of A1 and P1. Specifically, the execution of the first virtual transaction order (31) is triggered by transferring A2 second virtual assets stored in the user's (20) account (or wallet) on the blockchain network to the contract of the first virtual transaction order (31).
[0087] The liquidity automatic supply device (100) transfers A2 second virtual assets to the liquidity pool (310), and the liquidity pool (310) transfers A3 first virtual assets, the quantity of which is calculated based on the real-time exchange rate, to the liquidity automatic supply device (100). The liquidity automatic supply device (100) transfers A1 of the A3 first virtual assets to the account of the user (20). Here, the quantity A3 of the first virtual asset supplied from the liquidity pool (310) may have a different value from the quantity A1 of the first virtual asset transferred to the user (20) according to the first virtual transaction order. In the first virtual transaction order (31), the price P1 for A1 of the first virtual asset is determined as a normalized value by the bid / ask price unit, so the A2 of the second virtual asset provided by the user (20) may actually be a larger quantity than the quantity of the second virtual asset corresponding to A1 of the first virtual asset in the liquidity pool (310), and A3 of the first virtual asset, which is a larger quantity than A1, is supplied. As a result, the liquidity automatic supply device (100) may generate a profit equivalent to the quantity of the first virtual asset corresponding to the difference between A1 and A3.
[0088] The aforementioned virtual asset transaction execution process can be automatically performed on the same blockchain network. Therefore, the automatic liquidity supply device (100) can implement an order book with continuous liquidity supply on the blockchain and facilitate virtual asset transactions in a decentralized manner.
[0089] Figure 4 is a block diagram illustrating an automatic liquidity supply device according to one embodiment of the present disclosure. The series of processes described above for trading the first virtual asset can be executed by a computer device or server implemented in hardware, such as the automatic liquidity supply device (200) illustrated in Figure 4.
[0090] Referring to FIG. 4, the fluid automatic supply device (200) includes an input / output interface (210), a communication interface (220), a processor (230), and a memory (240). Here, the input / output interface (210), the communication interface (220), the processor (230), and the memory (240) can transmit data to each other via a bus.
[0091] The input / output interface (210) may be a means for interfacing with an input / output device. For example, the input device may include a device such as a keyboard or mouse, and the output device may include a device such as a display or speaker. As another example, the input / output interface (210) may be a means for interfacing with a device that integrates input and output functions, such as a touchscreen. The input / output device (250) may also be configured as a single device with the fluid automatic supply device (200).
[0092] A user can check virtual trading orders, etc. presented on the order book using an input / output device connected to the input / output interface (210). Furthermore, the user can input a preset command to submit a user trading order corresponding to the trading order presented on the order book.
[0093] The communication interface (220) may provide a function for transmitting and receiving data between components within the automatic liquidity supply device (200), or for exchanging data with a device or system implemented for one or more liquidity pools or users, or other nodes existing on a blockchain network separately from the automatic liquidity supply device (200). Specifically, data generated by the processor (230) of the automatic liquidity supply device (200) according to instructions stored in a recording device such as a memory (240) may be transmitted to devices of other nodes through the blockchain network under the control of the communication interface (220). Conversely, signals, commands, data, etc. from devices or servers of other nodes may be received by the automatic liquidity supply device (200) through the communication interface (220) via the blockchain network. Signals, commands, data, etc. received through the communication interface (220) may be transmitted to the processor (230) or the memory (240).
[0094] For example, the liquidity automatic supply device (200) may receive real-time exchange rate data of a second virtual asset for a first virtual asset in a liquidity pool using a communication interface (220), transmit the first virtual asset or the second virtual asset to the liquidity pool or the corresponding user account for execution of a transaction order, or transmit data related to an order book generated by the processor (230) to a terminal device of a user node.
[0095] The processor (230) may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. The instructions may be provided to the processor (230) via the memory (240) or the communication interface (220). For example, the processor (230) may be configured to calculate virtual sell orders and virtual buy orders for trading a first virtual asset with a second virtual asset, or to generate a first virtual transaction order and a second virtual transaction order, by executing instructions received according to program code stored in a storage device such as the memory (240).
[0096] The memory (240) may include volatile memory, permanent, virtual or other types of memory devices for storing information used by or output by the fluid automatic supply device (200).
[0097] The memory (240) may store an operating system for processing or controlling the processor (230), one or more application programs, other program modules, and various data for the operation of the automatic liquidity supply device (200). For example, the memory (240) may store a user's virtual asset account information, real-time exchange rate information for a liquidity pool, a preset bid / ask unit, and a preset order quantity of a first virtual asset for a virtual transaction order. In addition, the memory (240) may store various data generated by the processor (230). For example, the memory (240) may store a first virtual transaction order, a second virtual transaction order, order book data, etc. generated by the processor (230).
[0098] Figure 5 is a flowchart of an automatic liquidity supply method according to one embodiment of the present disclosure.
[0099] Referring to FIG. 5, the liquidity automatic supply device obtains a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from a liquidity pool (S510).
[0100] The liquidity automatic supply device obtains the quantity ratio of two virtual assets from a liquidity pool consisting of a first virtual asset and a second virtual asset. Then, based on the obtained quantity ratio and a preset algorithm, it calculates the quantity of the second virtual asset corresponding to the preset quantity of the first virtual asset.
[0101] In addition to the liquidity pools for the first and second virtual assets, a blockchain network may also contain liquidity pools comprised of other virtual assets. Accordingly, according to another embodiment, the liquidity automatic supply device may obtain the real-time exchange rate between the first virtual asset and the third virtual asset, and the real-time exchange rate between the third virtual asset and the second virtual asset, from at least one liquidity pool, and indirectly calculate the real-time exchange rate of the second virtual asset for the first virtual asset based on these data.
[0102] The liquidity automatic supply device generates a virtual transaction order to trade a first virtual asset for a second virtual asset based on the real-time exchange rate (S520). Here, the virtual transaction order includes a first virtual transaction order to sell the first virtual asset and a second virtual transaction order to buy the first virtual asset.
[0103] The liquidity automatic supply device determines the virtual ask and buy prices of the first virtual asset, which are converted into the quantity of the second virtual asset, based on the real-time exchange rate in the liquidity pool.
[0104] Specifically, the automatic liquidity supply device calculates the unit selling price of the first virtual asset based on the real-time exchange rate, that is, when swapping one first virtual asset with a second virtual asset in the liquidity pool, calculates the quantity of the second virtual asset, and then determines the smallest value as the virtual selling price among the values that are positive integer multiples of the preset bid price unit of the first virtual asset that are greater than or equal to the calculated unit selling price.
[0105] In addition, the automatic liquidity supply device calculates the unit purchase price of the first virtual asset based on the real-time exchange rate, that is, when swapping a second virtual asset with one first virtual asset in the liquidity pool, calculates the required quantity of the second virtual asset, and then determines the largest value as the virtual purchase price among the values that are positive integer multiples of the preset bid price unit of the first virtual asset that are less than or equal to the calculated unit purchase price.
[0106] The liquidity automatic supply device generates a first virtual transaction order to sell the first virtual asset based on a virtual ask price and a preset quantity, and generates a second virtual transaction order to buy the first virtual asset based on a virtual buy price and a preset quantity.
[0107] Here, the preset quantity is determined as an amount that ensures that the current spread ratio, determined based on the first and second virtual trading orders, is less than the preset spread ratio. Specifically, the spread ratio is determined based on the price gap between the virtual ask price (the lowest selling price) and the virtual bid price (the highest buying price) on the order book. The liquidity automatic supply device adjusts the preset quantities for the first and second virtual trading orders to maintain the spread ratio within the preset spread ratio.
[0108] The liquidity automatic supply device presents a virtual trading order on the order book (S530).
[0109] The order book includes a sell order window displaying sell orders for the first virtual asset and a buy order window displaying buy orders for the first virtual asset. The first virtual transaction order may be displayed in the sell order window, and the second virtual transaction order may be displayed in the buy order window. The liquidity automatic supply device can continuously generate virtual transaction orders and submit them to the order book. Users can perceive that the market for the first virtual asset always has liquidity equivalent to the virtual transaction orders submitted to the order book's order window.
[0110] The liquidity automatic supply device executes a transaction corresponding to a user transaction order when a user transaction order matching a virtual transaction order occurs (S540).
[0111] A user can submit a matching virtual trading order. For example, a user may submit a buy order transaction for the first virtual asset by transferring a quantity of a second virtual asset equivalent to the price of the first virtual trading order. The liquidity automatic supply device then executes the first virtual trading order in response to the user's buy order.
[0112] The liquidity automatic supply device transfers the second virtual asset provided by the user to the liquidity pool and exchanges it for a quantity of the first virtual asset determined by the real-time exchange rate. The transaction is completed when the liquidity automatic supply device transfers to the user the quantity of the first virtual asset obtained from the liquidity pool corresponding to the user's trade order.
[0113] Each component of the device or method according to the present disclosure may be implemented in hardware, software, or a combination of hardware and software. Furthermore, the functions of each component may be implemented in software, with a microprocessor configured to execute the software functions corresponding to each component.
[0114] Various implementations of the systems and techniques described herein may be implemented as digital electronic circuits, integrated circuits, FPGAs, ASICs, computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations of one or more computer programs executable on a programmable system. The programmable system includes at least one programmable processor (which may be a special-purpose processor or a general-purpose processor) coupled to receive data and instructions from and transmit data and instructions to a storage system, at least one input device, and at least one output device. Computer programs (also known as programs, software, software applications, or code) include instructions for the programmable processor and are stored on a "computer-readable recording medium."
[0115] A computer-readable recording medium includes any type of recording device that stores data that can be read by a computer system. Such a computer-readable recording medium may be a non-volatile or non-transitory medium, such as a ROM, CD-ROM, memory card, hard disk, magneto-optical disk, or storage device, and may also include a transitory medium, such as a data transmission medium. Furthermore, a computer-readable recording medium may be distributed across network-connected computer systems, allowing computer-readable code to be stored and executed in a distributed manner.
[0116] Although the flowchart of this specification describes each process as being executed sequentially, this is merely an example of the technical idea of one embodiment of the present disclosure and is not limited to a chronological order. In other words, a person having ordinary skill in the art to which the embodiment of the present disclosure belongs will be able to change and execute the order described in the flowchart without departing from the essential characteristics of one embodiment of the present disclosure, or to modify and apply various modifications and variations such as executing one or more of the processes in parallel.
[0117] The above description is merely an example of the technical idea of the present embodiment, and those skilled in the art will appreciate that various modifications and variations can be made without departing from the essential characteristics of the present embodiment. Therefore, the present embodiments are not intended to limit the technical idea of the present embodiment, but rather to explain it, and the scope of the technical idea of the present embodiment is not limited by these embodiments. The scope of protection of the present embodiment should be interpreted by the claims below, and all technical ideas within a scope equivalent thereto should be interpreted as being included in the scope of rights of the present embodiment.
[0118] (Explanation of symbols)
[0119] 1: Blockchain Network
[0120] 2: User terminal
[0121] 10: Virtual Asset Trading System
[0122] 100: Liquidity Automatic Supply Device
[0123] <CROSS-REFERENCE TO RELATED APPLICATION>
[0124] This patent application claims priority to Korean Patent Application No. 10-2023-0028434, filed March 3, 2023, and Korean Patent Application No. 10-2024-0025716, filed February 22, 2024, the entire contents of which are incorporated herein by reference.
Claims
1. In a method for automatically providing liquidity performed in a virtual asset trading system for trading a first virtual asset with a second virtual asset, A step of obtaining a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from at least one liquidity pool; A step of creating a virtual transaction order to trade the first virtual asset with the second virtual asset based on the real-time exchange rate; and Step of presenting the above virtual transaction order on the order book Including Automatic liquidity provision method.
2. In paragraph 1, The above automatic liquidity supply method is, A liquidity automatic supply method further comprising a step of executing a transaction corresponding to a user transaction order when a user transaction order matching the virtual transaction order occurs.
3. In paragraph 1, The above real-time exchange rate is, An automatic liquidity supply method, wherein the ratio is determined according to a preset algorithm based on the quantity ratio of two different types of virtual assets that constitute the above liquidity pool.
4. In paragraph 3, The step of obtaining a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from at least one liquidity pool is as follows: A step of obtaining a virtual asset quantity ratio in a liquidity pool composed of the first virtual asset and the second virtual asset among at least one liquidity pool; and A liquidity automatic supply method, comprising a step of calculating the quantity of the second virtual asset corresponding to the preset quantity of the first virtual asset based on the virtual asset quantity ratio and the preset algorithm.
5. In paragraph 3, The step of obtaining a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from at least one liquidity pool is as follows: A step of obtaining a real-time exchange rate of the first virtual asset and the third virtual asset from any one of the at least one liquidity pool; A step of obtaining a real-time exchange rate of the third virtual asset and the second virtual asset for any one of the liquidity pools among the at least one liquidity pool; and A liquidity automatic supply method, comprising a step of calculating a real-time exchange rate of a second virtual asset for a preset quantity of the first virtual asset based on the real-time exchange rate of the first virtual asset and the third virtual asset and the real-time exchange rate of the third virtual asset and the second virtual asset.
6. In paragraph 1, The step of creating a virtual transaction order to trade the first virtual asset with the second virtual asset based on the real-time exchange rate is as follows: A step of determining a virtual sell price and a virtual buy price of the first virtual asset converted into the quantity of the second virtual asset based on the real-time exchange rate; A step of generating a first virtual transaction order for selling the first virtual asset based on the virtual sell order and the preset quantity; and An automatic liquidity supply method, comprising a step of generating a second virtual transaction order for purchasing the first virtual asset based on the virtual buy order and the preset quantity.
7. In paragraph 6, The above preset quantity is, An automatic liquidity supply method, wherein the current spread ratio determined based on the first virtual transaction order and the second virtual transaction order is a quantity that is smaller than a preset spread ratio.
8. In paragraph 6, The above virtual selling price is, It has the minimum value among the values that are positive integer multiples of the preset bid price unit of the first virtual asset that are greater than or equal to the unit selling price of the first virtual asset calculated based on the real-time exchange rate, The above virtual buy price is, A liquidity automatic supply method having a maximum value among values that are positive integer multiples of a preset bid price unit of the first virtual asset that is less than or equal to the unit purchase price of the first virtual asset calculated based on the real-time exchange rate.
9. In paragraph 6, The above first virtual transaction order is, A transaction order to sell the above-mentioned preset quantity of the above-mentioned first virtual asset at the above-mentioned virtual sell price, The above second virtual transaction order is, A liquidity automatic supply method, which is a transaction order to purchase the above-described first virtual asset in the above-described preset quantity at the above-described virtual buy price.
10. In paragraph 6, The above first virtual transaction order is, An order to sell the above-mentioned first virtual asset in the above-mentioned preset quantity at a price higher than the above-mentioned virtual sell price by a preset bias price, The above second virtual transaction order is, An automatic liquidity supply method, which is a transaction order to purchase the first virtual asset in the preset quantity at a price lower than the virtual buy price by the bias price.
11. In paragraph 1, The step of obtaining a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from at least one liquidity pool is: Including a step of obtaining a first-stage real-time exchange rate corresponding to the first quantity and a second-stage real-time exchange rate corresponding to the second quantity when sequentially exchanging a first quantity of a first virtual asset and a second quantity of a second virtual asset in the liquidity pool, The above virtual trading order is, A virtual trading order created based on the above-mentioned first-stage real-time exchange rate and the above-mentioned first quantity; and An automatic liquidity supply method including a virtual trading order generated based on the above two-step real-time exchange rate and the above second quantity.
12. In paragraph 2, When a user transaction order matching the above virtual transaction order occurs, the step of executing the transaction corresponding to the user transaction order is as follows: A step of exchanging one of the first virtual asset and the second virtual asset provided by the user according to the user transaction order for another virtual asset in an amount determined according to the real-time exchange rate from the liquidity pool; and A liquidity automatic supply method comprising a step of providing a user with another virtual asset in an amount corresponding to the user's transaction order among another virtual asset in an amount determined according to the real-time exchange rate.
13. A computer-readable recording medium storing a computer program, The above computer program, A computer-readable recording medium comprising instructions for causing a processor to perform a method according to any one of claims 1 to 12.
14. Memory that stores one or more instructions; A processor comprising: a processor for executing one or more instructions stored in the memory; The processor, by executing one or more of the instructions, Obtain a real-time exchange rate of a second virtual asset for a preset quantity of a first virtual asset from at least one liquidity pool, A virtual transaction order is created to trade the first virtual asset with the second virtual asset based on the real-time exchange rate. Present the above virtual trading order on the order book Liquidity automatic supply device.
Citation Information
Patent Citations
Method and apparatus for exchanging or remitting blockchain-based virtual currency
KR101694455B1
Recirculating aquaculture system use of Biofloc Technology
KR1020210025143A
Unit cell including thermochromic polymer and defect detecting method thereof
KR1020220023227A
System for detecting fire
KR102112691B1
Method and system for determining exchange rate of virtual asset
KR102478703B1
