2 min read

Happy arbitrage on arbitrum without local node. 记一次无本地节点的套利

Source: http://x.com/i/article/2047120702986244096

The recent Kelp DAO attack creates bankrun on multiple lending protocols, especially AAVE. The WETH market on Ethereum, Arbitrum, and Mantle all witnesses a 100% utilization rate.

Image

Existing users wants to exit while some speculators wants to buy their Aave ETH at a discount (earning the risk premium). As a result, multiple protocols created trading venus for exiting Aave ETH including

@0xfluid and Uniswap. https://x.com/0xfluid/status/2046971208550486244?s=20 A natural arbitrage path then appears: Buying aWETH on the market, remove liquidity when there is. As many users are repaying their ETH (though they can buy Aave ETH to repay at a discount), sometimes there would be liquidity, which was devoured by MEV bots within several blocks.

I feel it's extremely hard to compete on Ethereum with such a high bribe ratio. And given the umbrella mechanism of Aave, the depeg of Aave ETH is only at ~0.3%. Not much profitability. I turned to arbitrum. The depeg was once reaching 10% (1 Aave ETH = 0.9 ETH) before Arbitrum annouces their rescue of funds. I started to perform this arbitrage on arbitrum to join this game.

Image

However I don't have a powerful enough machine to run a local arbitrum node. And competition looks already very strong. I did some research on this and below are the tricks I used.

Most arbitrages follow the pattern of buy in advance, withdraw later (because uniswap may not have much instant liquidity at the time there is liquidity). Meaning they would require capital to perform the arbitrage. But when large repayment is observed, they fail to extract the maximum value. Instead I performed a bit on-chain routing to find best prices and routes across multiple DEXs. As Arbitrum does not order transactions based on gas price, I can pay a very low gas price; so a little more gas consumption is acceptable.

So how about delay? Arbitrum (besides the timeboost part) is FCFS. The faster you can send your transaction, the earlier it is included. On the information-getting side, I run the arbitrage with third-party RPC to fetch repayment events, which has an astonishing low delay; on the execution side, I rented multiple serves around the world to ping the sequencer and finally able to locate it. I rented multiple servers located near Arbitrum's main sequencer and, after applying some network level tricks, made the sending delay also lowered to 10~30 ms (without considering the arbitrum chain delay of 250ms as specified in their doc).

With this setup, I had the bot running, and earned a much larger share than average of bots competing for this opportunity. Even when another guy joining with timeboost (arbitrum's unique MEV ordering protocol), I was still able to earn a fair share.

This is just a toy and I do not expect to earn much about it. But I'm surprised that this took me only 1 hour but yields such good results. Maybe, sometimes, running an arbitrage bot does not require a local node. : )