Yu Zhang, Tao Yan, Jianhong Lin, Benjamin Kraner, Claudio Tessone
{"title":"在去中心化交易所上识别更多套利机会的改进算法","authors":"Yu Zhang, Tao Yan, Jianhong Lin, Benjamin Kraner, Claudio Tessone","doi":"arxiv-2406.16573","DOIUrl":null,"url":null,"abstract":"In decentralized exchanges (DEXs), the arbitrage paths exist abundantly in\nthe form of both arbitrage loops (e.g. the arbitrage path starts from token A\nand back to token A again in the end, A, B,..., A) and non-loops (e.g. the\narbitrage path starts from token A and stops at a different token N, A, B,...,\nN). The Moore-Bellman-Ford algorithm, often coupled with the ``walk to the\nroot\" technique, is commonly employed for detecting arbitrage loops in the\ntoken graph of decentralized exchanges (DEXs) such as Uniswap. However, a\nlimitation of this algorithm is its ability to recognize only a limited number\nof arbitrage loops in each run. Additionally, it cannot specify the starting\ntoken of the detected arbitrage loops, further constraining its effectiveness\nin certain scenarios. Another limitation of this algorithm is its incapacity to\ndetect non-loop arbitrage paths between any specified pairs of tokens. In this\npaper, we develop a new method to solve these problems by combining the line\ngraph and a modified Moore-Bellman-Ford algorithm (MMBF). This method can help\nto find more arbitrage loops by detecting at least one arbitrage loop starting\nfrom any specified tokens in the DEXs and can detect the non-loop arbitrage\npaths between any pair of tokens. Then, we applied our algorithm to Uniswap V2\nand found more arbitrage loops and non-loops indeed compared with applying the\nMoore-Bellman-Ford (MBF) combined algorithm. The found arbitrage profit by our\nmethod in some arbitrage paths can be even as high as one million dollars, far\nlarger than that found by the MBF combined algorithm. Finally, we statistically\ncompare the distribution of arbitrage path lengths and the arbitrage profit\ndetected by both our method and the MBF combined algorithm, and depict how\npotential arbitrage opportunities change with time by our method.","PeriodicalId":501294,"journal":{"name":"arXiv - QuantFin - Computational Finance","volume":"36 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-06-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"An Improved Algorithm to Identify More Arbitrage Opportunities on Decentralized Exchanges\",\"authors\":\"Yu Zhang, Tao Yan, Jianhong Lin, Benjamin Kraner, Claudio Tessone\",\"doi\":\"arxiv-2406.16573\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In decentralized exchanges (DEXs), the arbitrage paths exist abundantly in\\nthe form of both arbitrage loops (e.g. the arbitrage path starts from token A\\nand back to token A again in the end, A, B,..., A) and non-loops (e.g. the\\narbitrage path starts from token A and stops at a different token N, A, B,...,\\nN). The Moore-Bellman-Ford algorithm, often coupled with the ``walk to the\\nroot\\\" technique, is commonly employed for detecting arbitrage loops in the\\ntoken graph of decentralized exchanges (DEXs) such as Uniswap. However, a\\nlimitation of this algorithm is its ability to recognize only a limited number\\nof arbitrage loops in each run. Additionally, it cannot specify the starting\\ntoken of the detected arbitrage loops, further constraining its effectiveness\\nin certain scenarios. Another limitation of this algorithm is its incapacity to\\ndetect non-loop arbitrage paths between any specified pairs of tokens. In this\\npaper, we develop a new method to solve these problems by combining the line\\ngraph and a modified Moore-Bellman-Ford algorithm (MMBF). This method can help\\nto find more arbitrage loops by detecting at least one arbitrage loop starting\\nfrom any specified tokens in the DEXs and can detect the non-loop arbitrage\\npaths between any pair of tokens. Then, we applied our algorithm to Uniswap V2\\nand found more arbitrage loops and non-loops indeed compared with applying the\\nMoore-Bellman-Ford (MBF) combined algorithm. The found arbitrage profit by our\\nmethod in some arbitrage paths can be even as high as one million dollars, far\\nlarger than that found by the MBF combined algorithm. Finally, we statistically\\ncompare the distribution of arbitrage path lengths and the arbitrage profit\\ndetected by both our method and the MBF combined algorithm, and depict how\\npotential arbitrage opportunities change with time by our method.\",\"PeriodicalId\":501294,\"journal\":{\"name\":\"arXiv - QuantFin - Computational Finance\",\"volume\":\"36 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-06-24\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - QuantFin - Computational Finance\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2406.16573\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - QuantFin - Computational Finance","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2406.16573","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
在去中心化交易所(DEX)中,套利路径以套利循环(例如,套利路径从代币 A 开始,最后再次回到代币 A,A,B,...,A)和非循环(例如,套利路径从代币 A 开始,在不同的代币 N 停止,A,B,...,N)的形式大量存在。在检测 Uniswap 等去中心化交易所(DEX)的代币图中的套利循环时,通常会使用 Moore-Bellman-Ford 算法,该算法通常与 "walk to theroot "技术相结合。然而,这种算法的局限性在于每次运行只能识别有限数量的套利循环。此外,它不能指定检测到的套利循环的起始令牌,这进一步限制了它在某些情况下的有效性。该算法的另一个局限是无法检测到任何指定标记对之间的非循环套利路径。在本文中,我们结合线图和改进的摩尔-贝尔曼-福德算法(MMBF),开发了一种新方法来解决这些问题。这种方法可以通过检测从 DEXs 中任意指定令牌开始的至少一个套利环路来帮助找到更多套利环路,并且可以检测任意一对令牌之间的非环路套利路径。然后,我们将我们的算法应用于 Uniswap V2,与应用摩尔-贝尔曼-福德(MBF)组合算法相比,确实发现了更多的套利循环和非循环。在某些套利路径中,我们的方法所发现的套利利润甚至高达一百万美元,远远超过 MBF 组合算法所发现的利润。最后,我们统计比较了我们的方法和 MBF 组合算法所发现的套利路径长度分布和套利利润,并描述了我们的方法所发现的潜在套利机会是如何随时间变化的。
An Improved Algorithm to Identify More Arbitrage Opportunities on Decentralized Exchanges
In decentralized exchanges (DEXs), the arbitrage paths exist abundantly in
the form of both arbitrage loops (e.g. the arbitrage path starts from token A
and back to token A again in the end, A, B,..., A) and non-loops (e.g. the
arbitrage path starts from token A and stops at a different token N, A, B,...,
N). The Moore-Bellman-Ford algorithm, often coupled with the ``walk to the
root" technique, is commonly employed for detecting arbitrage loops in the
token graph of decentralized exchanges (DEXs) such as Uniswap. However, a
limitation of this algorithm is its ability to recognize only a limited number
of arbitrage loops in each run. Additionally, it cannot specify the starting
token of the detected arbitrage loops, further constraining its effectiveness
in certain scenarios. Another limitation of this algorithm is its incapacity to
detect non-loop arbitrage paths between any specified pairs of tokens. In this
paper, we develop a new method to solve these problems by combining the line
graph and a modified Moore-Bellman-Ford algorithm (MMBF). This method can help
to find more arbitrage loops by detecting at least one arbitrage loop starting
from any specified tokens in the DEXs and can detect the non-loop arbitrage
paths between any pair of tokens. Then, we applied our algorithm to Uniswap V2
and found more arbitrage loops and non-loops indeed compared with applying the
Moore-Bellman-Ford (MBF) combined algorithm. The found arbitrage profit by our
method in some arbitrage paths can be even as high as one million dollars, far
larger than that found by the MBF combined algorithm. Finally, we statistically
compare the distribution of arbitrage path lengths and the arbitrage profit
detected by both our method and the MBF combined algorithm, and depict how
potential arbitrage opportunities change with time by our method.