Analyzing the HyperEVM Arbitrage Bot: How to Seize a 2-Second Opportunity to Earn 5 Million Dollars?

CN
链捕手
Follow
14 hours ago

Original Title: How We Made $5M Running the #1 Arbitrage Bot on HyperEVM
Original Author: CBB
Original Translation: Saoirse, Foresight News

It is now March 2025, and the cryptocurrency industry seems to be on shaky ground, heavily impacted by tariffs. We have been searching for the next high-quality opportunity—at that time, 40% of HYPE tokens were still to be distributed to the community, which we saw as a potential breakthrough. Back in February, we had tested some market-making strategies on UNIT assets, but they were just small-scale attempts without forming a significant operation.

When HyperEVM was first launched, it was accompanied by several decentralized exchanges (DEX). My brother suggested, "Why don't we try arbitraging between HyperEVM and Hyperliquid? Even if we have to invest some costs, we might be able to participate in Hyperliquid's Season 3 activities." We immediately began experimenting and indeed found arbitrage opportunities, but we were unsure if we were competitive.

Why Are There Arbitrage Opportunities on HyperEVM?

HyperEVM has a block generation interval of 2 seconds, which means the price of HYPE tokens is updated only once every 2 seconds. During this 2-second window, the price of HYPE may fluctuate, leading to situations where HYPE is often "underpriced" or "overpriced" on HyperEVM compared to the Hyperliquid platform.

Initial Attempts and Results

We built the first version of our arbitrage bot, which had basic functionality: whenever there was a price difference between the automated market maker (AMM) DEX liquidity pool on HyperEVM and the spot market on Hyperliquid, a trade would be initiated on HyperEVM, followed by a hedging operation on Hyperliquid.

For example:

  • · If the price of HYPE rises on Hyperliquid, it will be undervalued on HyperEVM;
  • · Arbitrage process: Buy "low-priced" HYPE with USDT0 on HyperEVM → Sell HYPE for USDC → Exchange USDC back to USDT0 on Hyperliquid.

In the first few days, our daily trading volume on Hyperliquid was about $200,000 to $300,000, and we not only avoided losses but also made a profit of a few hundred dollars. Initially, we set the arbitrage threshold: after deducting the trading fees from AMM DEX and Hyperliquid, we would only execute trades if the profit exceeded 0.15%.

Two weeks later, as profits continued to grow, we saw greater potential and also discovered two competitors operating in exactly the same way as us—though they were not large, we were determined to eliminate them.

In April 2025, Hyperliquid launched a HYPE staking rebate mechanism (staking tokens can reduce trading fees), which was a fantastic opportunity for us—our capital scale already exceeded that of our competitors, so we staked 100,000 HYPE, receiving a 30% reduction in trading fees and lowering our arbitrage profit threshold from 0.15% to 0.05%.

Our goal was clear: to maximize pressure to force competitors out and monopolize the market; we also planned to increase our trading volume to over $500 million within two weeks to upgrade our trading fee tier on Hyperliquid.

Ultimately, trading volume and profits soared in tandem—when trading volume surpassed $500 million, our competitors were completely passive. I still remember that day: my brother and I were flying from Paris to Dubai, watching the bot "print money" like crazy, making $120,000 in profit within 24 hours, while both competitors shut down their bots.

Despite this, some competitors did not give up; they endured higher fees, forcing us to compress our arbitrage profit margin to about 0.04% (essentially equal to the fee difference between us and them). Even so, our trading volume remained strong, with daily profits stabilizing between $20,000 and $50,000.

Problems and Solutions During Scale Expansion

As our business scaled, we encountered new limitations: the gas fee cap for each block on HyperEVM is 2 million, while a single arbitrage trade consumes about 130,000 gas, meaning a maximum of 7-8 arbitrage trades can be completed per block. This limitation became increasingly apparent, especially as more liquidity pools and DEXs went live on HyperEVM, even causing some trades to lag—we had to resolve this quickly to avoid trade queuing and order book imbalance.

To address this, we implemented four measures:

  • · Enabled over 100 wallets, each initiating arbitrage trades separately to avoid queuing due to excessive trades from a single wallet;
  • · Limited the maximum number of arbitrage trades per block to 8;
  • · Gas price control: when the gas price on HyperEVM spikes, we increase the required return on investment (ROI) for arbitrage to avoid sending trades that get stuck due to high gas prices;
  • · Trading rate limit: if the number of trades sent in the past 12 seconds exceeds a set number (x trades), we raise the profit requirement for new trades.

Optimization and Upgrade Era: From "Taker" to "Market Maker"

As our profits continued to grow and our trading volume reached 5-10 times that of our competitors, we became obsessed with further optimization—after all, in the cryptocurrency industry, one day you might be making easy profits, and the next day you could be eliminated by new players.

Transitioning to Market Maker: Capturing More Opportunities

In June 2025, my brother proposed an idea that had been brewing for weeks: to conduct arbitrage on Hyperliquid as a "market maker" rather than a "taker" (note: market makers provide liquidity and place orders waiting to be filled; takers directly fill existing orders). This transition had two major advantages:

  • · It could capture more arbitrage opportunities from rapid price fluctuations of HYPE;
  • · Each trade could save 0.0245% in fees, directly boosting profits.

However, the transition also came with risks: as market makers, we needed to place orders on Hyperliquid first, but we could not ensure that we could complete the reverse trade on HyperEVM (there might be competitors faster than us), which could lead to order book imbalances and even losses.

During initial testing, we often encountered imbalances of ±10k HYPE—sometimes we would send 100 trades within 20 seconds, but without data analysis tools, we couldn't identify the reasons for the imbalances, leading to chaos.

To solve this problem, we introduced a series of concepts and translated them into code and parameters:

  • · Profit range: clearly define when to create orders, when to hold orders, and when to cancel and re-list orders;
  • · Market maker trading range: limit the AMM liquidity pools we are willing to participate in (e.g., HYPE/USDT0 pool with a 0.05% fee on HyperSwap, HYPE/UBTC pool with a 0.3% fee on PRJX);
  • · Single pool trading scale and order quantity: set maximum trading scale and order quantity limits for each AMM liquidity pool.

The parameters for market maker trading are as follows:

After several days of fine-tuning, we finally resolved the imbalance issue; even when imbalances occasionally occurred, we could quickly adjust using the "time-weighted average price" (TWAP) to control risk. This transition was a "game changer"—while competitors remained in the "taker" mode, our trading volume reached 20 times theirs.

Skipping USDT0/USDC Conversion to Reduce Costs

Another major challenge was related to stablecoins: the mainstream stablecoin on Hyperliquid is USDC, while on HyperEVM it is USDT0; the liquidity pool with the highest trading volume and most arbitrage opportunities on HyperEVM is HYPE/USDT0. However, due to the different stablecoins across platforms, we needed to execute an additional 2 trades on Hyperliquid to complete asset hedging. For example, when the price of HYPE skyrockets:

  1. Market maker order is filled → Sell HYPE for USDC with 0 fees;
  2. Buy HYPE with USDT0 on HyperEVM;
  3. Sell USDC for USDT0 on Hyperliquid as a taker (incurring a 0.0245% fee).

The drawbacks of the third step are obvious: we have to pay the taker fee (reducing profits and weakening competitiveness), and the USDT0/USDC trading market on Hyperliquid is not mature enough (there are spreads and pricing discrepancies).

To address this, we designed new parameters and logic to skip this step as much as possible:

  • · USDC balance threshold: only skip the USDT0→USDC conversion when the USDC balance exceeds 1.2 million;
  • · USDT0 balance threshold: only skip the USDC→USDT0 conversion when the USDT0 balance exceeds 300,000;
  • · Real price data source: call the Cowswap API every minute to get the real price of USDT0/USDC, rather than relying on the order book price on Hyperliquid.

Introducing Perpetual Contracts to Expand Revenue Sources

First, I want to clarify: throughout our cryptocurrency investment journey, we have never used leverage or perpetual contracts (except for a failed attempt in 2018 on Bitmex), and we know very little about their operational mechanisms.

However, we found that the trading volume of HYPE perpetual contracts was far higher than that of spot trading, and the fees were lower (spot 0.0245% vs perpetual contracts 0.019%). So we decided to try combining our arbitrage strategy with perpetual contracts—at that time, no competitors were using this model, so we did not have to compete with them for liquidity on the same order book.

More importantly, during testing, we discovered that using perpetual contracts not only allowed us to earn arbitrage profits but also to profit from the "funding rate"; when HYPE perpetual contracts traded at a premium or discount relative to spot, we could capture even more arbitrage opportunities—these were areas that competitors had not ventured into.

We designed new system parameters for this:

  • · Position limits: set the maximum long/short position size for HYPE perpetual contracts to avoid liquidation or exhausting USDC/HYPE balances;
  • · Premium/discount monitoring: track the premium or discount of perpetual contracts relative to spot in real-time;
  • · Premium/discount cap: if the premium is too high, stop opening long positions and switch to spot trading;
  • · Progressive ROI: the larger the position size, the higher the required arbitrage profit, to avoid quickly falling into risky positions;
  • · ROI calculation formula: combine the premium/discount of perpetual contracts with position size for comprehensive calculation.

As a taker, the interface/parameter settings for configuring short positions on HYPE tokens are as follows:

Introducing perpetual contracts is one of the most critical upgrades—earning approximately $600,000 solely through funding rates while capturing more arbitrage opportunities through premiums/discounts.

Brother Partners: Collaboration Model and Complementary Advantages

People often ask us how we divide our work and collaborate. The outside world seems to think of me as a "jokester," only chatting on cryptocurrency social platforms (CT), while my brother is just a "tech geek" responsible for writing code. But the reality is much more complex—our collaboration model is quite similar to when we participated in Blur mining.

In the process of operating the arbitrage bot, we encounter new problems every day that need to be resolved promptly. We constantly discuss optimization solutions, and any decision must reach a consensus before execution. My brother is responsible for the code but also develops tools that allow me to adjust parameters independently; I have no coding knowledge, while my brother is not good at configuring bot parameters—we complement each other perfectly.

Interestingly, our work styles are completely opposite: my brother likes to push updates and try new features (which I think is somewhat excessive); while I am very conservative (he thinks I am overly cautious), as long as the bot can maintain stable profits, I don't want to change the existing version.

Our daily conversations often go like this:

· Me (impatiently): "Something's wrong with the bot… Did you change something?"

· Brother: "No… I might have changed a few insignificant little things."

Additionally, as a small team of two, without formal company processes, after the bot has iterated to over 250 versions, we sometimes feel that the things we built are becoming increasingly difficult to fully understand and control; every time we push an update, it is hard to predict what chain reactions it will bring.

Summary

Over the past 8 months, we have devoted ourselves to building and optimizing this arbitrage bot—especially in June 2025, when the crypto market maker Wintermute entered with massive liquidity and a team, increasing competitive pressure.

I still remember those 5 days in July: my brother and I intended to relax and vacation in Istanbul and Bodrum (Turkish cities), but we ended up focusing on optimizing the bot the entire time.

Ultimately, our bot maintained the top position in the HyperEVM arbitrage space for 8 consecutive months. By October, as market share gradually declined, we felt it was time to exit.

Key data from this experience:

  • · Total profit: $5 million;
  • · Total trading volume on Hyperliquid: $12.5 billion;
  • · Gas fees paid on HyperEVM: $1.2 million (accounting for 20% of total gas fees since HyperEVM's launch);
  • · Total time invested: over 2000 hours;
  • · 5% of the total trading volume in the UNIT ecosystem.

Looking forward to the arrival of Hyperliquid Season 3 and UNIT Season 1.

Original link

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink