While quantitative automation related to trading crypto-assets such as ERC-20 tokens has become relatively commonplace, with services such as 3Commas and Shrimpy offering user-friendly web-driven services for even the average crypto trader, we have not yet seen the emergence of on-chain trading as a phenomenon. We hypothesize that just like decentralized exchanges (DEXes) that by now are by some measures more popular than traditional exchanges, process in the space of decentralized finance (DeFi) may enable attractive online trading automation options. In this paper we present ChainBot, an approach for creating algorithmic trading bots with the help of blockchain technology. We show how to partition the computation into on- and off-chain components in a way that provides a measure of end-to-end integrity, while preserving the algorithmic "secret sauce". Our system is enabled with a careful use of algorithm partitioning, zero-knowledge proofs and smart contracts. We also show that with layer-2 (L2) technologies, trades can be kept private, which means that algorithmic parameters are difficult to recover by a chain observer. Our approach offers more transparent access to liquidity and better censorship-resistance compared to traditional off-chain trading approaches. We develop a sample ChainBot and train it on historical data, resulting in returns that are up to 2.4x the buy-and-hold strategy, which we use as our baseline. Our measurements show that across 1000 runs, the end-to-end average execution time for our system is 48.4 seconds. We demonstrate that the frequency of trading does not significantly affect the rate of return and Sharpe ratio, which indicates that we do not have to trade at every block, thereby significantly saving in terms of gas fees. In our implementation, a user who invests \$1,000 would earn \$105, and spend \$3 on gas; assuming a user pool of 1,000 subscribers.
翻译:虽然与交易密码有关的量化自动化已经变得相对常见,例如ERRC-20的货币交易频率为105美元,但是,尽管与交易编码有关的量化自动化已经变得相对常见,3Commas和Shrimpy等服务为即使是普通的加密交易商提供了用户友好的网络驱动服务,但我们还没有看到连锁交易作为一种现象出现。我们假设,就像分散交易(DEXes)一样,现在通过比传统交易所更受欢迎的一些措施,分散融资空间(DeFi)中的进程可以带来吸引的在线交易自动化选择。在本文中,我们展示了“链博特”这一创建算盘交易机器人的方法,它借助了连锁技术的帮助。我们展示了如何将计算方法分解到连锁交易的功能,从而提供了某种衡量端到端到端到端到端交易的功能,同时保留了“秘密调料 ” 。 我们的系统通过谨慎地使用算法、零知识证据和智能合同而得以建立起来。 我们还表明,在上层-2(L2)技术,贸易可以保持私人交易,这意味着我们很难通过连锁执行技术来恢复算参数。 我们的方法可以让链观察者大大恢复。