Scan to download
BTC $67,295.56 +0.86%
ETH $1,956.21 -0.44%
BNB $607.53 +0.46%
XRP $1.42 -4.56%
SOL $81.67 -4.53%
TRX $0.2795 -0.47%
DOGE $0.0974 -3.83%
ADA $0.2735 -4.22%
BCH $560.85 +0.27%
LINK $8.64 -2.97%
HYPE $28.98 -1.81%
AAVE $122.61 -3.42%
SUI $0.9138 -6.63%
XLM $0.1605 -4.62%
ZEC $260.31 -8.86%
BTC $67,295.56 +0.86%
ETH $1,956.21 -0.44%
BNB $607.53 +0.46%
XRP $1.42 -4.56%
SOL $81.67 -4.53%
TRX $0.2795 -0.47%
DOGE $0.0974 -3.83%
ADA $0.2735 -4.22%
BCH $560.85 +0.27%
LINK $8.64 -2.97%
HYPE $28.98 -1.81%
AAVE $122.61 -3.42%
SUI $0.9138 -6.63%
XLM $0.1605 -4.62%
ZEC $260.31 -8.86%

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

Summary: From discovering the HyperEVM block 2-second price difference vulnerability, to building an arbitrage bot to crush competitors, and then introducing perpetual contracts to achieve a profit of 5 million dollars, we completed this crypto arbitrage practical operation in 8 months.
Foresight News
2025-10-22 09:30:55
Collection
From discovering the HyperEVM block 2-second price difference vulnerability, to building an arbitrage bot to crush competitors, and then introducing perpetual contracts to achieve a profit of 5 million dollars, we completed this crypto arbitrage practical operation in 8 months.
Original Title: How We Made $5M Running the #1 Arbitrage Bot on HyperEVM
Original Author: CBB
Original Translator: 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 looking for the next high-quality opportunity—at that time, there were still 40% of HYPE tokens to be distributed to the community, which we believed was a potential breakthrough. As early as 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 it requires some investment, we might be able to participate in Hyperliquid's Season 3 events." We immediately began to experiment and indeed discovered arbitrage opportunities, but we were unsure if we were competitive.

Why Are There Arbitrage Opportunities on HyperEVM?

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

Initial Attempts and Results

We built the first version of the 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, and a hedging operation would be executed on Hyperliquid.

For example:

  • · If HYPE's price rises on Hyperliquid, it would 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 of 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, obtaining a 30% reduction in trading fees, and lowered the 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 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 crazily "print money," making a profit of $120,000 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 transaction 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 surged, we raised the required return on investment (ROI) for arbitrage to avoid sending trades that would lag due to high gas prices;
  • · Trading rate limit: if the number of trades sent in the past 12 seconds exceeded a set number (x trades), we would increase the profit requirement for new trades.

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

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

Transitioning to Market Maker: Capturing More Opportunities

In June 2025, my brother proposed an idea he had been brewing for weeks: to conduct arbitrage on Hyperliquid as a "market maker" rather than a "taker" (Note: a market maker provides liquidity and waits for orders to be filled; a taker directly fills 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 a market maker, we needed to place orders on Hyperliquid, 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 find the cause of the imbalance, leading to chaos.

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

  • · Profit range: clearly defining when to create orders, when to hold orders, and when to cancel and re-list orders;
  • · Market maker trading range: limiting 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: setting 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 "time-weighted average price" (TWAP) to control risk. This transition was a "game changer"—while competitors remained in the "taker" model, 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 HYPE's price surged:

  1. Market maker order 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 were obvious: we had to pay the taker fee (reducing profits and weakening competitiveness), and the USDT0/USDC trading market on Hyperliquid was not mature enough (with spreads and pricing discrepancies).

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

  • · USDC balance threshold: Only skip the USDT0→USDC conversion when USDC balance exceeds 1.2 million;
  • · USDT0 balance threshold: Only skip the USDC→USDT0 conversion when 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, let me clarify: throughout our cryptocurrency investment journey, we have never used leverage or perpetual contracts (except for a failed attempt on Bitmex in 2018), 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 didn't have to compete with them for liquidity on the same order book.

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

We designed new system parameters for this:

  • · Position limits: Set maximum long/short position sizes for HYPE perpetual contracts to avoid liquidation or depleting USDC/HYPE balances;
  • · Premium/discount monitoring: Real-time tracking of the premium or discount of perpetual contracts relative to spot;
  • · 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 HYPE token short positions are as follows:

Introducing perpetual contracts was one of the most critical upgrades—we earned about $600,000 just from funding rates while capturing more arbitrage opportunities through premiums/discounts.

Brother Partners: Collaboration Model and Complementary Advantages

People often ask 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.

During the operation of the arbitrage bot, we encounter new problems every day that need to be resolved promptly. We constantly discuss optimization solutions, and any decision must be executed only after reaching a consensus. My brother is responsible for the code but also develops tools that allow me to adjust parameters independently; I completely do not understand coding, while my brother is not good at configuring bot parameters—we complement each other perfectly.

Interestingly, our working 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 too conservative), as long as the bot can maintain stable profits, I do not want to change the existing version.

Our daily conversations often go like this:

  • I (impatiently): "The bot is acting strange… Did you change something?"
  • Brother: "No… I might have changed a few insignificant things."

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

Conclusion

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 on vacation in Istanbul and Bodrum (Turkish cities), but instead, we focused entirely on optimizing the bot.

In the end, 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.

The core 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 went live);
  • · Total hours invested: over 2000 hours;
  • · 5% of total trading volume in the UNIT ecosystem.

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

Original Link ```

warnning Risk warning
app_icon
ChainCatcher Building the Web3 world with innovations.