US-20260127566-A1 - DYNAMIC MULTI-PATH TRANSFERS
Abstract
Systems and methods for determining and executing complex multi-route transfers of digital assets are described. A multi-route transfer of a source asset for a destination asset may be determined by analyzing a graph representing a plurality of assets and exchanges to determine a plurality of unique transfer paths. A transfer path may reflect a direct transfer in which the source asset is swapped for the destination asset, or it may reflect a series of intermediate transfers in which the source asset is swapped for intermediate asset(s) that are swapped for the destination asset. Dynamic programming can be used to select the transfer paths to include in the multi-route transfer, how to distribute swaps across those transfer paths, and how to distribute swaps for each transfer of a transfer path-thereby optimizing for the total amount of the destination asset received while accounting for transaction fees.
Inventors
- Anton Bukov
- Sergej KUNZ
Assignees
- DEGENSOFT LTD.
Dates
- Publication Date
- 20260507
- Application Date
- 20251021
Claims (20)
- 1 . (canceled)
- 2 . A computer-implemented method performed by a swap platform, the computer-implemented method comprising: receiving, from a user device of a user, an order to swap a starting amount of a source asset in exchange for a destination asset; selecting a subset of exchanges from a datasource of exchanges based on the source asset and the destination asset; generating a graph based on a subset of intermediate assets and the subset of exchanges, wherein the graph is a data structure comprising: a plurality of nodes comprising: a source node representing the source asset; a destination node representing the destination asset; and a plurality of intermediate nodes presenting the subset of intermediate assets; and a plurality of edges linking the plurality of nodes, wherein each edge links a pair of nodes and represents a transfer from a first asset represented by a first node of the pair to a second asset represented by a second node of the pair; evaluating a set of transfer paths, wherein each transfer path exchanges a portion of the starting amount of the source asset for an amount of the destination asset; determining, using dynamic programming, a multi-route transfer comprising a combination of non-conflicting transfer paths that optimize a total amount of destination asset exchanged for the starting amount of the source asset after transaction fees, wherein the combination of non-conflicting transfer paths are selected from the set of transfer paths, wherein dynamic programming comprises reducing a process into subprocesses in a recursive manner and efficiently reusing calculated results of the subprocesses; sending, to the user device, data indicating the multi-route transfer; and causing execution of the multi-route transfer.
- 3 . The computer-implemented method of claim 2 , wherein the subset of intermediate assets is selected from a datastore of assets based on the source asset and the destination asset indicated in the order.
- 4 . The computer-implemented method of claim 2 , wherein at least one transfer path in the set of transfer paths comprises a direct transfer.
- 5 . The computer-implemented method of claim 2 , wherein at least one transfer path in the set of transfer paths comprises an intermediate transfer.
- 6 . The computer-implemented method of claim 2 , wherein the set of transfer paths is determined using a machine learning model.
- 7 . The computer-implemented method of claim 2 , wherein a number of intermediate nodes in the plurality of intermediate nodes is bound by a max number.
- 8 . The computer-implemented method of claim 2 , wherein the source asset and the destination asset are both cryptocurrency tokens.
- 9 . A computer system comprising: one or more processing devices; and one or more memory devices operably coupled to the one or more processing devices, the one or more memory devices storing executable code that, when executed by the one or more processing devices, causes the one or more processing devices to: receive, from a user device of a user, an order to swap a starting amount of a source asset in exchange for a destination asset; select a subset of exchanges from a datasource of exchanges based on the source asset and the destination asset; generate a graph based on a subset of intermediate assets and the subset of exchanges, wherein the graph is a data structure comprising: a plurality of nodes comprising: a source node representing the source asset; a destination node representing the destination asset; and a plurality of intermediate nodes presenting the subset of intermediate assets; and a plurality of edges linking the plurality of nodes, wherein each edge links a pair of nodes and represents a transfer from a first asset represented by a first node of the pair to a second asset represented by a second node of the pair; evaluate a set of transfer paths, wherein each transfer path exchanges a portion of the starting amount of the source asset for an amount of the destination asset; determine, using dynamic programming, a multi-route transfer comprising a combination of non-conflicting transfer paths that optimize a total amount of destination asset exchanged for the starting amount of the source asset after transaction fees, wherein the combination of non-conflicting transfer paths are selected from the set of transfer paths, wherein dynamic programming comprises reducing a process into subprocesses in a recursive manner and efficiently reusing calculated results of the subprocesses; send, to the user device, data indicating the multi-route transfer; and cause execution of the multi-route transfer.
- 10 . The computer system of claim 9 , wherein the subset of intermediate assets is selected from a datastore of assets based on the source asset and the destination asset indicated in the order.
- 11 . The computer system of claim 9 , wherein at least one transfer path in the set of transfer paths comprises a direct transfer.
- 12 . The computer system of claim 9 , wherein at least one transfer path in the set of transfer paths comprises an intermediate transfer.
- 13 . The computer system of claim 9 , wherein the set of transfer paths is determined using a machine learning model.
- 14 . The computer system of claim 9 , wherein a number of intermediate nodes in the plurality of intermediate nodes is bound by a max number.
- 15 . A non-transient computer readable medium containing program instructions for causing a computer system to perform steps comprising: receiving, from a user device of a user, an order to swap a starting amount of a source asset in exchange for a destination asset; selecting a subset of exchanges from a datasource of exchanges based on the source asset and the destination asset; generating a graph based on a subset of intermediate assets and the subset of exchanges, wherein the graph is a data structure comprising: a plurality of nodes comprising: a source node representing the source asset; a destination node representing the destination asset; and a plurality of intermediate nodes presenting the subset of intermediate assets; and a plurality of edges linking the plurality of nodes, wherein each edge links a pair of nodes and represents a transfer from a first asset represented by a first node of the pair to a second asset represented by a second node of the pair; evaluating a set of transfer paths, wherein each transfer path exchanges a portion of the starting amount of the source asset for an amount of the destination asset; determining, using dynamic programming, a multi-route transfer comprising a combination of non-conflicting transfer paths that optimize a total amount of destination asset exchanged for the starting amount of the source asset after transaction fees, wherein the combination of non-conflicting transfer paths are selected from the set of transfer paths, wherein dynamic programming comprises reducing a process into subprocesses in a recursive manner and efficiently reusing calculated results of the subprocesses; sending, to the user device, data indicating the multi-route transfer; and causing execution of the multi-route transfer.
- 16 . The non-transient computer readable medium of claim 15 , wherein the subset of intermediate assets is selected from a datastore of assets based on the source asset and the destination asset indicated in the order.
- 17 . The non-transient computer readable medium of claim 15 , wherein at least one transfer path in the set of transfer paths comprises a direct transfer.
- 18 . The non-transient computer readable medium of claim 15 , wherein at least one transfer path in the set of transfer paths comprises an intermediate transfer.
- 19 . The non-transient computer readable medium of claim 15 , wherein the set of transfer paths is determined using a machine learning model.
- 20 . The non-transient computer readable medium of claim 15 , wherein a number of intermediate nodes in the plurality of intermediate nodes is bound by a max number.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of U.S. patent application Ser. No. 18/439,661, entitled “DYNAMIC MULTI-PATH TRANSFERS,” filed Feb. 12, 2024, which claims the benefit of U.S. Provisional Ser. No. 63/484,317, entitled “SYSTEMS, METHODS, AND DEVICES FOR DYNAMIC MULTI-PATH TRANSFERS,” filed Feb. 10, 2023, the contents of which are incorporated by reference herein in their entirety. Any and all applications for which a foreign or domestic priority claim is identified in the Application Data Sheet as filed with the present application are hereby incorporated by reference under 37 CFR 1.57. TECHNICAL FIELD The embodiments herein are generally directed to systems, methods, and devices for digital asset exchange and smart order routing. More specifically, embodiments of the disclosure relate to determining and executing a multi-route transfer for a cryptocurrency token swap that will maximize the amount of output cryptocurrency token being swapped for. BACKGROUND Users often transfer and exchange digital assets as swaps of blockchain-based cryptocurrency tokens, in which an amount of a source token is exchanged for an amount of a destination token. Such swaps can be performed over centralized exchanges and decentralized exchanges, the latter of which are gaining in popularity. These swaps typically require that the user pay transaction fees to incentivize nodes of the blockchain network to process the transaction. These transaction fees are sometimes referred to as gas fees. A user seeking to execute a large transaction can often lose a substantial fraction of the total transaction amount to slippage, or how much the price for a specific asset has changed, since the large volume of the transaction is more likely to impact market prices and the observed exchange rate. In other words, when a user exchanges a large volume of a source token, the exchange rate between the source token and the destination token (e.g., the amount of the destination token received) may be lower than the exchange rate when the user is seeking to exchange a small volume of the source token. In order to optimize the exchange rate and the amount of destination token received from such transactions, the trade may require additional complexity beyond sending out a single order to execute a simple swap on a single exchange. For example, the transaction could be split up among many different exchanges, resulting in multiple smaller transactions that each exchange a portion of the total amount of source token. Furthermore, one or more of those transactions could instead be performed with intermediary tokens (e.g., first exchanging the source token for an intermediate token instead of directly exchanging for the destination token) if the exchange rates associated with the intermediary tokens are favorable enough. However, breaking up a transaction in this manner is easier said than done. At the planning stage, it must be quickly determined how to split up and organize the transaction in a manner that will optimize the amount of destination token received. This includes determining which exchanges to route orders to, how many tokens to allocate to each order, which intermediary tokens to involve, and so forth. Execution of the transaction must also be done quickly because the exchange rates between tokens will vary across exchanges and change rapidly over time. Any delay in planning or execution could result in the exchange rates changing drastically, which could result in the receipt of a suboptimal amount of destination token or require that the process be repeated. To add additional complexity to the matter, there may be variable transaction fees that must be accounted for to arrive at the optimal solution. Accordingly, there exists a need for enabling large transactions to be performed with less slippage by planning and executing multi-route transfers (e.g., complex multi-token and/or multi-exchange transactions), in a manner that will optimize the amount of destination token received while accounting for transaction fees and complexity. SUMMARY For purposes of this summary, certain aspects, advantages, and novel features are described herein. It is to be understood that not necessarily all such advantages may be achieved in accordance with any particular embodiment. Thus, for example, those skilled in the art will recognize the disclosures herein may be embodied or carried out in a manner that achieves one or more advantages taught herein without necessarily achieving other advantages as may be taught or suggested herein. All of the embodiments described herein are intended to be within the scope of the present disclosure. These and other embodiments will be readily apparent to those skilled in the art from the following detailed description, having reference to the attached figures. The invention is not intended to be limited to any particular disclosed embodiment or embodiments. Systems and methods fo