Earn 5 million USD in half a year, how do we build an Arbitrage "printing machine" on Hyperliquid?

The construction process of a cryptocurrency arbitrage bot, from the initial attempt to the final profit of $5 million. This article is from an article written by CBB and is compiled, compiled and contributed by Odaily Planet. (Synopsis: Hyperliquid launches HIP-3 upgrade: allows anyone to create a “perpetual contract market”, $HYPE rises in response) (Background added: 10x surge in two days, which is probably the most abstract Perp DEX on Solana) Turning back the clock to March 2025, when the cryptocurrency market looked bleak and the tariff conflict hit hard, we started thinking about where the next potential opportunity was. Since 40% of Hyperliquid (HYPE) had not yet been allocated to the community, we thought this might be an opportunity. Previously, in February, we had tested some market-making strategies on Unit (an asset tokenization layer built specifically for Hyperliquid) assets, but not too seriously, only on a small scale. HyperEVM had just launched some DEXs, and my brother said, “How about we try arbitrage between HyperEVM and Hyperliquid?” Even if you lose money, you can also brush the rewards of the third season of Hyperliquid by the way." We decided to give it a try. There are opportunities for arbitrage, but we're not sure we can really compete with others. Why are there arbitrage opportunities on HyperEVM? The block length for HyperEVM is 2 seconds. This means that the price of HYPE is only updated every 2 seconds, and between these 2 seconds, the price of HYPE may fluctuate. As a result, HYPE on HyperEVM is often “undervalued” or “overvalued” relative to Hyperliquid. Initial Attempts and Results We started by building a first version of the bot program, which is quite basic. Whenever there is a price difference between the AMM DEX pool and the Hyperliquid spot on the HyperEVM, we initiate a trade on the HyperEVM and hedge on the Hyperliquid. For example, if HYPE rises in price on Hyperliquid, it is undervalued on HyperEVM. The transaction logic at this time is - buy “cheap” HYPE with USDT0 on HyperEVM, sell HYPE in exchange for USDC, and exchange USDC back to USDT0 on Hyperliquid. In the first few days, our daily trading volume on Hyperliquid reached $20-300,000 without losses and even a small profit of several hundred dollars. Initially, we performed arbitrage only when the profit was above 0.15% (after deducting DEX and Hyperliquid commissions). Two weeks later, we started to see more potential as profits had moved upward. We identified two other competitors who were also doing the same thing, but on a small scale. We decided to “kill” them. In April, Hyperliquid launched the ability to stake HYPE to refund fees. This is a perfect update for us, as our larger funds allow us to take advantage of this effectively. We stook 100,000 HYPE, received a 30% transaction fee rebate, and lowered the profit threshold from 0.15% to 0.05%. We want to suppress our competitors as much as possible and make them give up so that we can enjoy the pie exclusively. Our goal is to achieve more than $500 million in trading volume in two weeks to increase the fee level on Hyperliquid. As trading volumes rise, so do profits. Eventually we reached over $500 million in trading volume, and our competitors were completely defeated. I still remember the day — two competitors were forced to shut down their bot programs, and my brother and I were flying from Paris to Dubai, frantically watching our robots “print money” — making a whopping $120,000 profit that day. After the stage of buying volume, although our competitors at this time have a clear disadvantage over us in terms of commissions, they still refuse to give up, which forces us into an ultra-narrow range of 0.04% profit margin, which is basically the commission gap between us and them. Our trading volume remains strong, with a steady daily profit of between $20,000 and $50,000. Scaling bottlenecks As we scaled, we started to hit bottlenecks. HyperEVM is capped at 2 million gas per block, while an arbitrage transaction requires about 130,000 gas, so each block can only hold a maximum of 7–8 arbitrage transactions. As more pools and DEXs are launched on HyperEVM, this number is far from enough, and some transactions get stuck, resulting in an imbalance between the trade queue backlog and the funding position. To this end, we have taken a series of measures: using 100+ wallets, each wallet sends arbitrage transactions independently, avoiding queues for single wallets; A maximum of 8 arbitrages are performed per block; Gas dynamic control: When HyperEVM's gas soars, it will increase the minimum return on investment (ROI) requirement to avoid sending transactions for nothing during high gwei periods; Rate limiting: Sending too many transactions in the last 12 seconds will increase profit requirements before sending new transactions. Optimization Strategy While profits continue to rise and trading volumes continue to outperform our competitors by 5–10 times, we are also pathologically obsessed with optimization. This isn't the first time we've experienced this – today you might be drinking beer and printing money, and tomorrow some unknown entity could get you back in shape overnight. Becoming a Pending Party on Hyperliquid In June, my brother came up with an idea that he had been thinking about for weeks: “What if we stopped placing orders as Taker, but initiated arbitrage as a Maker?” This has two main benefits: first, it can capture HYPE's wick candles, which will bring more arbitrage opportunities; The second is that it can save 0.0245% of the commission per transaction, thereby increasing the net profit. But at the same time, it's a very challenging move, because if we place a pending order on Hyperliquid first, we can't guarantee that we will be able to hedge on HyperEVM - someone may be faster than us. Previously, our arbitrage logic was: first initiate a transaction in HyperEVM - if the transaction fails, the transaction does not move in Hyperliquid; If the transaction is successful, hedging is performed on Hyperliquid. However, as a pending order, we must first wait for the transaction in Hyperliquid, and we are not sure whether we can deal with the transaction on HyperEVM in time. This creates an unbalancing position, which in turn can lead to losses. At first, there was a position bias of ± 10 thousand HYPE per test. It's even hard for us to understand why this is the case, because sometimes 2…

HYPE-3.34%
USDC-0.02%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)