AI 中文总结
本文针对追溯性流动性池的安全报价问题,证明一般情形下无多项式时间算法能满足固定乘法近似比,同时提出两种实用算法规避了锁交换功能部署的障碍。
AI 中文摘要
自动做市商(AMM)通过流动性池交易资产,其报价取决于池的储备量,其中恒定乘积池是最常见的类型。当这类池位于不同区块链或分片上时,通常无法原子化执行一系列交换操作。Aanes等人引入了锁交换(lock-swap)和追溯性恒定乘积流动性池,以在这种场景下提供价格保证。追溯性池会为其活跃锁的每一种可能的执行/取消方案隐式维护一个虚拟池。在存在活跃锁的情况下,为新的交换请求提供服务需要计算安全报价,即所有虚拟池中输出不超过最小可能输出的报价;报价安全是确保池完整性的硬性约束,而使报价尽可能接近最小可能输出则是软性约束。Aanes等人在未解决的流动性提供与赎回不同时,给出了一种简单高效的精确最小计算算法,并用一个明确示例表明该算法在一般情况下失效,且留下了一般情形的计算复杂度问题未解决。在本文中,我们证明除非P=NP,否则在一般情形下不存在多项式时间算法,能计算出相对于精确最小输出具有任何固定乘法近似比(如50%)的安全报价,这似乎是锁交换功能部署的严重障碍。不过,我们还提出了两种简单实用的安全报价计算算法,其输入相关的近似比在实践中很可能令人满意,从而规避了这一障碍。
英文摘要
Automated market makers exchange assets through liquidity pools whose quoted prices depend on their reserves, with constant product pools being the most common. When such pools reside on different blockchains or shards, a sequence of swaps cannot in general be executed atomically. Aanes et al. introduced lock-swaps and retroactive constant product liquidity pools to provide price guarantees for such a setting. A retroactive pool implicitly maintains a virtual pool for each possible execute/cancel resolution of its active locks. In the presence of active locks, serving a new swap request requires computing a safe quote; a quote with an output that does not exceed the minimum possible output, taken over all virtual pools. The quote being safe is a hard constraint ensuring the integrity of the pool. A soft constraint is to make the quote as close to the minimum possible output as possible. Aanes et al. gave a simple and efficient algorithm for computing the exact minimum when unresolved provides and reclaims of liquidity do not coexist, showed by an explicit example that the algorithm fails in general, and left the computational complexity of the general case open. In this paper, we show that unless P is equal to NP, there is no polynomial time algorithm that computes in the general case a safe quote with any fixed multiplicative approximation ratio (e.g., 50%) relative to the exact minimum. This seems like a severe obstacle for deployment of the lock-swap functionality. However, we also present two simple and practical algorithms for computing safe quotes that have input-dependent approximation ratios that are likely to be satisfactory in practice, thus circumventing that obstacle.
Comments17 pages