Optimizing asset exchanges on blockchain-driven platforms poses a novel and challenging graph query optimization problem. In this model, assets represent vertices and exchanges form edges, recasting the graph query task as a routing problem over a large-scale, dynamic graph. However, the existing solutions fail to solve the problem efficiently due to the non-linear nature of the edge weights defined by a concave swap function. To address the challenge, we propose PRIME, a two-stage iterative graph algorithm designed for the Token Graph Routing Problem (TGRP). The first stage employs a pruned graph search to efficiently identify a set of high-potential routing paths. The second stage formulates the allocation task as a strongly convex optimization problem, which we solve using our novel Adaptive Sign Gradient Method (ASGM) with a linear convergence rate. Extensive experiments on real-world Ethereum data confirm PRIME's advantages over industry baselines. PRIME consistently outperforms the widely-used Uniswap routing algorithm, achieving up to 8.42 basis points (bps) better execution prices on large trades while reducing computation up to 96.7%. The practicality of PRIME is further validated by its deployment in hedge fund production environments, demonstrating its viability as a scalable graph query processing solution for high-frequency decentralized markets.
翻译:在区块链驱动的平台上优化资产交换,提出了一个新颖且具有挑战性的图查询优化问题。在此模型中,资产表示为顶点,交换构成边,从而将图查询任务重新定义为一个大规模动态图上的路由问题。然而,由于由凹交换函数定义的边权重的非线性特性,现有解决方案无法高效解决该问题。为应对这一挑战,我们提出了PRIME,一种专为代币图路由问题设计的两阶段迭代图算法。第一阶段采用剪枝图搜索,高效识别一组高潜力的路由路径。第二阶段将分配任务表述为一个强凸优化问题,我们使用具有线性收敛速度的新型自适应符号梯度方法来解决该问题。在真实世界以太坊数据上的大量实验证实了PRIME相对于行业基线的优势。PRIME始终优于广泛使用的Uniswap路由算法,在大额交易上实现了高达8.42个基点的更优执行价格,同时将计算量减少了高达96.7%。PRIME在实际对冲基金生产环境中的部署进一步验证了其实用性,证明了其作为高频去中心化市场可扩展图查询处理解决方案的可行性。