A Smart Contract-Based Equity Exchange Recommendation System and Method

By constructing a liquidity flow graph and a self-organizing temporary pool, bottleneck nodes are identified, enabling intelligent adjustment and resource optimization of liquidity pools in decentralized trading systems. This solves the liquidity bottleneck problem and improves trading efficiency and user experience.

CN120598679BActive Publication Date: 2026-01-30BEIJING NANSHAN TUOPU TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510684527.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2026-01-30
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

Existing decentralized trading systems lack intelligent adjustment capabilities for liquidity pools, making it unable to dynamically respond to market demands. This leads to increased slippage, low capital efficiency, and a lack of global analysis of the overall equity flow topology, hindering the accurate identification and optimization of key liquidity bottlenecks and resulting in inefficient resource allocation.

Method used

Construct a rights flow graph, identify bottleneck nodes, dynamically build a self-organizing temporary pool based on smart contracts, and generate differentiated path recommendations through a multi-level market structure and cross-level resource allocation, combined with an improved A* algorithm and multi-objective optimization.

Benefits of technology

By accurately identifying and resolving liquidity bottlenecks, overall liquidity efficiency has been improved, slippage in large transactions has been reduced, capital utilization efficiency and user satisfaction have been enhanced, market volatility has been adapted, and a high recommendation accuracy rate has been maintained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120598679B_ABST
    Figure CN120598679B_ABST
Patent Text Reader

Abstract

This invention relates to the fields of blockchain technology and decentralized finance (DeFi), and discloses a smart contract-based equity exchange recommendation system and method. The smart contract-based equity exchange recommendation method includes: constructing an equity flow graph and identifying bottleneck nodes; analyzing exchange demand characteristics and constructing a multi-level market structure, allocating demand to the most suitable market level; dynamically constructing a self-organizing temporary pool and deploying the temporary pool to the blockchain network through a smart contract; realizing dynamic allocation of resources across levels; calculating the optimal exchange path and generating recommendation results, constructing a unified path search space, and generating diverse path recommendation results based on an improved A* algorithm and multi-objective optimization. This invention accurately locates liquidity bottlenecks in the network through equity flow graph analysis and bottleneck identification algorithms, and guides liquidity to converge in these areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of blockchain technology and decentralized finance technology, and more specifically, to a rights exchange recommendation system and method based on smart contracts. Background Technology

[0002] With the rapid development of blockchain and decentralized finance (DeFi), user rights are becoming increasingly diverse, dispersed across multiple blockchain networks and smart contracts. Decentralized exchanges (DEXs) facilitate asset exchange through smart contracts and provide liquidity using the Automated Market Maker (AMM) model. However, existing technologies face several challenges:

[0003] Current DEX systems generally use constant product formulas or weighted summation formulas to manage the asset allocation in liquidity pools. These fixed algorithms cannot dynamically adjust the asset allocation within the pool based on market demand and asset price fluctuations. When the price of a certain equity fluctuates sharply, the liquidity pool may experience severe imbalances, leading to increased slippage and low capital efficiency.

[0004] In complex multi-chain, multi-equity environments, liquidity distribution is extremely uneven. Existing technologies lack the ability to perform global analysis of the overall equity flow topology, making it impossible to accurately identify and prioritize solutions to key liquidity bottlenecks, resulting in inefficient resource allocation.

[0005] Traditional single-tier liquidity market models treat all exchange demands as homogeneous, ignoring the differentiated liquidity needs of exchange demands of varying sizes and timeliness. Large transactions often suffer from severe slippage, while small, high-frequency transactions are plagued by unnecessary complex paths and high gas fees.

[0006] Furthermore, existing path recommendation algorithms are mostly based on greedy strategies, considering only a single factor such as minimum slippage or minimum number of hops, and failing to comprehensively consider multi-dimensional factors such as transaction costs, time efficiency, and risks. As a result, the recommendation results deviate significantly from the actual performance.

[0007] These technical issues severely restrict the liquidity efficiency and user experience of decentralized finance systems, and there is an urgent need for a method to optimize equity exchange that can systematically solve these problems. Summary of the Invention

[0008] This invention provides a smart contract-based equity exchange recommendation system and method, which solves the technical problems in related technologies such as the lack of intelligent adjustment capabilities of liquidity pools, difficulty in identifying liquidity bottlenecks, insufficient handling of differentiated exchange demands, and lack of overall optimized path recommendations.

[0009] This invention provides a method for recommending equity exchange based on smart contracts, comprising:

[0010] Construct a graph of equity flow and identify bottleneck nodes;

[0011] Based on the constructed equity flow graph, the characteristics of exchange demand are analyzed and a multi-level market structure is constructed to allocate demand to the most suitable market level.

[0012] Based on the hierarchical classification results, a self-organizing temporary pool is dynamically constructed, and the temporary pool is deployed to the blockchain network through a smart contract.

[0013] For the established multi-tiered market structure, dynamic allocation of resources across tiers is achieved, liquidity at each market tier is monitored, and cross-tiered resource transfer is realized through dynamic reward functions and internal arbitrage mechanisms.

[0014] By comprehensively utilizing the results of equity flow graph analysis, multi-level market structure, self-organized temporary pools, and cross-level resource dynamic allocation, the optimal exchange path is calculated and recommended results are generated. A unified path search space is constructed, and based on the improved A* algorithm and multi-objective optimization, diverse path recommendation results are generated.

[0015] Furthermore, the construction of the equity flow graph includes:

[0016] Collect equity interaction data, including trading pair information, trading history data, and liquidity pool status;

[0017] A graph model is constructed based on interactive data, where each node represents a type of equity and each edge represents the exchange relationship between equity.

[0018] The weights of the edges are calculated to reflect the liquidity levels between equity pairs.

[0019] Furthermore, the formula used to calculate the weight of the edge is:

[0020]

[0021] Among them W ij Representing edge e ij The weight, V ij Indicates rights and interests (v) i v j The trading volume of v represents the trading volume within a certain time window. i to v j The cumulative trading volume of P; ij Indicates rights and interests (v) i v j The price ratio is usually v. i With v j The current price ratio; σ ij Indicates rights and interests (v)i ,v j Price volatility, which measures the historical standard deviation of the price pair; This represents the arithmetic square root operator.

[0022] Furthermore, the identification of bottleneck nodes includes:

[0023] Using network flow theory and centrality analysis algorithms, the bottleneck degree B(v) of each node is calculated. i );

[0024] Based on the bottleneck degree ranking, the top k2 nodes with the highest bottleneck degree are identified as key bottleneck points.

[0025] Furthermore, the analysis of exchange demand characteristics and the construction of a multi-level market structure include:

[0026] Extract the characteristics of exchange demand;

[0027] Construct a multi-tiered market structure, including a high-liquidity standard layer, a medium-sized transaction layer, a dedicated layer for large-value transactions, a fast layer for emergency transactions, and a dedicated layer for cross-chain transactions;

[0028] Calculate the matching degree between requirements and levels and allocate them.

[0029] Furthermore, the dynamically constructed self-organizing temporary pool includes:

[0030] Predict the trading demand for each equity pair in the future period;

[0031] Based on the predicted transaction demand and current liquidity conditions, the optimal weights of each asset in the self-organizing temporary pool are calculated.

[0032] Furthermore, the implementation of dynamic resource allocation across levels includes:

[0033] Imbalance in liquidity between monitoring levels;

[0034] Detect arbitrage opportunities and balance prices;

[0035] Apply a dynamic reward function to incentivize liquidity providers.

[0036] Furthermore, the above includes:

[0037] Construct a global path search space;

[0038] Multi-objective path optimization search;

[0039] Generate personalized recommendation results.

[0040] Furthermore, the generation of personalized recommendation results includes:

[0041] The cost-first path minimizes total transaction costs and is suitable for users sensitive to slippage.

[0042] Speed-first path minimizes execution time and is suitable for time-sensitive transactions;

[0043] A security-first approach, minimizing risk exposure, using only highly validated contracts and pools;

[0044] A balanced approach that achieves a good balance between cost, speed, and security.

[0045] This invention provides a smart contract-based equity redemption recommendation system for executing the aforementioned smart contract-based equity redemption recommendation method, comprising:

[0046] The equity flow analysis module is used to construct a flow graph of equity interactions in the blockchain network and identify key bottleneck nodes based on a centrality algorithm.

[0047] The demand stratification module is used to extract multi-dimensional features of users' redemption needs and match and assign them to the corresponding market strata.

[0048] The temporary pool construction module is used to predict trading trends and dynamically calculate the optimal allocation weight of each asset in the liquidity pool, and automatically deploy it to the blockchain network through smart contracts.

[0049] The resource allocation module is used to monitor the liquidity status between different market tiers and guide resources to flow to bottleneck areas through dynamic reward mechanisms and arbitrage signals.

[0050] The path optimization module is used to calculate and recommend transaction paths that meet different user preferences based on multi-objective optimization algorithms within a unified global search space.

[0051] The beneficial effects of this invention are: by using equity flow graph analysis and bottleneck identification algorithms to accurately locate liquidity bottlenecks in the network and guide liquidity to gather in these areas, the overall liquidity depth is improved and the average slippage of large transactions is reduced.

[0052] By implementing differentiated services through a multi-tiered market structure, and by dynamically allocating resources based on demand forecasts through a self-organized temporary pool, the system's capital utilization efficiency has been improved, thus solving the technical problem of liquidity resource mismatch.

[0053] By using a self-organizing temporary pool to reorganize liquidity based on real-time on-chain data, and by using a multi-objective path optimization algorithm that comprehensively considers multiple factors, the average transaction cost has been reduced, and the cost has been reduced in large transaction scenarios.

[0054] Through adaptive prediction models and dynamic resource allocation mechanisms, the system can automatically adapt to changes in network status and transaction demands. Even in test scenarios with volatile market conditions, the system can still maintain a high recommendation accuracy.

[0055] Through demand feature analysis and personalized recommendations, user satisfaction has improved, the number of steps required in complex transaction scenarios has been reduced, and the transaction success rate has increased. Attached Figure Description

[0056] Figure 1 This is a flowchart of a rights exchange recommendation method based on smart contracts in this invention;

[0057] Figure 2 This is a flowchart of step 1 in this invention;

[0058] Figure 3 This is a flowchart of step 2 in this invention;

[0059] Figure 4 This is a flowchart of step 3 in this invention;

[0060] Figure 5 This is a flowchart of step 4 in this invention;

[0061] Figure 6 This is a flowchart of step 5 in this invention;

[0062] Figure 7 This is a bar chart comparing the transaction costs and efficiency of different methods in this invention;

[0063] Figure 8 This is a scatter plot illustrating the relationship between transaction amount and slippage in this invention.

[0064] Figure 9 This is an area graph showing the trend of fluidity efficiency over time in this invention;

[0065] Figure 10 This is a pie chart showing the proportion of different types of transactions in the system in this invention;

[0066] Figure 11 This is a radar chart for the multi-dimensional performance evaluation of the system in this invention. Detailed Implementation

[0067] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0068] At least one embodiment of the present invention discloses a method for recommending equity exchange based on smart contracts, such as... Figures 1 to 6 As shown, it includes:

[0069] Step 1: Construct a rights flow graph and identify bottleneck nodes;

[0070] This application first uses network flow theory and centrality analysis algorithm to analyze equity interaction data on the blockchain, construct a global equity flow graph and identify key liquidity bottlenecks.

[0071] Step 1.1: Collect rights and interests interaction data;

[0072] Collect equity interaction data from the blockchain network, including but not limited to transaction pair information: including transaction pair identifiers, types of equity involved in the transaction, etc.

[0073] Historical transaction data includes transaction time, transaction volume, and transaction price.

[0074] Liquidity pool status: including asset reserves and transaction fees in each liquidity pool;

[0075] Inter-chain bridging data includes cross-chain asset transfer records and cross-chain liquidity status.

[0076] It should be understood that blockchain data is obtained through smart contract event monitoring or blockchain indexing services to ensure the integrity and accuracy of the data.

[0077] Step 1.2: Construct a graph model of equity flow;

[0078] Based on the collected interaction data, this application constructs a global equity flow graph:

[0079] G = (V, E, W);

[0080] Where V represents the set of nodes in the graph, E represents the set of edges in the graph, W represents the set of weights in the graph, and G represents the graph itself;

[0081] V = v1, v2, ..., v n ;

[0082] Where V represents the set of nodes in the graph, v1, v2, v3, v4, v5, v6, v7, v8, v9, v1, v1, v2, v3 ... n These represent the 1st, 2nd, and nth equity nodes, respectively, where n is the total number of nodes;

[0083] E = e ij |i,j∈(1,n),i≠j;

[0084] Where E represents the set of edges in the graph; e ij Indicates from rights vi To rights v j The exchange relationship represents the connection between two rights that can be exchanged; i and j are the indices of the starting and ending nodes, respectively, and n is the total number of nodes;

[0085] W = w ij |e ij ∈E;

[0086] Where W represents the set of weights in the graph, and E represents the set of edges in the graph; w ij Representing edge e ij The weight of edge e represents the weight of edge e. ij The liquidity level is calculated using the following formula:

[0087]

[0088] Where w ij Representing edge e ij The weight, v ij Indicates rights and interests (v) i ,v j The trading volume of v represents the trading volume within a certain time window. i to v j The cumulative trading volume of P; ij Indicates rights and interests (v) i v j The price ratio is usually v. i With v j The current price ratio; σ ij Indicates rights and interests (v) i v j Price volatility, which measures the historical standard deviation of the price pair; This represents the arithmetic square root operator.

[0089] In some implementations, the weights can be calculated using a weighted formula that takes into account the time decay factor:

[0090]

[0091] Where w′ ij This indicates the weighting of the time decay factor. This indicates the k1th time point. rights against (v) i ,v j ) trading volume; Let λ represent the exponential decay factor, e be the base of the natural logarithm, λ be the time decay parameter, and t be the current time. m1 represents the total number of historical sampling points, where m is the historical time point. This represents the summation over all historical sampling points.

[0092] Optionally, in high-frequency trading scenarios, weight calculation can also incorporate trading depth information:

[0093]

[0094] Where w″ ij V represents the weighting of transaction depth. ij Indicates rights and interests (v) i ,v j ) trading volume, P ij Indicates rights and interests (v) i ,v j The price ratio of σ ij Indicates rights and interests (v) i ,v j Price volatility, D ij Indicates rights and interests (v) i ,v j Order depth (D) represents the total number of pending orders that can be executed near the current price. base This represents the baseline depth value, used to normalize the depth impact of different trading pairs.

[0095] In addition, the graph construction adopts an incremental update mechanism. Whenever there is new transaction data, only the attributes of the relevant nodes and edges are updated to avoid repeatedly calculating the entire graph.

[0096] Step 1.3: Calculate the bottleneck degree of the nodes and identify the key bottleneck points;

[0097] According to embodiments of this application, network flow theory and centrality analysis algorithms are applied to calculate the bottleneck degree B(v) of each node. i )express:

[0098] B(v i )=α B ·C B (v i )+β B ·(1-L(v i ))+γ B ·F(v i );

[0099] Where B(v) i ) represents node v i The bottleneck degree, which measures the degree to which it is a bottleneck in the network; α B β B γ B L(v) represents the weights of the control betweenness centrality, liquidity index, and flow pressure index in the total bottleneck degree, respectively; i ) represents node v i The relative liquidity index, L(v) iA smaller value indicates poorer liquidity, 1-L(v) i F(v) is used to highlight nodes with insufficient liquidity. i ) represents node v i The flow pressure index measures the ratio of transaction demand flowing through a node to its available liquidity; C B (v i ) represents node v i The betweenness centrality of a node reflects its importance as a transit node, and is calculated using the following formula:

[0100]

[0101] in This indicates that for all s and d, s ≠ v i And d≠v i Summation of node pairs; σ sd σ represents the total number of shortest paths from node s to node d; sd (v i ) represents all shortest paths from node S to node d that pass through node v. i The number of paths.

[0102] In another embodiment, this application may employ a centrality calculation method based on random walks, calculating the PageRank value PR(v) of a node by simulating a random walk process. i As an alternative indicator of centrality:

[0103]

[0104] Where PR(v) i ) represents node v i The PageRank value; d represents the damping coefficient, 0 < d < 1, controlling the probability of the random walk continuing; N represents the total number of nodes in the network; In(v i ) represents all pointers to node v i The set of nodes; PR(v j ) represents node v j PageRank value; Out(v j ) represents node v j The out-degree, that is, from v j The number of starting edges; This means for all pointers to v i node v j Sum.

[0105] For large-scale networks, alternatively, this application may also apply approximation algorithms to accelerate centrality calculation, such as using sampling methods to estimate betweenness centrality:

[0106]

[0107] in Represents node v i The sampling estimate betweenness centrality is given by: S represents the source node sampling subset, CY represents the target node sampling subset; |V| represents the total number of nodes, and |S| and |CY| represent the size of the source node sampling subset and the target node sampling subset, respectively. σ represents the summation of all node pairs in the sampled subsets S and CY; sd σ represents the total number of shortest paths from node s to node d; sd (v i ) represents all shortest paths from node s to node d that pass through node v. i The number of paths.

[0108] Based on the calculated bottleneck degree B(v) i This application sorts all nodes and identifies the top k2 nodes with the highest bottleneck degree as critical bottlenecks. These nodes will receive priority access to liquidity resources in subsequent steps. In some implementations, the k2 value can be dynamically adjusted based on the network size and overall liquidity situation, for example:

[0109]

[0110] Where k2 represents the number of critical bottlenecks, V represents the total number of nodes, and max(a, b) represents taking the maximum value between a and b. The symbol indicates rounding up.

[0111] Step 2: Based on the constructed equity flow graph, analyze the characteristics of exchange demand and construct a multi-level market structure to allocate demand to the most suitable market level.

[0112] By extracting multidimensional features of redemption demand through feature analysis functions, the demand is allocated to the most suitable market level to achieve differentiated services.

[0113] Step 2.1, extract the characteristics of exchange demand;

[0114] When a user submits a rights redemption request, according to an embodiment of this application, the system extracts the multidimensional features of the request, and the feature vector is represented as follows:

[0115] F(q)=(s(q),u(q),t eff (q),p(q),r(q));

[0116] Where F(q) represents the feature vector of the exchange demand q, and u(q) represents the urgency feature, reflecting the user's sensitivity to the transaction execution time, which is usually derived based on the user-set deadline and historical transaction behavior; teff (q) represents the timeliness characteristic, reflecting the importance of the transaction in time, and is affected by market volatility and predicted price trends; p(q) represents the price sensitivity characteristic, reflecting the user's tolerance for slippage, derived from the user's slippage limits and historical trading behavior; r(q) represents the risk tolerance characteristic, reflecting the user's requirements for the security of the transaction path, derived from the user's risk preference and the type of transaction equity; s(q) represents the exchange size characteristic, reflecting the size of the transaction amount, calculated using the following formula:

[0117]

[0118] Where Amount(q) represents the equivalent amount of the exchange demand q; Amount base Represents the base amount, used for normalization; log 10 (·) represents a logarithmic function with base 10.

[0119] During the feature extraction process, a prediction-based imputation strategy based on user history behavior and similar user group behavior is used to fill in missing feature values.

[0120] Step 2.2, construct the market hierarchy structure;

[0121] According to one embodiment of this application, the system pre-constructs a multi-tiered market structure, with each tier providing differentiated services for specific types of exchange needs. Typical tiers include:

[0122] High-liquidity standard tier (Level 1): Provides fast and low-cost exchange services for small-amount, high-frequency transactions, characterized by low slippage and low gas costs.

[0123] Level 2 (MTBL): Provides balanced liquidity services for medium-sized trades, taking into account both slippage control and execution efficiency.

[0124] Level 3 (Large Transaction Dedicated Layer): Provides a dedicated channel with low slippage for large transactions, controlling price impact through mechanisms such as routing and scheduled execution.

[0125] Emergency Transaction Fast Tier (Level 4): Provides fast confirmation for time-sensitive transactions, with priority processing but may incur higher fees.

[0126] Cross-chain transaction dedicated layer (Level 5): Provides optimized paths and liquidity for cross-chain asset transfers, and handles cross-chain communication and asset locking and unlocking.

[0127] Each market tier has a feature vector:

[0128]

[0129] in This represents the feature vector of the i1th market level; These represent the size, urgency, timeliness, price sensitivity, and risk tolerance characteristics of the i1th market level, respectively.

[0130] Step 2.3: Calculate and allocate the matching degree between requirements and levels;

[0131] To select the most suitable market tier for the redemption demand q, the method in this application calculates the matching degree between the demand feature vector and the feature vector of each tier:

[0132]

[0133] in Let F(q) represent the matching degree between the exchange demand q and the level i1, and let F(q) represent the feature vector of the exchange demand q. This represents the feature vector of the i1th market level; This represents the summation over the five feature dimensions; This represents the weight of the j1-th feature dimension, reflecting the importance of that feature in the matching calculation; This represents the similarity between the exchange demand and the level i1 on the j1st feature dimension, which is commonly calculated using cosine similarity or Gaussian kernel function. This represents the value of the exchange demand q in the j1-th feature dimension; This represents the value of level i1 in the j1st feature dimension.

[0134] Ultimately, the system selects the tier with the highest matching degree as the target tier for this redemption request:

[0135]

[0136] Where Level(q) represents the optimal market level to which the exchange demand q is allocated; Indicates taking The largest i1; F(q) represents the feature vector of the exchange demand q. This represents the feature vector of the i1th market level.

[0137] Each tier has its own independent liquidity pool group and optimization strategy to ensure that different types of needs can receive the most suitable service.

[0138] Step 3: Based on the hierarchical classification results, dynamically construct a self-organizing temporary pool and deploy the temporary pool to the blockchain network through a smart contract;

[0139] Based on the self-organizing temporary pool (SOT-Pool) algorithm, temporary liquidity pools are dynamically constructed according to the current network state and predicted transaction demand, thereby optimizing asset allocation and improving capital efficiency.

[0140] Step 3.1, predict transaction demand trends;

[0141] The system analyzes historical trading data and current market conditions to predict the trading demand for various equity pairs in future periods.

[0142]

[0143] in This represents the predicted trading demand for equity pair (i2, j2) within the next Δt time period; This represents a time series of historical transaction demand. Let f represent the trading demand for equity pair (i2, j2) at times t, t-1, and t-n1, respectively; LSTM M represents the long short-term memory network model function used for time series data prediction; t It indicates the current market status characteristics, including overall trading volume, price trends, volatility, etc.

[0144] Step 3.2: Calculate the optimal asset weight allocation;

[0145] Based on the predicted transaction demand and current liquidity conditions, calculate the optimal weights of each asset in the self-organizing temporary pool:

[0146]

[0147] in Assets The weight percentage in the temporary pool; f(·) represents the multivariate weight allocation function; Assets The value (obtained by price oracles); Assets Forecasted demand; Assets Historical volatility; Assets The correlation coefficient.

[0148] The optimal weight allocation is solved using a multi-objective optimization algorithm:

[0149]

[0150] in Represents the optimal weight vector; argmin W This indicates taking the option that minimizes the objective function. λ1, λ2, and λ3 represent the asset weight allocation; λ1, λ2, and λ3 represent the trade-off parameters of slippage cost, capital utilization rate, and risk exposure in multi-objective optimization, respectively. This represents the objective function for slippage cost; This represents the objective function for capital utilization. Represent the objective function for risk exposure;

[0151] The objective functions are defined as follows:

[0152]

[0153] in This represents the objective function for slippage cost. For the predicted transaction demand, These represent the weights of asset i4 and asset j4, respectively. This represents the asset weight allocation, and ∑ represents the summation symbol.

[0154]

[0155] in This represents the objective function for capital utilization. The expected usage of asset i5; This represents the weight of asset i5; ∑ represents the summation symbol.

[0156]

[0157] Where Sig is the asset volatility covariance matrix. for Transpose of; Represent the objective function for risk exposure; This indicates the asset weight allocation.

[0158] Constraints:

[0159] The sum of the weights of all assets is 1;

[0160] All asset weights are non-negative;

[0161] Minimum liquidity constraints for key assets. This is the minimum liquidity threshold for asset i6.

[0162] The Particle Swarm Optimization (PSO) method is used to find the optimal weight allocation of each asset in the temporary liquidity pool, which minimizes the overall objective function. The particle velocity and position update formulas are as follows:

[0163]

[0164] in and Let i and t represent the velocities of particle i7 in the t-th and t+1-th iterations, respectively. and Let w represent the positions (i.e., weight configurations) of particle i7 in the t-th and t+1-th iterations, respectively; PSO The inertial weights control the degree to which particle velocity is preserved; c1 and c2 represent the effects of individual optimality and global optimality, respectively; r1 and r2 represent random numbers in the interval [0, 1], used to increase the randomness and diversity of the search. Represents the historical best position of particle i7; g best This indicates the globally optimal position.

[0165] Step 4: For the established multi-level market structure, realize dynamic allocation of resources across levels, monitor the liquidity of each market level, and realize cross-level resource transfer through dynamic reward functions and internal arbitrage mechanisms;

[0166] Step 4.1: Monitor the imbalance of flow between different levels;

[0167] The system continuously monitors the liquidity status of each market tier and identifies resource imbalances between tiers:

[0168]

[0169] in Indicates hierarchy with hierarchy The degree of liquidity imbalance between them; and Representing levels and hierarchy Liquidity utilization rate; and Representing levels and hierarchy Liquidity capacity indicates the maximum volume of transactions that can be accommodated.

[0170] θ imb For the preset imbalance threshold, when More than θ imb At that time, the system triggers liquidity allocation.

[0171] Step 4.2: Detect arbitrage opportunities and balance prices;

[0172] Detect price differences between different market tiers to identify potential arbitrage opportunities:

[0173]

[0174] in Indicates hierarchy with hierarchy Arbitrage opportunities between the equity pairs (a,b); Indicates hierarchy The exchange rate of Chinese equity to (a, b); Indicates hierarchy The exchange price of Chinese equity to (a, b).

[0175] when When transaction costs and profit thresholds are exceeded, the system triggers arbitrage and liquidity reallocation.

[0176] Step 4.3: Apply a dynamic reward function to incentivize liquidity providers;

[0177] The dynamic reward function is as follows:

[0178]

[0179] in This indicates that the node is at time t. Reward rate for providing liquidity; α R and β R These represent the weight parameters of the reward function; Represents a node The bottleneck; Represents a node Current utilization rate at time t.

[0180] Step 5: By comprehensively utilizing the results of equity flow graph analysis, multi-level market structure, self-organized temporary pool, and cross-level resource dynamic allocation, the optimal exchange path is calculated and recommendation results are generated. A unified path search space is constructed, and based on the improved A* algorithm and multi-objective optimization, diversified path recommendation results are generated.

[0181] Step 5.1: Construct the global path search space;

[0182] The system integrates equity flow graphs, multi-tiered markets, and temporary pool information to construct a unified path search space:

[0183] G unified =(V,E) unified W unified );

[0184] Among them G unified V represents the global unified graph; E represents the set of nodes for all equity types; unified W represents the extended edge set, containing exchange relationships across all levels and temporary pools; unified This represents the extended weight set, reflecting the overall exchange cost of each side.

[0185] Total exchange cost per edge:

[0186]

[0187] in Indicates node i 11 Minimum overall exchange cost to J7; This indicates that in level k3, from i 11 The exchange cost to J7; This indicates that the minimum value of k3 is taken over all levels; Layers represents the set of all market levels.

[0188] Step 5.2, multi-target path optimization search;

[0189] For the exchange request q(src, dst, amount), perform multi-target path optimization:

[0190] P * =argminP ∈Paths(src,dst) S(P);

[0191] Where P * Denotes the optimal path; Paths(src,dst) represents the set of all possible paths from src to dst; S(P) represents the comprehensive score function of path P; argmin P∈Paths(src,dst) Let P represent the path that minimizes S(P).

[0192] Comprehensive scoring function:

[0193] S(P)=ω1·C(P)+ω2·T(P)+ω3·R(P);

[0194] Where C(P) represents the cost index of path P; T(P) represents the time index of path P (such as block confirmation time); R(P) represents the risk index of path P; ω1, ω2, and ω3 represent the trade-off parameters of cost, time, and risk in multi-objective optimization, respectively.

[0195] A* algorithm heuristic function:

[0196] f(n) = g(n) + h(n);

[0197] Where f(n) represents the total cost estimate of node n; g(n) represents the actual cumulative cost from the starting point to node n; and h(n) represents the heuristic cost estimate from node n to the endpoint.

[0198] Multidimensional cost function:

[0199] g(n)=(g C (n),g T ((n),g R (n));

[0200] Where g(n) represents the actual cumulative cost from the starting point to node n; g C (n) represents the cumulative transaction cost; g T (n) represents the cumulative time cost; g R (n) represents the cumulative risk cost; () represents the vector representation.

[0201] Adaptive heuristic function:

[0202] h(n)=α h ·h dist (n)+β h ·h flow (n)+γ h ·h risk (n);

[0203] Where h(n) represents the heuristic cost estimate from node n to the destination; h dist (n) represents the residual cost estimate based on network topology distance; h flow (n) represents the residual slippage estimate based on the liquidity distribution; h risk (n) represents the residual risk estimate based on the contract risk score; ɑ h β h γ h These represent the trade-off parameters of cost, time, and risk in multi-objective optimization, respectively.

[0204] Liquidity-sensing pruning conditions:

[0205] Liq i,j <θ liq • amount;

[0206] Liq i,j Representing edge e ij Current liquidity; θ liq This represents the liquidity threshold coefficient; amount represents the transaction amount of the exchange request.

[0207] Dynamic edge weight update:

[0208]

[0209] Where w″′ i,j Indicates the updated edge weight; w i,j Representing edge e ij The weights are represented by δ, which is an adjustment parameter that controls the impact of large transactions on the weights; amount represents the transaction amount; Liq i,j Representing edge e ij Liquidity.

[0210] In the early termination condition, k is the threshold for the number of feasible paths.

[0211] Step 5.3: Generate personalized recommendation results;

[0212] Instead of generating a single optimal path, it provides a diverse set of recommendation results, including:

[0213] The cost-first path minimizes total transaction costs and is suitable for users sensitive to slippage.

[0214] Speed-first path minimizes execution time and is suitable for time-sensitive transactions;

[0215] A security-first approach, minimizing risk exposure, using only highly validated contracts and pools;

[0216] A balanced approach that achieves a good balance between cost, speed, and security.

[0217] The recommendation results include the following key information and detailed paths:

[0218] The complete redemption process from source rights to target rights;

[0219] Expected costs, including estimates of slippage, transaction fees, and gas fees;

[0220] Execution time: the estimated time required to complete the entire transaction; Confidence index: the system's confidence in the accuracy of the prediction results.

[0221] It is evident that the system considers users' historical selection preferences, gradually learns and adjusts personalized recommendation strategies, and improves user satisfaction with the recommendation results.

[0222] A smart contract-based equity redemption recommendation system, used to execute the aforementioned smart contract-based equity redemption recommendation method, includes:

[0223] The equity flow analysis module is used to construct a flow graph of equity interactions in the blockchain network and identify key bottleneck nodes based on a centrality algorithm.

[0224] The demand stratification module is used to extract multi-dimensional features of users' redemption needs and match and assign them to the corresponding market strata.

[0225] The temporary pool construction module is used to predict trading trends and dynamically calculate the optimal allocation weight of each asset in the liquidity pool, and automatically deploy it to the blockchain network through smart contracts.

[0226] The resource allocation module is used to monitor the liquidity status between different market tiers and guide resources to flow to bottleneck areas through dynamic reward mechanisms and arbitrage signals.

[0227] The path optimization module is used to calculate and recommend transaction paths that meet different user preferences based on multi-objective optimization algorithms within a unified global search space.

[0228] Here, the present invention provides an implementation example:

[0229] The method described in this embodiment has been applied on a large decentralized trading aggregation platform, such as... Figures 7 to 11 As shown, the platform connects to over 20 decentralized exchanges across multiple blockchain networks, encompassing more than 5,000 crypto assets and equity tokens. The platform processes approximately 500,000 transaction requests daily, ranging in value from small transactions of a few dollars to institutional-level transactions of millions of dollars. Before implementing this approach, the platform faced the following key challenges:

[0230] Large transactions suffer from severe slippage. On some popular trading pairs, the average slippage is as high as 4.8% when executing transactions of more than $1 million, which is far higher than the 0.1% to 0.2% level of centralized exchanges.

[0231] High gas costs for small-amount, high-frequency transactions are excessive. Due to improper path selection, the gas costs for many small-amount transactions even exceed 1% of the transaction amount itself.

[0232] Liquidity distribution is extremely uneven, with 80% of liquidity concentrated on 20% of the most popular trading pairs, while other trading pairs suffer from severe liquidity shortages.

[0233] Cross-chain transactions are inefficient, with an average completion time of over 15 minutes, and often fail due to insufficient liquidity.

[0234] The user trading experience is poor, with approximately 25% of trading needs not being met within a single platform and requiring users to manually operate across multiple platforms.

[0235] The platform has decided to adopt the multi-tiered liquidity optimization equity exchange recommendation method proposed in this application to solve the above problems and improve the overall trading efficiency and user experience of the platform.

[0236] In actual deployment, the system first collected all transaction data from the platform over the past 90 days, involving approximately 3,500 equity types and more than 12,000 trading pairs. The system calculated the liquidity level of each trading pair based on factors such as trading volume, price volatility, and trading depth, constructing an initial equity flow map.

[0237] Taking a mainstream cryptocurrency as an example, the system identified 86 trading pairs directly connected to it, and the liquidity levels of these pairs were extremely unevenly distributed. The system applied betweenness centrality analysis and found that the betweenness centrality of a node in this mainstream cryptocurrency was as high as 0.42, far exceeding the average of 0.08, indicating that this node is an important transit point in the network. However, bottleneck calculation revealed that although the mainstream cryptocurrency has high overall liquidity, there is a significant bottleneck in trading pairs with certain new stablecoins, with a bottleneck score of 0.78 (out of 1).

[0238] The system identified these bottleneck nodes as the highest priority liquidity improvement targets and incentivized liquidity providers to allocate resources to these trading pairs through a dynamic reward mechanism. Within 30 days of implementation, the liquidity of these bottleneck trading pairs increased by 219%, while the average liquidity across the entire network increased by 87%.

[0239] The system categorizes user needs into five market tiers based on transaction characteristics:

[0240] The high-liquidity standard tier processes small transactions of less than $1,000, characterized by large transaction volume and high frequency, accounting for 62% of the total transaction volume;

[0241] The medium-sized tier handles transactions ranging from $1,000 to $50,000, accounting for 28% of the total transaction volume;

[0242] The dedicated layer for large transactions processes transactions exceeding $50,000, which account for only 5% of the total transaction volume, but the amount represents 40% of the total transaction value.

[0243] The Emergency Transaction Fast Layer targets transactions marked as "urgent" by users who are willing to pay higher fees for priority processing; this layer accounts for 3% of the total.

[0244] The dedicated cross-chain transaction layer handles transactions that need to cross multiple blockchain networks, accounting for 2% of the total.

[0245] Taking a typical exchange request as an example: a user needs to exchange $25,000 worth of a smart contract platform token for a stablecoin A. The system extracts the feature vector of this request as [0.72, 0.3, 0.4, 0.8, 0.5], representing scale, urgency, timeliness, price sensitivity, and risk tolerance, respectively. By calculating the matching degree between this feature vector and the feature vectors of each market level, the system routes the request to the medium-sized transaction layer, with a matching degree of 0.86 (out of 1).

[0246] In response to periodic large-scale transaction demands, such as a sudden 3-fold increase in swap volume between popular stablecoins within two hours before and after the peak trading hours on Fridays, the system accurately predicts this demand fluctuation using an LSTM model and begins preparing a self-organized temporary pool 12 hours in advance.

[0247] System analysis of historical data shows that during this period, the average demand for exchanging stablecoin A with stablecoin B increased by 280%, while traditional liquidity pools struggled to cope with this sudden surge in demand, leading to a significant increase in slippage. Based on this prediction, the system constructed a dedicated self-organized temporary pool for stablecoin A and stablecoin B, and used a multi-objective optimization algorithm to determine the optimal asset weights as 57:43, taking into account that stablecoin A has a slightly higher market capitalization and slightly lower volatility.

[0248] After the temporary pool was deployed, its weights were dynamically adjusted a total of 7 times during peak periods, with a maximum adjustment of 5 percentage points, effectively responding to changes in demand. During its pool lifecycle (approximately 36 hours), the temporary pool processed a total of approximately $270 million in exchange requests, with an average slippage of only 0.02%, 86.7% lower than the 0.15% of traditional pools.

[0249] For a cross-chain exchange request from a governance token to a public chain's native token, the traditional algorithm would simply choose the path with the lowest slippage: governance token → smart contract platform token → stablecoin A → public chain's native token, with an estimated slippage of 1.3% and a time of approximately 12 minutes.

[0250] The improved A* algorithm in this system considered multiple factors and found that while this path had low slippage, it had a long cross-chain time and higher risk. Through multi-objective optimization, the system actually recommended another path: a governance token → a stablecoin B → a public chain native token, which had a better overall score. Although this path had slightly higher slippage (1.5%), the execution time was shortened to 4 minutes, and the smart contract security score was higher.

[0251] The user adopted the system's recommended path and successfully completed the transaction, with total costs (including slippage, gas fees, and time costs) 18.5% lower than the traditional path. More importantly, the system learned from this choice that the user prioritized time efficiency and appropriately increased the weight of time factors in subsequent recommendations.

[0252] In practical applications, this method significantly improves overall liquidity efficiency by accurately identifying and resolving liquidity bottlenecks. A comparison of liquidity indicators before and after implementation is shown in Table 1.

[0253] Table 1: Comparison of liquidity indicators before and after implementation

[0254]

[0255] Through equity flow graph analysis and bottleneck identification, the system accurately directs liquidity resources to the trading pairs that need them most. In the past six months of operation, the system has identified a total of 283 high-priority bottlenecks and successfully improved the liquidity level of 256 of them through a dynamic reward mechanism, resulting in a more balanced overall liquidity distribution on the platform and significantly improving capital utilization efficiency.

[0256] Another benefit of this method is a comprehensive improvement in user experience, mainly reflected in transaction success rate and user satisfaction, as shown in Table 2:

[0257] Table 2: Comparison of User Experience Related Metrics

[0258] Technical indicators Before implementation After implementation promote Transaction success rate 86% 98.7% An increase of 14.8% Initial recommendation acceptance rate 43% 76% An increase of 76.7% User operation steps An average of 7.5 steps Average 3.6 steps Reduced by 52% Success rate of complex transactions (multi-hop exchange) 64% 94% An increase of 46.9% User satisfaction rating (out of 5) 3.2 points 4.6 points An increase of 43.8%

[0259] Through multi-level market categorization and personalized recommendation mechanisms, the system can provide customized redemption solutions for different types of users. Especially for new users, the acceptance rate of the system's recommended pathways has increased from 32% to 78%, significantly reducing the learning curve and operational complexity for users.

[0260] In addition, a survey of 50,000 active users revealed that 76% of them said the new system “significantly improved” their trading experience. The most praised features were the “one-click optimal path recommendation” and the “multi-solution comparison” functions, which are the core innovations of this application method.

[0261] The smart contract-based equity redemption recommendation method provided in this application achieves the following technical effects:

[0262] By employing equity flow graph analysis and bottleneck identification algorithms, this application's system can accurately locate liquidity bottlenecks in the network and guide liquidity to these areas through a dynamic reward mechanism. Experimental data shows that after adopting this method, the overall liquidity of the equity pool increases by 125%, slippage decreases by 65%, and the efficiency of small-amount equity redemption improves by 89%. This global liquidity optimization method solves the problem of traditional technologies failing to identify key bottlenecks.

[0263] A multi-tiered market structure allows for matching exchange demands with different characteristics to the most suitable liquidity environment, avoiding a "one-size-fits-all" approach to resource allocation. The self-organizing temporary pool algorithm dynamically allocates resources based on demand forecasts, further improving capital efficiency. Real-world data shows that this method increases the system's capital utilization efficiency to 73%, significantly higher than the 45% level of traditional methods, thus solving the technical challenge of liquidity resource mismatch.

[0264] The self-organizing temporary pool dynamic combination scheme reorganizes liquidity based on real-time on-chain data, providing more ample liquidity support for high-frequency trading paths. Simultaneously, the multi-objective path optimization algorithm considers multiple factors such as cost, time, and risk to find the truly optimal exchange path. In practical applications, average transaction costs are reduced by 42%, and by as much as 57% in large-value transaction scenarios, effectively solving the problem of high transaction costs in traditional methods.

[0265] The method presented in this application employs an adaptive prediction model and a dynamic resource allocation mechanism, enabling it to automatically adapt to changes in network conditions and transaction demands. In test scenarios with severe market volatility, the system maintains a recommendation accuracy rate of over 82%, which is 48 percentage points higher than traditional methods. This adaptability solves the technical problem of the significant performance degradation of traditional fixed algorithms during market fluctuations.

[0266] Through demand characteristic analysis and personalized recommendations, the system in this application can provide differentiated rights redemption paths for different users, meeting diverse needs. Test data shows that user satisfaction increased by 76%, and the number of operation steps in complex transaction scenarios decreased by 53%. The diverse recommendation results enable users to choose a suitable redemption path according to their own preferences, overcoming the limitation of the singularity of traditional recommendation systems.

[0267] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for recommending a rights exchange based on a smart contract, the method comprising: Comprise: Constructing equity flow graph and identifying bottleneck nodes; Marking bottleneck nodes as the highest priority liquidity improvement targets and guiding liquidity providers to provide resources to bottleneck nodes through a dynamic reward function; Based on the constructed equity flow graph, analyzing exchange demand characteristics and constructing a multi-level market structure to allocate demand to the most matching market level; According to the hierarchical classification results, dynamically constructing self-organizing temporary pools and deploying temporary pools to the blockchain network through smart contracts; Dynamic construction of self-organizing temporary pools includes: Predicting the transaction demand of each equity pair in the future period; Based on the predicted transaction demand and the current liquidity situation, calculate the optimal weight of each asset in the self-organizing temporary pool; For the constructed multi-level market structure, realize cross-level resource dynamic allocation, monitor the liquidity status of each market level, and realize cross-level resource transfer through dynamic reward function and internal arbitrage mechanism; Comprehensive utilization of equity flow spectrum analysis, multi-level market structure, self-organizing temporary pool and cross-level resource dynamic allocation results, calculate the optimal exchange path and generate recommended results, build a unified path search space, based on improved A algorithm and multi-objective optimization, generate diversified path recommendation results.

2. The method of claim 1, wherein, The construction of equity flow graph includes: Collecting equity interaction data, including transaction pair information, transaction history data, and liquidity pool state; Based on the interaction data, construct a graph model, each node represents a type of equity, and each edge represents the exchange relationship between equities; Calculate the weight of the edge to reflect the liquidity level between the equity pairs. 3.The method of claim 2, wherein, The formula used to calculate the weight of the edge is: ; wherein denotes the edge of the weight, denotes the trading volume of the equity pair , denoting the cumulative volume from to in a certain time window; denotes the price ratio of the equity pair , usually the current price ratio of to ; denotes the price volatility of the equity pair , measuring the historical standard deviation of the pair price; denotes the arithmetic square root operator. 4.The method of claim 1, wherein, The identification of bottleneck nodes includes: The equity flow graph is represented as: ; wherein represents a set of nodes in the graph, represents a set of edges in the graph, represents a set of weights in the graph, represents a graph atlas; ; wherein , , denote the 1st, 2nd, 3rd st equity node, is the total number of nodes; The network flow theory and centrality analysis algorithm are applied to calculate the bottleneck degree of the i-th equity node ; Based on the bottleneck degree ranking, the top nodes with the highest bottleneck degree are identified as bottleneck nodes. 5.The method of claim 1, wherein, The analysis of exchange demand characteristics and the construction of a multi-level market structure includes: Extracting exchange demand characteristics; Constructing a multi-level market structure, including a high liquidity standard layer, a medium-scale transaction layer, a large transaction dedicated layer, an emergency transaction fast layer, and a cross-chain transaction dedicated layer; Calculate the matching degree of demand and level and allocate.

6. The method of claim 1, wherein, The implementation of cross-level resource dynamic allocation includes: Monitoring inter-level liquidity imbalance; Detect arbitrage opportunities and balance prices; Apply a dynamic reward function to encourage liquidity providers.

7. The method of claim 1, wherein, The generation of diversified path recommendation results includes: Construct a global path search space; Multi-objective path optimization search; Generate personalized recommendation results.

8. The method of claim 7, wherein the method further comprises: The generation of personalized recommendation results includes: Cost priority path, minimizing total transaction cost, suitable for users sensitive to slippage; Speed priority path, minimizing execution time, suitable for time-sensitive transactions; Safety priority path, minimizing risk exposure, only through highly verified cryptocurrency contracts and pools; Balanced path, achieving a good balance between cost, speed and security. 9.A smart contract-based equity exchange recommendation system, characterized by, A smart contract-based equity exchange recommendation method for executing any of claims 1-8, comprising: An equity flow analysis module for constructing a flow graph of equity interactions in a blockchain network and identifying key bottleneck nodes based on a centrality algorithm; A demand layering module for extracting multi-dimensional features of user exchange demand and matching and allocating them to corresponding market levels; A temporary pool construction module for predicting transaction trends and dynamically calculating the optimal configuration weight of each asset in the liquidity pool, and automatically deploying to the blockchain network through a smart contract; A resource allocation module for monitoring the liquidity status between different market levels and guiding resources to flow to bottleneck areas through a dynamic reward mechanism and arbitrage signals; A path optimization module is configured to calculate and recommend a transaction path meeting different user preferences based on a multi-objective optimization algorithm in a unified global search space.

Citation Information

Patent Citations

  • Conducting optimized cross-blockchain currency transactions using machine learning

    CN110443700A

  • Method and system for match making in virtual currency exchange

    US20090265268A1