Method for exchanging cryptocurrency

The method enhances cryptocurrency exchange systems by using a virtual intermediary token within a distributed ledger and automated market maker protocol, addressing inefficiencies and security issues through improved capital management and reduced vulnerability to attacks, thereby optimizing exchange processes and security.

WO2024175949A1PCT designated stage expired Publication Date: 2024-08-29ALPACA RES PTE LTD

Patent Information

Application Number
PCT/IB2023/051556
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

Existing cryptocurrency exchange systems face inefficiencies and security vulnerabilities due to complications in capital management and market volatility, leading to opportunities for exploitation and asset destruction.

Method used

A method utilizing a distributed ledger and automated market maker protocol that introduces a virtual intermediary token to facilitate cryptocurrency exchanges, enhancing capital efficiency and security by minimizing 'hops' between cryptocurrencies and preventing accumulation of the token, thus reducing gas fees and mitigating attack vectors.

Benefits of technology

This approach improves capital efficiency and security by allowing seamless exchange of cryptocurrencies without requiring physical tokens, reducing gas fees, and providing robust protection against manipulation and time-differential attacks, while allowing for flexible liquidity provision strategies and risk management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2023051556_29082024_PF_FP_ABST
    Figure IB2023051556_29082024_PF_FP_ABST
Patent Text Reader

Abstract

To provide a method for exchanging cryptocurrencies of which capital efficiency and security are improved, an embodiment is method for exchanging, through a distributed ledger administered by an automated market maker protocol, a second cryptocurrency for a first cryptocurrency according to a price in relation thereto. Said method comprises the following steps: (a) activating one or more liquidity-providing position for a liquidity provider, each of said liquidity-providing position being conditioned upon a price range within which liquidity is provided, said price range corresponding to a portion of a price curve, and said portion being selected by the liquidity provider; (b) making available on the distributed ledger a virtual intermediary token in the amount that is a function of the amount of the cryptocurrency pledged 0 by the liquidity provider; (c) when the liquidity-providing position is active and the price falls within the price range — (i) exchanging the second cryptocurrency for the virtual intermediary token on the distributed ledger, (ii) further exchanging the virtual intermediary token from step c (i) for the first cryptocurrency, and (iii) generating a liquidity provision fee for the liquidity provider and for the automated market maker protocol — and (d) fully or partially deactivating said liquidity-providing position if the automated market maker protocol is supplied with the virtual intermediary token so as to balance the amount of the virtual intermediary token previously made available on the distributed ledger according to step (b). Further, said virtual intermediary token is prevented from being accumulated freely from the liquidity-providing position.
Need to check novelty before this filing date? Find Prior Art

Description

[0001]TITLE OF THE INVENTION METHOD FOR EXCHANGING CRYPTOCURRENCY FIELD OF THE INVENTION The present disclosure relates to information technology, particularly to information 5 security, and more particularly to security in transactions involving cryptocurrency. BACKGROUND OF THE INVENTION With the increasing adoption of cryptocurrencies and number of their varieties, such as Bitcoin, Ethereum and other stablecoins, the exchanges among those varieties have become more complicated. Said complication affects the existing methods and systems’ capital efficiency as 10 well as security. They are vulnerable to security issues caused by deliberate cyber-attacks, or by users’ behavior driven by market volatility. It should be noted also that the lack of capital efficiency and security are often interrelated. The resulting damage ranges from the individual user’s opportunity loss and unfair exploitation of the exchange system to a massive destruction of digital assets due to the system’s general failure. 15 The U.S. Patent No.11,244,309 B2 is an example of a prior art disclosing a technique for addressing particularly “frontrunning attacks,” a specific class of security issue. This prior art favors the use of trusted hardware in improving the security of exchange; whereas the capital efficiency is left unaddressed. It also corroborates a common knowledge in the arts that achieving a more trustless system and achieving a greater security are conflicting pursuits, and thus 20 requiring tradeoffs. Regardless, capital efficiency and security are demands that remain largely unsatisfied in the arts. SUMMARY OF THE INVENTION 25 An object of the present invention is to provide a method for exchanging cryptocurrency that effectively addresses the capital efficiency problems as well as major security problems, as will be identified and explained further below. In an aspect, an embodiment is method for exchanging, through a distributed ledger administered by an automated market maker protocol, a second cryptocurrency for a first 30 cryptocurrency according to a price in relation thereto. Said method comprises the following steps: (a) activating one or more liquidity-providing position for a liquidity provider, each of said liquidity-providing position being conditioned upon a price range within which liquidity is provided, said price range corresponding to a portion of a price curve, and said portion being selected by the liquidity provider; (b) making available on the distributed ledger a virtual 5 intermediary token in the amount that is a function of the amount of the cryptocurrency pledged by the liquidity provider; (c) when the liquidity-providing position is active and the price falls within the price range —(i) exchanging the second cryptocurrency for the virtual intermediary token on the distributed ledger, (ii) further exchanging the virtual intermediary token from step c (i) for the first cryptocurrency, and (iii) generating a liquidity provision fee for the liquidity 10 provider—and (d) fully or partially deactivating said liquidity-providing position if the automated market maker protocol is supplied with the virtual intermediary token so as to fully or partially balance the amount of the virtual intermediary token previously made available on the distributed ledger according to step (b). Further, said virtual intermediary token is prevented from being accumulated freely from the liquidity-providing position. 15 According to the concept of the present invention, said “liquidity provider” refers to a type of user interacting with the embodiment via a nodal machine or terminal computer device who acts thus under an incentive to provide the liquidity to the price range for the fee, thereby facilitating the exchange of cryptocurrency. Moreover, under the concept of the present invention, a user’s interactions with an 20 embodiment may be executed by a human, by machine decisions triggered by preset conditions (e.g., via an automated bot or a smart contract), or by a combination of both. The virtual intermediary token provides the embodiment with capital efficiency; the bidder can exchange any type of second cryptocurrency for any desired type of first cryptocurrency through a virtual intermediary token without using any other physical token, 25 thereby preventing segmentation of liquidity, as all liquidity in the first and second cryptocurrencies are concentrated with the virtual intermediary token, thus minimizing the “hops” between the cryptocurrency types and minimizing the “gas” fees conventionally increased with the number of hops; moreover, the liquidity provider needs not speculate on the availability of the second cryptocurrency and thus may pledge the first cryptocurrency to provide 30 liquidity separately, thereby simplifying the process for liquidity provider and obviating the prior-art barrier of entry of having to provide both the first and second cryptocurrencies at the same time. Further, by configuring the embodiment such that said virtual intermediary token is prevented from being accumulated freely from the liquidity-providing position, the embodiment is provided with effective protection against various attack vectors which may otherwise exploit virtual tokens. Notable examples of said attack vectors include price manipulations and time- differential attacks, the nature of such security attacks being known in the relevant arts and thus 5 omitted from brevity. Preferably, an embodiment is configured such that the second cryptocurrency and first cryptocurrency may reverse their roles, so as to accommodate many pairs of the second cryptocurrency and first cryptocurrency. To explain, said preferred embodiment provides a method that is capable of exchanging any cryptocurrency for any other cryptocurrency in any 10 pair combination if the liquidity providers provide liquidity for these cryptocurrencies. Because an embodiment according to the concept of the present invention requires no trusted hardware to operate and achieve the intended outcomes, it may be implemented either as a centralized or decentralized method, or a method having any degree of centralization. Nonetheless, exemplary embodiments to be described in the following Detailed Description will 15 be directed to decentralized methods. Preferably, the price curve is split into several price increments. Each said price increment covers a predetermined price unit; and said portion is formed of one or more of the adjoining price increments. More preferably, the price is also a function of the liquidity; and the amount of the virtual intermediary token being made available according to step (b) is 20 constrained such that the resulting liquidity does not change the price increment within which the resulting price falls. In another preferred embodiment, the liquidity is provided within a plurality of price increments; and the amount of the virtual intermediary token being made available according to step (b) is constrained such that the resulting liquidity does not change any of said plurality of price increments within which the resulting price falls. Said preferred 25 feature incentivizes the liquidity provider to customize their liquidity positions and allows the liquidity provider to use more flexible strategies, thereby both optimizing the projected gain of the liquidity provision fee and maintaining the embodiment’s security. Preferably, following step (d), the following are supplied to the liquidity provider: the first cryptocurrency in the amount pledged by the liquidity provider in step (b) minus the amount 30 exchanged for the virtual intermediary token in step (c) (ii); and the liquidity provision fee generated in step (c) (iii). This feature optimizes the incentive for the liquidity provider’s interaction with the embodiment. Further, said first cryptocurrency in the amount pledged by the liquidity provider in step (b) minus the amount exchanged for the virtual intermediary token in step (c) (ii), will be later referred to in some embodiments as “equity” which is involved in preferred features of those embodiments. More preferably, following step (d), the virtual intermediary token is purged. 5 Also more preferably, following step (d), the price is unchanged. Also more preferably, the currency of the liquidity provision fee corresponds to the first cryptocurrency. Preferably, the virtual intermediary token being supplied to the automated market maker protocol in step (d) may be fully or partially provided through an external distributed ledger, 10 thereby facilitating the deactivation of the liquidity-providing position in circumstances where there is shortage in the liquidity within the price range. This optional feature is preferred according to the inventors’ design for its capability to address the so-called “price-lock” scenario wherein, without the preferred feature, the liquidity provider’s wish to close (i.e., deactivate) the liquidity-providing position and to regain access to the first cryptocurrency previously pledged15 in step (b), would be frustrated by the circumstantial lack of liquidity. An example of said “price- lock” scenario is to be explained fully in the Detailed Description. Preferably, the method further comprises step (e): when the price has reached a predetermined stop-loss threshold, force-deactivating said liquidity-providing position. The present inventors envision that the mechanism involving said stop-loss threshold is an optional20 feature that further improves the liquidity provider’s risk management of their liquidity- providing position(s) as well as the method’s security, particularly when the price has become unattractive for the liquidity provider. As such, it is more preferable that said stop-loss threshold is predetermined by the liquidity provider. Preferred features according to the following paragraphs constitutes the security schemes 25 against the scenarios wherein the “health” of the liquidity-providing position becomes poor. The indicator of said “health” is indicated by the ratio of “debt” to “total” of a given liquidity- providing position. Here, “debt” refers to the virtual intermediary token required for deactivating the liquidity-providing position in step (d); “total” refers to the sum of “debt” and “equity”; and “equity” refers to the first cryptocurrency in the amount pledged by the liquidity provider in step 30 (b) minus the amount exchanged for the virtual intermediary token in step (c) (ii). According to the concept of the present invention, a high debt-to-total-value ratio indicates a poor health of a liquidity-providing provision, which if left unaddressed may affect an embodiment’s security. Preferably, the method further comprises step (f): when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position in step (d) to the total value of the liquidity-providing position has reached a predetermined repurchase threshold—(i) permitting a repurchaser to supply the automated market maker protocol with a 5 repurchasing cryptocurrency which is subsequently exchanged for the virtual intermediary token, and (ii) upon the supply according to (f) (i), transferring the liquidity-providing position to the repurchaser. More preferably, the method further comprises step (f) (iii): upon the transferal according to (f) (ii), supplying a repurchasing fee to the repurchaser. The above-mentioned “value” refers to an amount of the virtual intermediary token that 10 is equivalent to either “debt”, “equity”, or “total”. The same meaning of “value” applies to all subsequent mentioning in connection with a liquidity-providing position unless indicated otherwise. The features according to the preceding paragraph constitute an example of such security schemes. A successful repurchase shall reduce the debt-to-total-value ratio of the liquidity- 15 providing position and transfer said liquidity-providing position (which owing to the repurchase has become more secure) to the repurchaser. According to the concept of the present invention, the repurchaser is preferably another type of user interacting with the embodiment via a nodal machine or terminal computer device who acts thus under an incentive to acquire the liquidity- providing position and preferably also for said repurchasing fee while improving the 20 embodiment’s security. Preferably, the method further comprises step (g): when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position in step (d) to the total value of the liquidity-providing position has reached a predetermined rebalance threshold— (i) permitting a rebalancer to cause the automated market maker protocol to exchange part of 25 equity for the virtual intermediary token, said equity being the first cryptocurrency pledged by the liquidity provider in step (b) minus the amount exchanged for the virtual intermediary token in step (c) (ii); (ii) deactivating a predetermined fraction of the liquidity-providing position based on the amount of the virtual intermediary token arising from step (g) (i). More preferably, following step (g) (ii), the virtual intermediary token arising from step (g) (i) is purged. Also 30 more preferably, the method further comprises step (g) (iii): supplying a rebalancing fee to the rebalancer. The features according to the preceding paragraph constitute the next example of said security schemes. A successful rebalance shall offset the “debt” that is a factor of the debt-to- total-value ratio of, and thereby deactivating a predetermined fraction (i.e., downsizing / partially deactivating) of, the liquidity-providing position. In such case, the liquidity provider retains their 5 access to said liquidity-providing position (which owing to the rebalance has been downsized and become more secure). According to the concept of the present invention, the rebalancer is preferably another type of user interacting with the embodiment via a nodal machine or terminal computer device. As such, it is more preferable to provide an incentive to the rebalancer by way of the rebalancing fee. 10 Even more preferably, the method comprises both step (f) (including step (f) (i) and (f) (ii) and preferably including step (f) (iii)) and step (g) (including step (g) (i) and (g) (ii) and preferably including step (g) (iii)), substantially as described above, and the repurchase threshold is lower than the rebalance threshold. The features according to the preceding paragraph constitute yet another example of said 15 security schemes. Indeed, it should be noted that the repurchase and rebalance schemes are not mutually exclusive but in fact are complementary to enable an even stronger protection. In such case, the repurchaser and the rebalancer may or may not be the same person or entity; and their actions may or may not be governed by the same person or entity. Regarding the priority between the components of repurchase and rebalance within this scheme, the present inventors consider 20 that triggering the repurchase component before the rebalance component provides an optimum security. As such, it is preferable to configure such embodiment so that the repurchase threshold is lower than the rebalance threshold. Still more preferably, the method comprises step (e), step (f), and step (g), substantially as described above. It is most preferred for said embodiment to incentivize the liquidity provider 25 to predetermine the stop-loss threshold so that the stop-loss component is to be triggered before the repurchase component and the rebalance component. Examples of said incentives include the configuration by which the repurchasing fee and / or rebalancing fee is paid by the liquidity provider. In another aspect, an embodiment is a computer program product comprising computer- 30 readable instructions, which when executed by a processor, causes a computer device or a computer system to carry out a method according to any one of the above-mentioned embodiments. Also in another aspect, an embodiment is a non-transitory storage medium having stored the above-mentioned computer program product. In yet another aspect, an embodiment is a computer device or a computer system that is configured to carry out a method according to any one of the above-mentioned embodiments. 5 BRIEF DESCRIPTION OF DRAWINGS The principle of the present invention and its advantages will become apparent in the following description, taking into consideration the accompanying drawing in which: FIG.1A shows a schematic diagram of a cryptocurrency exchange enabled by a prior art. 10 FIG. 1B shows a schematic diagram of the internal structure of a cryptocurrency exchange enabled by an exemplary embodiment. FIG. 1C shows a schematic diagram of the external structure of a cryptocurrency exchange enabled by an exemplary embodiment. FIG.1D shows a schematic diagram of the combined structure of a cryptocurrency exchange 15 enabled by an exemplary embodiment. FIG.2 shows a schematic diagram of a computer system according to an exemplary embodiment. FIG.3 shows a graph representing a price curve and its components according to an exemplary embodiment (not to scale). 20 DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION It is to be understood that the following detailed description will be directed to embodiments, provided as examples for illustrating the concept of the present invention only. The present invention is in fact not limited to the particular embodiments described, as such may, of course, vary. It is also to be understood that the terminology used herein is for the purpose of 25 describing particular embodiments only, and is not intended to be limiting, since the scope of this invention will be limited only by the appended claims. The detailed description of the invention is divided into various sections only for the reader’s convenience and disclosure found in any section may be combined with that in another section. 30 Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this invention belongs. It must be noted that as used herein and in the appended claims, the singular forms “a”, “an”, and “the” include plural referents unless the context clearly dictates otherwise. “Comprising” or “comprises” is intended to mean that the compositions and methods include the recited elements, but does not exclude others. “Consisting essentially of” when used 5 to define compositions and methods, shall mean excluding other elements of any essential significance to the combination for the stated purpose. Thus, a device or method consisting essentially of the elements as defined herein would not exclude other materials or steps that do not materially affect the basic and novel characteristic(s) of the claimed invention. “Consisting of” shall mean excluding more than trace elements of other ingredients and substantial method 10 steps. Embodiments defined by each of these transition terms are within the scope of this invention. In this Detailed Description, a user interacting with an embodiment by means of a computer device, computer system, or computer program, may be collectively referred to as a user. A user may be either a natural person or a legally established entity. Moreover, where 15 multiple users are involved, they may be referred to as “first user”, “second user”, “third user”, and so on; or by their fictional names conventional in the relevant arts such as “Alice”, “Bob”, “Carol”, “Dan”, and so on; or by the purpose of their interaction with the embodiment such as “liquidity provider”, “bidder”, “keeper”, “repurchaser”, and “rebalancer.” Unless otherwise specified, these naming conventions should be used as non-limiting explanatory devices. For 20 example, in connection with a certain Figure, Alice may be described as a liquidity provider and Bob as a cryptocurrency bidder, but that does not exclude the circumstance where the same Alice may also act as a bidder in connection with the embodiment; Carol may be described as a repurchaser and Dan a rebalancer, but that does not exclude the circumstance where Carol may also be a rebalancer and Dan also a repurchaser. Further, Alice, if mentioned in connection with 25 a Figure, should not be presumed to be identical to the Alice mentioned in connection with another Figure. Fig.1A shows a schematic diagram of a cryptocurrency exchange enabled by a prior art. Here, the prior-art cryptocurrency exchange scheme 100 comprises exchange pools 101 – 10i. The integer i corresponds to the pairs of the cryptocurrencies to be exchanged; the integers j and 30 k corresponds to the types of cryptocurrencies involved in the exchange. Suppose in Fig.1A, the second cryptocurrency is Bitcoin (BTC), and the second and third cryptocurrencies are Ethereum (ETH) and Litecoin (LTC). Suppose Alice holds 1 BTC and wishes to trade her BTC with bidders who wish to exchange their ETH or LTC for BTC. In that case, Alice needs to speculate on the market conditions and divide her 1 BTC for allocation into the first exchange pool 101 and the second exchange pool 102 accordingly. Suppose the number of cryptocurrencies increases, then Alice must either forgo some exchange pools and / or further divide her limited 5 BTC and cause the liquidity to be segmented among the exchange pools 101 – 10i. The segmented liquidity may cause some demands to be unsatisfied and / or cause the transaction to fail because of insufficient liquidity, thereby affecting capital efficiency in the prior-art cryptocurrency exchange scheme 100. Moreover, many of such prior-art exchange schemes would address the liquidity problem by requiring Alice to provide liquidity to both sides of the 10 pool, i.e., to make both BTC and ETH available to the first exchange pool 101, in order to access the exchange pool and benefit from the transaction. Under such circumstances, if Alice holds only BTC and not ETH, then Alice is prevented from participating in the transaction. And then both Alice and the bidder who wishes to exchange ETH for BTC are worse off. From the bidder’s perspective, the prior-art exchange scheme as shown in Fig.1A is 15 prone to the “multi-hops” problem. Suppose Bob wishes to exchange his LTC for ETH, but at the moment there is no exchange pool between LTC and ETH with sufficient liquidity; then Bob must resort to an indirect route, such as exchanging his LTC for BTC in one exchange pool and then BTC for ETH in another exchange pool. This route involves two “hops” from LTC to BTC and then from BTC to ETH which costs Bob two instances of “gas” fees incurred from each hop. 20 Worse, said two-hops route is viable only if both exchange pools have sufficient liquidity at the time of exchange. Insufficient liquidity in any of these exchange pools may force Bob to take an even more indirect route. For example, if in the above scenario the exchange pool between LTC to BTC has insufficient liquidity, then Bob may be forced to execute his trade firstly from LTC to XRP, secondly from XRP to BTC, and then thirdly from BTC to ETH, paying more “gas” 25 fees in the process. The increasing “gas” fees may become prohibitive past a certain equilibrium point, preventing Bob from initiating any transaction. Fig.1B shows a schematic diagram of the internal structure of a cryptocurrency exchange enabled by an exemplary embodiment. Here, the “internal structure” refers to the structure of operation that is hidden from the user’s view but underlies the external structure as will be further 30 described in connection with Fig. 1C. The cryptocurrency exchange scheme 200 comprises exchange pools 201 – 20i. The key difference between the cryptocurrency exchange scheme 200 in Fig.1B (embodiment) and the cryptocurrency exchange scheme 100 in Fig.1A (prior art) is the involvement of virtual intermediary token that is present only in the embodiment. The integer i corresponds to the pairs of the cryptocurrencies to be exchanged. Suppose in Fig.1B, the second cryptocurrency is Bitcoin (BTC). Suppose Alice holds 1 BTC and wishes to trade her BTC with bidders who wish to exchange any cryptocurrency for BTC. In that case, Alice needs only to 5 provide liquidity to only first exchange pool 201 only. The cryptocurrency supplied by that bidder, irrespective of its type, will be exchanged for the virtual intermediary token. That virtual intermediary token will be exchanged further for the BTC. Fig. 1C shows a schematic diagram of the external structure of a cryptocurrency exchange enabled by an exemplary embodiment. Here, the “external structure” refers to the 10 structure of operation as apparent to the users. From that external view, the exchange scheme 300 comprises only one exchange pool 310 irrespective of the number of cryptocurrencies. Suppose Alice holds 1 BTC, she may use the entire amount of said BTC to provide liquidity to that single exchange pool 310. The liquidity Alice has provided thus will be exchanged for any cryptocurrency bidden by the bidder. By this scheme, the problem of segmented liquidity, along 15 with the restrictive need to provide the exchange pool with liquidity for all cryptocurrencies involved, are effectively removed. Fig.1D shows a combination of the schematic diagrams of the internal structure (Fig. 1B) and the external structure (Fig.1C) of a cryptocurrency exchange enabled by an exemplary embodiment. The cryptocurrency exchange scheme 400 comprises the external exchange pool 20 410 which is the only exchange pool that is apparent to the user. The external exchange pool 410 further comprises the first, second, third internal exchange pools 411, 412, 413 and so forth up to the ithinternal exchange pool 41i. These internal exchange pools 411, 412, 413, …, 41i are hidden from the users’ view and underlie the working of the external exchange pool 410. This scheme is enabled by the involvement of the virtual intermediary token, as previously 25 described. Next, Fig.2 shows a schematic diagram of a computer system according to an exemplary embodiment. In this embodiment, a computer system 1000 comprises a plurality of user devices 1100, which are computer devices (inclusive of any form of terminal and mobile device) jointly running a method according to the present invention. The computer system 1000 features no 30 centralized machine or server, and thus the method run by such computer system 1000 is a decentralized method. The user devices 1100 are connected through an information network 1200. Said information network 1200 may be the internet or an intranet, public or private, wired or connected wirelessly, or any combination of the foregoing. Each of the user devices 1100 is not bound to any of the aforementioned roles or purposes for which the respective users interact with the embodiment. It is required only that the user devices 1100 are adapted be able to run by an automated market maker (AMM) protocol, conventionally comprising a set of smart 5 contracts, that administers a method according to an embodiment. Therefore, the user devices’ 1100 preferred features include: they are adapted to be electronically connected to a processor 1110 which is adapted to execute a computer program product comprising computer-readable instructions, which when executed thus causes the user device(s) 1100 to carry out a method according to the embodiment; they are adapted to be electronically connected to a non-transitory 10 storage medium 1120 having stored the computer program of said nature; or they are otherwise configured to carry out the method according to the embodiment. Preferably, each of the user devices is adapted to be electronically connected to a private key storage medium 1130, also known in the relevant arts as a cryptocurrency wallet, of the respective user. Said private key storage medium 1130 is a device which provides the user with access to their cryptocurrency on 15 the distributed ledger. Further, Fig.2 illustrates one of the possible electronical connections between the user device 1100, the processor 1110, the non-transitory storage medium 1120 and the private key storage medium 1130, whereby the processor 1110 and the non-transitory storage medium 1120 are permanent components of the user device 1110 whereas the private key storage medium 1130 20 is an external and / or portable device that is adapted to be removably connected to the user device 1100 via a conventional input / output port. Regardless, the concept of the present invention is not limited to this precise configuration. An embodiment is as well compatible with other manner of electronical connections that are known in the arts, such as the non-transitory storage medium 1120 being an external device, and the private key storage medium 1130 being a cloud storage 25 rather than an external device. The aforesaid description should suffice to establish that an embodiment may involve any number of cryptocurrencies in the exchange. In the following exemplary embodiments, however, the second cryptocurrency is Bitcoin (BTC), the first cryptocurrency is Ethereum (ETH), and the virtual intermediary token is entitled virtual “A” US dollar (vAUSD) unless 30 otherwise specified. Also in the exemplary embodiments, the price of vAUSD follows the current price of the US dollar (USD) at the given time. However, owing to the concept of a virtual intermediary token, the exemplary vAUSD would imitate USD in its price as a reference point only. The key concept that the virtual intermediary token is prevented from being accumulated freely from a liquidity-providing position would in turn prevent the vAUSD from being traded without the involvement of the AMM protocol that administers an embodiment, and from being minted. 5 Liquidity-provision component Fig.3 shows a graph representing a price curve, its components and their relationship with liquidity-providing positions according to an exemplary embodiment. The price curve 2000 represents liquidity 2100 (y-axis) cumulatively provided (area under the curve) to different 10 prices 2200 (x-axis) at a given time. Here, the liquidity 2100 (y-axis) is vAUSD and the price 2200 (x-axis) is vAUSD per ETH. At this time, the current price 2300 for the exchange between ETH and vAUSD is indicated by a bold line. Further, the price curve 2000 is split by ticks 2400 (dashed lines in Fig.3) into several price increments 2500. Each price increment 2500, being defined by two adjacent ticks 2400, covers a predetermined price unit on the price curve 2000. 15 In this embodiment, the price unit is 0.01 %. This means each tick 2400 is 0.01 % in price away from the neighboring tick 2400. In this exemplary embodiment, Alice is the liquidity provider. To provide liquidity for ETH, Alice selects a portion of the price curve 2000, said portion being formed of one or more of the adjoining price increments 2500. The selected portion becomes Alice’s price range 2600 20 (shaded area in Fig.3), within which the liquidity is to be provided, and upon which Alice’s liquidity-providing position is to be conditioned. The AMM protocol then activates the liquidity- providing position for Alice (i.e., Alice owns that liquidity-providing position) for said price range 2600. Then the AMM protocol makes available on the distributed ledger a certain amount of vAUSD. The amount of vAUSD made available thus on the distributed ledger is a function 25 of the amount of the ETH pledged by Alice. In this embodiment where the price unit is 0.01 %, all possible price values p at any integer index i are initialized in ticks 2400 using Formula [1]: ^^(^^)= 1.0001^[1] 30 If the price falls within the range of liquidity-providing position (i.e., within the price range 2600), then upon a successful exchange according to that price, the AMM protocol generates a liquidity provision fee for the liquidity provider. If the amount of the asset decreases during the exchange, then the price p increases. The increased price p may move out of the range of the liquidity-providing position. In such case, the AMM protocol stops generating the liquidity provision fee. In this exemplary embodiment, the assets are virtual reserves x and y. Each price increment 2500 across the price curve 2000 is associated with specific amounts of x and y. These virtual reserves x and y of vAUSD and ETH, respectively, are bases for the calculations of liquidity L and the square root of the price range bounds^^^^and^^^^. Alice’s provision of liquidity increases the liquidity (i.e., causing the curve to Alice’s selected price range 2600 to elevate); and deactivation of her position (see further below on deactivation) decreases the liquidity (i.e., causing the curve corresponding to Alice’s selected price range 2600 to drop). Further, another users’s exchange of ETH for vAUSD and vice versa affects the amount of both assets and hence the price. Therefore, the price P or the liquidity L changes at a particular time. The reserves (x, y) for a liquidity-providing position as conditioned upon a price range [Pa, Pb] are described by Formula [2]: ൬ ^^ +^^^್^ ∙ ൫ ^^ + ^^^^^^൯ = ^^ଶ[2] The liquidity L of the position can be calculated as L of x, which is represented by the following Formulas [3]: ^^ ^ ௫ = ^^ · √ ⋅^^್[3] When Alice pledges ETH to the AMM protocol, the protocol calculates amount of vAUSD (y), which is represented by Formula [4] below. ^^ = ^^௫⋅ (√^^ −^^^^) [4] In this exemplary embodiment, Alice initiates the provision of liquidity by selecting a certain price range 2600 and pledge 1 ETH (x) to that price range 2600. That price range 2600 comprises a certain price increment 2500 which is the focus of this example. Suppose at that time and in that particular price increment 2500, the current price (P) 2300 of ETH is 3,000 vAUSD, and Alice wants to add liquidity (L) in a price range from −20% to +25% around the current price, consequently the lower bound (Pa) of her price range is 2,400 vAUSD, and the upper bound (Pb) of her price range is 3,750. The amount of vAUSD (y) needed to open a position in this range will be calculated using the following formulas [3] and [4]: ^^ = ^^ ·√^ ⋅^^್ √ଷ,^^^ ⋅ √ଷ,^ହ^^^್ି √^ = 1 ⋅√ଷ,^ହ^ ି√ଷ,^^^ ≈ 518.810253, = 3,000 a range of her choosing, resulting in 3,000 vAUSD being made additionally available on the distributed ledger. If Alice were to pledge more ETH, then part of the vAUSD is to be made available according to such variables as x, L, P, Pa, Pb. In that case, the resulting sum of vAUSD is likely to be different. In the exemplary embodiment, the price range 2600 selected by Alice comprises a plurality of price increments 2500; thus, the AMM protocol applies the same constraint to all the price increments 2500 forming the price range 2600, so that the resulting liquidity L does not change any of said plurality of price increments 2500 within which the resulting price falls. It should be further noted that Alice may select multiple price ranges 2600 of the same price curve 2000 and provide liquidity of ETH within those multiple price ranges 2600. Then the AMM protocol will follow a procedure similar to the foregoing description for each price range 2500 which Alice selected. Swapping component After the AMM protocol has accordingly made available the vAUSD on the distributed ledger and when Alice’s liquidity-providing position is still active, the intended exchange may take place upon a bid from a bidder. In this embodiment, said bidder is Bob. When Bob supplies his ETH and indicates his intention to exchange that amount ETH for BTC, the AMM protocol exchanges that amount of ETH for the vAUSD, which is then available following Alice’s provision of liquidity. This conversion from ETH to vAUSD is considered the “first swap”. Then, the AMM protocol further exchanges that vAUSD for the ETH previously pledged by one or more liquidity providers. This conversion from vAUSD to BTC is considered the “second swap”. If the price falls within the price range within which Alice has provided the liquidity with 5 her ETH, then the AMM protocol generates a liquidity provision fee for Alice. In this exemplary embodiment, said liquidity provision fee is calculated at the rate of 0.3 %. This liquidity provision fee may be changed based on the second cryptocurrency and the first cryptocurrency as well as their volatilities. Preferably, the fee rate is lower for an exchange between the first and second cryptocurrencies which are similar (e.g., between stablecoins) and higher for an exchange 10 between the first and second cryptocurrencies which are different (e.g., between “niche” cryptocurrencies). In an embodiment, the AMM protocol may be configured so as the liquidity provision fee is incurred differently. The first example is to incur the full liquidity provision fee upon the completion of two swaps (i.e., generating the fee at the rate of 0.3 % after the first and second swaps); the second example is to incur half of the liquidity provision fee upon the 15 completion of each swap (i.e., generating the fee at the rate of 0.15 % after the first swap, and then another 0.15 % after the second swap). Also in this embodiment, the liquidity provision fee is not supplied to Alice upon the success of Bob’s bid; the AMM protocol waits until the deactivation of liquidity-providing position before causing that supply to occur. In this exemplary embodiment, Bob initiates the exchange that amount ETH for BTC 20 and pledge 1 ETH (y). Suppose at that time and in that particular price increment 2500, the current price (P) 2300 is 3,000 vAUSD, x, the vAUSD reserve, is 3,000,000 vAUSD; and y, the ETH virtual reserve, is 1,000 ETH. Bob’s 1-ETH pledge makes the projected change of ETH virtual reserve Δy become 1 ETH. Suppose further that two adjacent ticks 2400, which define one price increment 2500, are predetermined to cover 60 price units. Consequently, the AMM 25 protocol runs the calculations and performs the working steps based upon the functions as represented by the above Formulas [1] – [4] as follows. Based upon Formulas [2], [3], and [4]: ^^ =^^^ ^^ = ^3,000,000 × 1,000 = 54,772.26 30 Next, the AMM protocol finds whether the above Δ√P and √P would cause the resulting price to stay within the same price increment 2200 or to fall within a different price increment 2200. ∆√^^ =∆௬^ ^ =ିହହସ,^^ଶ.ଶ^ ≈ 1.83 × 10 ≈ 0.01826 If the resulting to fall within a different price increment 2500, then the AMM protocol proceeds to calculate Δy within the same price increment 2500. If, on the other hand, the resulting Δ√P causes the price to fall within a different price increment 2500, then the AMM protocol applies a constraint: it allows the provision of vAUSD within a certain price increment 2500 only in the amount (and thus the resulting liquidity) that does not change the price increment 2500 within which the resulting price falls. Based upon Formula [1]: ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ = 2 ∙ √ ^^ = −80,064 ^^ ^^ ^^ ^^ ^^ ^^ ^^ = 2 ∙ ൫√ ^^ + ∆√ ^^൯ = −80,044 Because one to cover 60 price units, the projected price change resulting from Alice’s pledge of 1 ETH will not cause the price to fall within a different price increment 2500. Consequently, without applying any constraint the AMM protocol proceeds with calculating the vAUSD to be made available (represented by the projected change of vAUSD reserve Δx). The calculation follows Formula [5] below: ^^( ^^) = 2 ∙^^^^^௪[5] Then, ^ ^(^ ^^^^^) ^^௪= 1.0001ଶ= 1.0001ିସ^,^ଶସ≈ 0.01828 ∆ 1 1 1 1 1 √ = − = ^^^ ^^^^௪ √^^0.01828 − 0.01826 ≈ −0.06 ∆ ^^ = ^^ ∙ ∆ 1 ^^ = −3,286.34 √ Then, the AMM protocol further exchanges that 3,286.34 vAUSD for the BTC previously pledged by one or more liquidity providers and Bob receives that BTC. 5 The liquidity-providing position stays active until it is deactivated by the liquidity provider or otherwise. In the case of deactivation by the liquidity provider, Alice may elect to deactivate (i.e., close) her liquidity-providing position in order to regain her access to the ETH she previously pledged. In this embodiment, Alice must first supply the vAUSD to the AMM protocol so as to balance the amount of vAUSD previously made available on the distributed 10 ledger following Alice’s pledging her ETH. In this exemplary embodiment, the method is configured to carry out full deactivation if such deactivation is initiated by the liquidity provider, and partial deactivation if such deactivation is initiated by the rebalancer (see further below on rebalance component). Thus, in this embodiment, Alice must supply the full amount of said vAUSD, i.e., vAUSD 3,000, to succeed in causing the deactivation. Following Alice’s successful 15 deactivation, the AMM protocol according to the exemplary embodiment supplies (i.e., returns) (i) ETH to Alice in the amount pledged by Alice previously, minus the amount that has been exchanged for the vAUSD in the “second swap” pursuant to Bob’s and other bidders’ bids, and (ii) the liquidity provision fee (if any) generated by the AMM protocol pursuant to Bob’s and other bidders’ bids. In this embodiment, the AMM protocol supplies Alice with the liquidity 20 provision fee (if any) in ETH. Further, this embodiment’s AMM protocol is configured to prevent a successful deactivation from affecting the price. In this exemplary embodiment, the vAUSD is prevented, preferably by the AMM protocol, from being accumulated freely from the liquidity-providing position. Specifically, the virtual intermediary token is not allowed to be minted. This preferred feature ensures that the 25 vAUSD is strictly used as a token for the stated purposes (i.e., as the intermediary of exchange and as the requisite for deactivating the liquidity-providing position), and not as a store of value that may be traded elsewhere. It also secures the embodiment against security attacks such as price manipulations and time-differential attacks, where a token on which a protocol depends is accumulated slowly over time and then dumped into market abruptly to cause a large price 30 impact. Also in this embodiment, following Alice’s successful deactivation, the vAUSD supplied by Alice to the AMM protocol has fulfilled its stated purposes and thus is purged. Preferred security components This exemplary embodiment is also secure against a price-lock scenario in which the shortage in the liquidity within the price range within which the liquidity provider has provided the liquidity, prevents the same liquidity provider from deactivating the same liquidity-providing 5 position. An example cause of this scenario is when the liquidity provider has only one type of the first cryptocurrency that has been previously pledged. Under the administration of the embodiment’s AMM protocol, the market’s demand for that first cryptocurrency becomes very low. This prevents the liquidity provider from acquiring more virtual intermediary token (if there is a shortfall in the amount for deactivating the liquidity-providing position) by exchanging that 10 first cryptocurrency for the virtual intermediary token with the embodiment. It should be reiterated that in the price-lock scenario, all of the first cryptocurrency has been pledged and thus committed to the respective liquidity-providing position; the liquidity provider cannot use that cryptocurrency without the mechanism to be described in the following paragraph. In the event that Alice has pledged all her ETH to provide liquidity according to the 15 above description before encountering the price-lock scenario, this exemplary embodiment allows Alice to acquire the shortfall amount of vAUSD through an external distributed ledger (i.e., a distributed ledger which is otherwise unrelated to the exchange scheme enabled by the embodiment; not a distributed ledger that is used by a liquidity provider, bidder, keeper, repurchaser, rebalancer, etc.) by the following mechanism: The AMM protocol permits Alice to 20 exchange her pledged ETH for a third cryptocurrency of which liquidity is still available in the embodiment; in this embodiment, the third cryptocurrency is USD stablecoin (USDC). Under such permission, the exchange of ETH (still committed to Alice’s liquidity-providing position) for USDC may take place in an external distributed ledger. Following a successful external exchange, Alice gains USDC. Then under the AMM protocol’s permission, Alice may use that 25 USDC only to exchange it for vAUSD with the embodiment’s AMM protocol. Consequently, Alice may supply that vAUSD, provided through the external distributed ledger, to the AMM protocol in order to cover the original shortfall and finally deactivate her liquidity-providing position. In this way, this preferred feature facilitates the deactivation of the liquidity-providing position in circumstances where there is shortage in the liquidity within the price range, i.e., in 30 the price-lock scenario. Further, the exemplary embodiment comprises all the aforementioned stop-loss component, repurchase component, and rebalance component. The stop-loss threshold is the price; the repurchase threshold and rebalance threshold are the indicators of the liquidity- providing position’s “health”, i.e., the “debt-to-total-value ratio”, which is the ratio of the virtual intermediary token required for deactivating the liquidity-providing position to the total value of the liquidity-providing position. 5 According to the concept of the present invention, the stop-loss threshold is predetermined by the liquidity provider. Particularly, the liquidity provider can indicate and adjust the price that corresponds to the stop-loss threshold at any time. Although this concept means that the stop-loss component may be triggered in any order with respect to the repurchase component and the rebalance component, the exemplary embodiment provides the following 10 incentive mechanism: From the first cryptocurrency pledged by the liquidity provider, the repurchasing fee and / or rebalancing fee is deducted and then given to the repurchaser and the rebalancer upon the success of the respective component (i.e., those fees are paid by the liquidity provider). This means if the liquidity provider allows the repurchase component or the rebalance component to be triggered, they will receive the first cryptocurrency less than they would from 15 the manual deactivation or from the automatic force-deactivation caused by the stop-loss component. This mechanism incentivizes the liquidity provider to set the stop-loss threshold so as to trigger the stop-loss component before both the repurchase component and the rebalance component. In this embodiment, a liquidity-providing position is considered very healthy when the 20 abovementioned ratio is 0.50. A higher such value indicates a higher debt over the total value (hence a poorer health) of the respective liquidity-providing position. Here, the repurchase threshold is predetermined to be 0.75 and the rebalance threshold is predetermined to be 0.80. According to the predetermined values of the aforesaid thresholds, the repurchase component is intended to be triggered before the rebalance component. 25 In the exemplary embodiment, when the price has reached the predetermined stop-loss threshold, the stop-loss component is triggered. Consequently, the AMM protocol automatically forces the deactivation of the liquidity-providing position along with the related working steps. If Alice is the liquidity provider in the exemplary embodiment, then when the price has reached the stop-loss threshold, Alice’s vAUSD is force-supplied to the AMM protocol so as to balance 30 the amount of vAUSD previously made available on the distributed ledger following Alice’s pledging her ETH. Then Alice’s liquidity-providing position is force-deactivated, and the AMM protocol supplies (i.e., returns) (i) ETH to Alice in the amount pledged by Alice previously, minus the amount that has been exchanged for the vAUSD in the “second swap” pursuant to Bob’s and other bidders’ bids, and (ii) the liquidity provision fee (if any) generated by the AMM protocol pursuant to Bob’s and other bidders’ bids. In the exemplary embodiment, when the ratio of the virtual intermediary token required 5 for deactivating the liquidity-providing position to the total value of the liquidity-providing position has reached 0.75, the repurchase component is triggered. Consequently, the AMM protocol permits a repurchaser to supply the AMM protocol with vAUSD, or with a repurchasing cryptocurrency which is subsequently exchanged for vAUSD. In this embodiment, said repurchaser is Carol. Once the repurchase component is triggered thus, the AMM protocol may 10 alert Carol to this change by way of transmitting a notification, prompting Carol to indicate her decision whether to execute the repurchase; alternatively, the AMM protocol may execute the repurchase automatically under a smart contract or a similar arrangement that has been predetermined and agreed by Carol. In any case, Carol is permitted to execute the repurchase by supplying the AMM protocol with vAUSD or with a repurchasing cryptocurrency in the amount 15 that offsets the “debt” of the liquidity-providing position. Said “debt” refers to vAUSD required of Alice (the liquidity provider and thus the original owner of the liquidity-providing position being repurchased) to deactivate her liquidity-providing position. As such, offsetting the “debt” brings down the ratio which is the basis of the repurchase threshold. The repurchasing cryptocurrency may be any cryptocurrency. Upon said supply of vAUSD or repurchasing 20 cryptocurrency, the repurchase succeeds and the AMM protocol transfers the liquidity-providing position from Alice to Carol, along with any liquidity provision fee that had been previously generated yet unclaimed during Alice’s ownership of that liquidity-providing position. Carol then replaces Alice as the new liquidity provider with respect to the repurchased liquidity- providing position, from which Carol will earn liquidity provision fees from subsequent bidders. 25 In this embodiment, the AMM protocol is configured so that following the repurchase, the resulting debt-to-total-value ratio must become 0.5. The vAUSD provided or derived from Carol’s supply will then be exchanged for ETH, which is then supplied to Alice. Further, the exemplary embodiment preferably provides a repurchasing fee mechanism to incentivize Alice to use the stop-loss component to prevent her liquidity-providing position 30 from being repurchased by Carol. In this embodiment, the repurchasing fee is calculated based upon a predetermined rate of 1 % of the liquidity-providing position’s “total value”. The “equity” refers to ETH in the amount pledged previously by Alice minus the amount that has been exchanged for the vAUSD in the “second swap” pursuant to Bob’s and other bidders’ bids; and the “value” means the vAUSD equivalent. The repurchasing fee, calculated according to said rate, is deducted from the ETH to be supplied to Alice upon the success of Carol’s repurchase; and then said repurchasing fee is supplied to Carol. In this way, if Alice allows the repurchase 5 component to take place (i.e., by failing to trigger the stop-loss component before Carol is permitted to execute the repurchase), then Carol will gain the repurchasing fee at Alice’s expense. Further, in this embodiment, when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position to the total value of the liquidity-providing position 10 has reached 0.80 without any prior execution of the repurchase component, then the rebalance component is triggered. Consequently, the AMM protocol permits a rebalancer to execute the rebalance component. In this embodiment, this rebalancer is Dan. Once the rebalance component is triggered thus, the AMM protocol may alert Dan to this change by way of transmitting a notification, prompting Dan to indicate his decision whether to execute the rebalance; 15 alternatively, the AMM protocol may execute the rebalance automatically under a smart contract or a similar arrangement that has been predetermined and agreed by Dan. In any case, Dan is permitted to execute the rebalance by causing the AMM protocol to exchange part (25 % in this embodiment) of the “total” (defined further above) of Alice’s liquidity-providing position for vAUSD. Then the AMM protocol deactivates a predetermined fraction of Alice’s liquidity- 20 providing position based on the amount of vAUSD arising from such partial exchange of the “equity” of Alice’s liquidity-providing position. As such, Dan’s execution of the rebalance component reduces the “equity” of Alice’s liquidity-providing position, thereby bringing down the ratio which is the basis of the rebalance threshold. Further, as a result of partial deactivation, Alice’s liquidity-providing position shrinks in terms of its value. Alice continues to have the 25 access to her downsized liquidity-providing position and earn liquidity provision fees from subsequent bidders. Furthermore, the exemplary embodiment preferably provides a rebalancing fee mechanism to incentivize Alice to use the stop-loss component to prevent her liquidity-providing position from being rebalanced by Dan. In this embodiment, the rebalance fee is calculated based 30 upon a predetermined rate of 5 % of the liquidity-providing position’s “equity” (see the explanation in the preceding paragraph) before the rebalance. The rebalancing fee, calculated according to said rate, is deducted from the equity in addition to the part of the equity that is to be exchanged for vAUSD following the execution of rebalance component; and then said fee is supplied to Dan. In this way, the amount of ETH to be supplied to Alice upon her eventual deactivation of her liquidity-providing position becomes less than that of the case where the rebalance component is not triggered. Therefore, if Alice allows the rebalance component to take 5 place (i.e., by failing to trigger the stop-loss component before Dan is permitted to execute the rebalance), then Dan will gain the rebalancing fee at Alice’s expense. Example run of preferred security components The following description will be directed to an example run of preferred security 10 components, namely, the stop-loss component, the repurchase component and the rebalance component, in order to illustrate the relationship between these components which are part of the exemplary embodiment. It should be reiterated that the price of vAUSD follows that of the USD, and thus a change of USD price will affect the price of vAUSD. Said change in price is considered an external factor. 15 First, suppose at the time when the price of ETH is vAUSD 1,200 per ETH, Alice selects a price range at ± 5 % of the current price. Then Alice’s price range covers a range from vAUSD 1,140 to 1,260 per ETH, with the current price of vAUSD 1,200 per ETH placed at the center of the price range. Within that price range Alice pledges 1 ETH to provide liquidity; and conditioned upon that price range, the AMM protocol activates a liquidity-providing position for 20 Alice and makes available vAUSD 1,200 on a distributed ledger. Upon that activation, the ratio of vAUSD required for deactivating Alice’s liquidity-providing position to the total value of that liquidity-providing position (the “debt-to-total-value ratio”) is 0.5 (i.e., vAUSD 1,200 debt divided by the sum of ETH 1 debt plus ETH 1 equity, times the current price of vAUSD 1,200 per ETH). With this debt-to-total-value ratio, Alice’s liquidity-providing position is considered 25 healthy. Later, suppose that the ETH price drops to vAUSD 1,000 per ETH. This updated price is out of the price range selected initially by Alice. At that time, suppose that Alice’s liquidity- providing position has yet to experience a successful exchange, then that liquidity-providing position still holds ETH 1 of equity, though the change of price affects the vAUSD-equivalent 30 amount of the debt-to-total-value ratio’s denominator: The debt-to-total-value ratio becomes 0.6 (i.e., vAUSD 1,200 debt divided by the sum of ETH 1 debt plus ETH 1 equity, times the current price of vAUSD 1,000 per ETH). This price is disadvantageous to Alice because it stops her liquidity-providing position from generating the liquidity provision fee and worsens the debt-to- total-value-ratio. If Alice has previously indicated a stop-loss threshold at a price of vAUSD 1,000 per ETH, then the AMM protocol will trigger the stop-loss component. This causes the following mechanism to operate automatically: from the ETH 2 total value of Alice’s liquidity- 5 providing position, ETH 1.2 will be exchanged for vAUSD according to the current price, thereby resulting in vAUSD 1,200 to match the debt of that liquidity-providing position. That amount of vAUSD will then be supplied to the AMM protocol to deactivate that liquidity- providing position. Following the deactivation, the ETH 0.8 remainder of Alice’s liquidity- providing position is supplied back to Alice. 10 Next, suppose that Alice fails to indicate the stop-loss threshold, and the ETH price continues to drop to vAUSD 800 per ETH. Then, Alice’s liquidity-providing position still holds ETH 1 of equity. With this updated price, the debt-to-total-value ratio becomes 0.75 (i.e., vAUSD 1,200 debt divided by the sum of ETH 1 debt plus ETH 1 equity, times the current price of vAUSD 800 per ETH) and thus reaches the repurchase threshold. In this exemplary 15 embodiment, the repurchasing fee rate is 1 % of the liquidity-providing position’s equity value (i.e., the vAUSD equivalent of equity). Further, the current equity value is ETH 2 times vAUSD 800 per ETH minus the debt of vAUSD 1,200, and thus becomes vAUSD 400. The AMM protocol then alerts Carol to execute the repurchase component. If Carol decides (via a smart contract or otherwise) to execute the repurchase, she must supply the AMM protocol with the 20 equity value minus the repurchasing fee, i.e., 99 % of vAUSD 400 which becomes vAUSD 396. However, this exemplary embodiment embodies a further constraint: the liquidity-providing position’s debt-to-total-value ratio must become 0.5 after the repurchase. To satisfy this constraint, Carol must supply additional vAUSD 400. Thus, Carol must provide the AMM protocol with vAUSD 796 in total, or an equivalent amount of any repurchasing cryptocurrency, 25 in order to complete the repurchase. If Carol provides the repurchasing cryptocurrency, the AMM protocol will exchange it for the equivalent amount of vAUSD without incurring any fee. Following a successful repurchase, the liquidity-providing position previously owned by Alice is transferred to Carol; the repurchasing fee of vAUSD 4 is supplied to Carol; the vAUSD 796 supplied by Carol is split: vAUSD 396 is further supplied to Alice, and the remaining vAUSD 30 400 is used to partially offset the vAUSD 1,200 debt, thereby reducing the liquidity providing position’s debt-to-total-value ratio back to 0.5 (i.e., vAUSD 800 debt divided by the sum of ETH 1 debt plus ETH 1 equity, times the current price of vAUSD 800). Finally, suppose that Carol fails to or decides not to execute the repurchase component, and the ETH price continues to drop to vAUSD 750 per ETH. Then, Alice’s liquidity-providing position still holds ETH 1 of equity. With this updated price, the debt-to-total-value ratio becomes 0.8 (i.e., vAUSD 1,200 debt divided by the sum of ETH 1 debt plus ETH 1 equity, 5 times the current price of vAUSD 750 per ETH) and thus reaches the rebalance threshold. In this exemplary embodiment, it is predetermined that the rebalancing will deactivate 25 % of the total of the liquidity-providing position; and that the rebalancing fee rate is 5 % of said fraction to be deactivated. Accordingly, the fraction to be deactivated is ETH 0.5 (i.e., 25 % of ETH 2) and the rebalancing fee is ETH 0.025 (i.e., 5 % of ETH 0.5). The AMM protocol then alerts Dan to 10 execute the rebalance component, and Dan is not required to supply any of his asset to participate. If Dan decides (via a smart contract or otherwise) to execute the rebalance, then the deactivated fraction (ETH 0.5) is split: ETH 0.025 is supplied to Dan as a rebalancing fee; the remaining ETH 0.475 is exchanged for vAUSD 356.25 according to the current price (i.e., ETH 0.475 times vAUSD 750 per ETH). That amount of vAUSD is then used to partially offset the 15 vAUSD 1,200 debt, thereby bringing Alice’s liquidity providing position’s debt-to-total-value ratio down to 0.75 (i.e., vAUSD 843.75 debt divided by ETH 1.5, times the current price of vAUSD 750). Following a successful rebalance, Dan receives a repurchasing fee of ETH 0.025, while Alice continues to be the owner of her liquidity-providing position which now has an improved health, though her liquidity-providing position is now downsized, and part of its equity 20 (which is turn is part of its total) is now converted to Dan’s rebalancing fee. List of References 100 Cryptocurrency exchange scheme (prior art) 101 First exchange pool 25 102 Second exchange pool 103 Third exchange pool 10i ithexchange pool 200 Cryptocurrency exchange scheme (embodiment, internal structure) 201 First exchange pool 30 202 Second exchange pool 203 Third exchange pool 20i ithexchange pool 300 Cryptocurrency exchange scheme (embodiment, external structure) 310 Exchange pool 400 Cryptocurrency exchange scheme (embodiment, combined structure) 410 External exchange pool 5 411 First internal exchange pool 412 Second internal exchange pool 413 Third internal exchange pool 41i ithinternal exchange pool 1000 Computer system 10 1100 User device 1110 Processor 1120 Non-transitory storage medium 1130 Private key storage medium 1200 Information network 15 2000 Price curve 2100 Liquidity 2200 Price 2300 Current Price 2400 Tick 20 2500 Price increment 2600 Price range

Claims

CLAIMS 1. A method for exchanging, through a distributed ledger administered by an automated market maker protocol, a second cryptocurrency for a first cryptocurrency according to a price in relation thereto, said method comprising the following steps: 5 (a) activating one or more liquidity-providing positions for a liquidity provider, each of said liquidity-providing position being conditioned upon a price range within which liquidity is provided, said price range corresponding to a portion of a price curve, and said portion being selected by the liquidity provider; (b) making available on the distributed ledger a virtual intermediary token in the 10 amount that is a function of the amount of the cryptocurrency pledged by the liquidity provider; (c) when the liquidity-providing position is active and the price falls within the price range — (i) exchanging the second cryptocurrency for the virtual intermediary 15 token on the distributed ledger, (ii) further exchanging the virtual intermediary token from step c (i) for the first cryptocurrency, and (iii) generating a liquidity provision fee for the liquidity provider ; and (d) fully or partially deactivating said liquidity-providing position if the automated 20 market maker protocol is supplied with the virtual intermediary token so as to fully or partially balance the amount of the virtual intermediary token previously made available on the distributed ledger according to step (b), wherein said virtual intermediary token is prevented from being accumulated freely from the liquidity-providing position. 25 2. The method according to claim 1, which is a decentralized method.

3. The method according to claim 1, wherein the price curve is split into several price increments, each of said price increments covering a predetermined price unit; and wherein said portion is formed of one or more of the adjoining price increments.

4. The method according to claim 3, wherein the price is also a function of the liquidity, and 30 wherein the amount of the virtual intermediary token being made available according to step(b) is constrained such that the resulting liquidity does not change the price increment within which the resulting price falls.

5. The method according to claim 4, wherein the liquidity is provided within a plurality of price increments, and wherein the amount of the virtual intermediary token being made available 5 according to step (b) is constrained such that the resulting liquidity does not change any of said plurality of price increments within which the resulting price falls.

6. The method according to claim 1, wherein following step (d), the following are supplied to the liquidity provider: - the first cryptocurrency in the amount pledged by the liquidity provider in 10 step (b) minus the amount exchanged for the virtual intermediary token in step (c) (ii); and - the liquidity provision fee generated in step (c) (iii).

7. The method according to claim 6, wherein following step (d), the virtual intermediary token is purged. 15 8. The method according to claim 6, wherein following step (d), the price is unchanged.

9. The method according to claim 6, wherein the currency of the liquidity provision fee corresponds to the first cryptocurrency.

10. The method according to claim 1, the virtual intermediary token being supplied to the automated market maker protocol in step (d) being fully or partially provided through an 20 external distributed ledger, thereby facilitating the deactivation of the liquidity-providing position in circumstances where there is shortage in the liquidity within the price range.

11. The method according to claim 1, further comprising the following step: (e) when the price has reached a predetermined stop-loss threshold, force- deactivating said liquidity-providing position. 25 12. The method according to claim 11, wherein said stop-loss threshold is predetermined by the liquidity provider.

13. The method according to claim 1, further comprising the following steps:(f) when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position in step (d) to the total value of the liquidity-providing position has reached a predetermined repurchase threshold— (i) permitting a repurchaser to supply the automated market maker protocol 5 with the virtual intermediary token, or with a repurchasing cryptocurrency which is subsequently exchanged for the virtual intermediary token, and (ii) upon the supply according to step (f) (i), transferring the liquidity- providing position to the repurchaser.

14. The method according to claim 13, further comprising the following step: 10 (f) (iii) upon the transferal according to step (f) (ii), supplying a repurchasing fee to the repurchaser.

15. The method according to claim 1, further comprising the following step: (g) when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position in step (d) to the total value of the liquidity-providing 15 position has reached a predetermined rebalance threshold — (i) permitting a rebalancer to cause the automated market maker protocol to exchange part of equity for the virtual intermediary token, said equity being the first cryptocurrency in the amount pledged by the liquidity provider in step (b) minus the amount exchanged for the virtual 20 intermediary token in step (c) (ii); (ii) deactivating a predetermined fraction of the liquidity-providing position based on the amount of the virtual intermediary token arising from step (g) (i).

16. The method according to claim 15, further comprising the following step: 25 (g) (iii) supplying a rebalancing fee to the rebalancer.

17. The method according to claim 1, further comprising the following steps: (f) when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position in step (d) to the total value of the liquidity-providing position has reached a predetermined repurchase threshold —(i) permitting a repurchaser to supply the automated market maker protocol with the virtual intermediary token, or with a repurchasing cryptocurrency which is subsequently exchanged for the virtual intermediary token, (ii) upon the supply according to step (f) (i), transferring the liquidity- 5 providing position to the repurchaser; and (g) when the ratio of the virtual intermediary token required for deactivating the liquidity-providing position in step (d) to the total value of the liquidity-providing position has reached a predetermined rebalance threshold— (i) permitting a rebalancer to cause the automated market maker protocol to 10 exchange part of equity for the virtual intermediary token, said equity being the first cryptocurrency pledged by the liquidity provider in step (b) minus the amount exchanged for the virtual intermediary token in step (c) (ii); (ii) deactivating a predetermined fraction of the liquidity-providing position 15 based on the amount of the virtual intermediary token arising from step (g) (i), wherein the repurchase threshold is lower than the rebalance threshold.

18. A computer program product comprising computer-readable instructions, which, when executed by a processor, causes a computer device or a computer system to carry out a 20 method according to any one of claims 1 – 17.

19. A non-transitory storage medium having stored the computer program product according to claim 18.

20. A computer device or a computer system that is configured to carry out the method according to any one of claims 1 – 17.

Citation Information

Patent Citations

  • Visual Representation and Configuration for Trading Strategies

    US20130132257A1

  • Conducting optimized cross-blockchain currency transactions using machine learning

    US20190340586A1

  • Decentralized Token Swapping Method with Low Slippage Point and High Liquidity

    US20220076217A1

  • Systems, methods, and storage media for managing digital liquidity tokens in a distributed ledger platform

    WO2020223332A1

  • Methods and system for cross-blockchain collateralization

    WO2022236155A1

Cited By

  • Concurrent rebalancing of cryptocurrency across multiple cryptocurrency networks

    US20260030608A1