10 Months of Gold Mining Journey: How Did We Earn Millions of Dollars Through Arbitrage with Stock Perpetual Contracts?

CN
2 hours ago
How did a two-person team use arbitrage robots to earn tens of millions of dollars in profits on Hyperliquid?

Written by: CBB

Translated by: Luffy, Foresight News

The story begins in October 2025. For the past eight months, we have been operating the leading arbitrage robot on HyperEVM. But this gold rush is about to come to an end.

In recent months, we have been competing with Wintermute for profits, and with new players entering the field, arbitrage profits have been significantly compressed. That's okay; my brother and I have long been accustomed to this situation.

We never directly compete with institutions that have a large number of full-time employees; we simply can't because from beginning to end, there are only the two of us.

Our core advantage has always been: deploying a trading strategy at the fastest speed, eating up the profits before the giants come into the arena to harvest. Large institutions are constrained by regulations, internal processes, layers of approvals, etc., making it impossible to launch a strategy within 48 hours. We don’t have these constraints; the only thing we need to do is seize the speed advantage.

It’s time to look for the next arbitrage track. We wondered: where's the next opportunity?

On October 10, the market plummeted, and the cryptocurrency landscape looked gloomy. Everyone suffered heavy losses, and there seemed to be no worthy arbitrage opportunities left. We searched everywhere for new opportunities.

On October 13, Hyperliquid officially launched the HIP‑3 proposal. Three days later, Unit/TradeXYZ launched the first perpetual contract market for stocks, XYZ100. Hyperliquid also reserved over 40% of its token supply for community distribution, and we thought pushing up trading volume on HIP-3 might be a good idea.

The starting point for the arbitrage opportunity on HyperEVM eight months ago was the same, simply hoping to boost Unit and Hype spot trading volume on Hyperliquid. We were uncertain if this model would succeed, but we decided to give it a try: to build an arbitrage robot for cross-market arbitrage between the HIP‑3 chain market and traditional financial markets.

Initial Exploration of Traditional Financial Markets

One premise needs to be stated: before this, we had never traded stocks and barely understood futures; we were almost ignorant of traditional finance.

We only knew that IBKR (Interactive Brokers) was a high-quality trading platform suitable for this strategy, so we decided to study it in depth. In the initial days, I completely explored how to use the IBKR platform. I sent screenshots of each interface to Claude, constantly asking: "What is this?" "What does this indicator represent?" "What should I do next?" "How do we hedge our position in XYZ100?"

This is how we learned traditional finance from scratch. Meanwhile, my brother began to study the API of IBKR, figuring out the boundaries of the platform's functionalities.

Coming from a background in crypto trading, he was used to quickly running through programs after connecting to exchange APIs, but IBKR was an entirely different system. Market data subscriptions, contract specifications, order types, operational permissions, API call limitations, TWS clients, IB gateways… a multitude of issues needed to be resolved, and initially, we weren't even sure if the entire plan was viable.

After struggling with IBKR for a whole week, the project finally made progress.

Building the Arbitrage Robot

The entire strategy logic is quite simple. We regard IBKR's quotes as fair market prices, continuously monitoring the arbitrage windows in the HIP‑3 market.

If the price of the HIP‑3 asset is discounted relative to IBKR, we go long on HIP‑3; only after the trade on Hyperliquid completes do we establish a corresponding short position on IBKR for hedging. Conversely, if the HIP‑3 asset is priced at a premium relative to IBKR, we operate in reverse: shorting on HIP‑3, then placing a long position on IBKR after the trade.

Theoretically, the logic is simple. In practice, we need to configure a large number of parameters for every trading asset on HIP‑3.

For example, the hedging parameters for Nvidia NVDA on the IBKR side are: ["NVDA", 55, 400, { maxDelta: 800, slippage: 0.1 }]

  • 55: The minimum hedging position. IBKR has a minimum commission of 1 USD per trade, thus avoiding a lot of tiny trades; we execute the hedging operation only when the hedging difference accumulates to 55 shares of NVDA.
  • 400: The maximum hedging quantity per order on IBKR, to prevent excessive slippage.
  • maxDelta: 800: Risk control threshold. If IBKR's trading is abnormal and the position discrepancy reaches 800 shares of NVDA, the robot will immediately stop trading that asset.
  • slippage: 0.1: The maximum allowed slippage for hedging trades on IBKR.

Next are the operational parameters for NVDA on the HIP‑3 side: NVDA: pair("NVDA", "xyz:NVDA", {makerSize: 400, makerOffsetBuy: 0.12, makerOffsetSell: 0.12, cancelDelta: 0.02, takerRatioBuy: 0.05, takerRatioSell: 0.1, takerMin: 1, takerMax: 2000, limit: 110000, makerEnabled: true, preMarketOffset: 0.04 })

The parameters look complex, but the logic isn't hard to understand:

  • makerSize: The scale of orders providing liquidity.
  • makerOffsetBuy / makerOffsetSell: The buy and sell spreads set relative to the fair price.
  • cancelDelta: The threshold at which to cancel and repost an order when the price fluctuates beyond this limit.
  • takerRatioBuy / takerRatioSell: The spread conditions that need to be met for arbitrage on taker orders.
  • takerMin / takerMax: The minimum and maximum positions for executing taker orders.
  • limit: The total position limit allowed for that asset.
  • makerEnabled: To enable or disable the market-making feature of placing orders.
  • preMarketOffset: An additional widening of spreads during pre-market trading, as liquidity in traditional finance is extremely poor.

First Real Trading

By the end of October, the robot finally officially went live for testing. The first few days were filled with issues. The IBKR interface frequently disconnected, and my brother could only write various emergency scripts to keep the program running smoothly.

But we quickly discovered numerous arbitrage opportunities in the market, and profits were within reach. In November, we accumulated about 850 million dollars in trading volume on HIP‑3, earning over 500,000 dollars, which was quite good.

In December, market conditions were dull, with transaction volume around 550 million dollars, but we still achieved considerable profits. At this point, we began to hesitate about whether to shift to other tracks. This profit was decent but not exorbitant.

As is our custom, we chose to continue operating the strategy. As long as there is still arbitrage space in the market, we find it hard to stop actively.

Precious Metals Market Explodes

In January, the HIP‑3 market completely exploded. Gold and silver prices skyrocketed, and demand for users to go long on commodities surged on Hyperliquid, making profits exceptionally easy. The adjustments made over the past two months had prepared us well to handle such extreme market conditions.

However, liquidity became the biggest challenge. Almost everyone was going long on commodities on Hyperliquid, meaning we needed to continuously inject more funds into IBKR for hedging. We kept transferring funds to IBKR, but large cross-border transfers faced numerous banking obstacles. EtherFi provided enormous support, helping us quickly complete large capital transfers out.

By January of this year, we completed 1.7 billion dollars in trading volume on Hyperliquid, with funding fees alone exceeding 600,000 dollars.

But as mentioned earlier, we are just a two-person small team without established internal control processes, rapidly iterating and directly testing strategies in the live environment. This model was destined to come at a cost.

On January 27, just as I arrived in Dubai to meet my brother for coffee to discuss the robot strategy, my phone suddenly received a warning of forced liquidation from IBKR.

I was completely at a loss. The market's fluctuations that morning were not significant. Upon logging into the IBKR backend, I discovered that our net short position in gold futures valued at 120 million dollars was rapidly increasing.

We immediately shut down the robot. At that moment, I was shaking all over, deeply afraid of having our position forcibly liquidated. The robot had taken over the majority of the IBKR trades, and I wasn't familiar with the risk control details of this account.

In the next 15 to 30 minutes, I manually closed the short position in gold valued at 120 million dollars. By the time the US stock market opened in the afternoon, we finally calculated our final loss: 1.1 million dollars.

This blow was extremely heavy. But we had no time to wallow in disappointment; we needed to immediately pinpoint the cause of the failure and fix the loopholes.

The cause of the accident was actually very basic: the IBKR interface's market data refresh was interrupted. The robot misjudged the discrepancy between the holdings of Hyperliquid and IBKR, continuously adding short positions in gold on IBKR, trying to correct a position deviation that didn’t exist. It repeated this process, continuously increasing the position until the size of the shorts reached 120 million dollars, triggering the warning for forced liquidation.

It was clear that the entire system needed to add multiple risk control verification mechanisms. We must ensure that the data pushed by IBKR is real-time and effective; we need to add multiple verification logic before the robot increases its positions. Ultimately, the initial design capacity of this robot was completely unable to keep up with the enormous trading volume and arbitrage opportunities present.

That day, we worked all night to fix all issues and launched a new version of the robot the next day.

But this massive loss shook our confidence. We began to doubt whether we had truly grasped this strategy, as the risk-reward ratio no longer seemed worth it. Losing 1.1 million dollars simply due to a basic bug made us fearful of the robot encountering another fatal error. For the first time since going live, we seriously considered completely shutting down this arbitrage program.

But those who know us are well aware that we have an extreme thirst for profits. We would not give up due to a million-dollar loss; instead, we would double down and refine the strategy. Looking back at all the trading robots we have developed, we have encountered massive losses almost every time, yet we have managed to recover each time.

We wouldn’t dwell on sadness; instead, we would review faults, fix loopholes, and start afresh. Before recovering our losses, neither of us intentionally mentioned this loss.

The day after the incident, silver experienced a significant retracement after hitting a historic high, creating approximately a 3% price difference between Hyperliquid and IBKR. We seized the opportunity and closed a trade for about 600,000 dollars in profits, regaining the initiative.

Liquidity Management and Speed Optimization

At this point, the strategy was already steadily profitable. We deeply understood market laws: high profits would inevitably attract more institutions and professional trading teams to compete. We needed to iterate and upgrade quickly.

The first challenge was capital liquidity. Pure crypto arbitrage across exchanges typically takes less than five minutes for rebalancing; however, this strategy required fund transfers to and from IBKR.

To address this, we established a dynamic capital management system: when the available funds on IBKR are insufficient, we are willing to slightly discount and close positions to release margin while simultaneously raising the spread threshold required for new arbitrage trades; when IBKR has sufficient funds, we do the reverse, accepting smaller spreads for a more aggressive capital deployment.

The second optimization direction was trading speed. Until then, we had always used IBKR quotes as benchmark prices. This solution was workable, but the market data push speed was relatively slow. As more players entered the field, arbitrage would evolve into a speed race, and simply relying on IBKR data would become uncompetitive.

We began looking for alternative data sources, ultimately selecting Databento. With Databento and official authorization from Nasdaq, we could access lower-latency direct market quotes. We submitted the access application in January, and it was officially approved by the end of the month.

Switching from Precious Metals to Crude Oil Trading

The precious metals market remained hot in February, with transaction volumes reaching approximately 1.5 billion dollars that month. To make matters worse, at the end of February, Trump ordered airstrikes on Iran, causing market volatility to soar and oil prices to break 100 dollars.

During that period, excluding the weekends when traditional finance had no trading and there were gaps, we earned 60,000 to 120,000 dollars daily from arbitrage spreads and funding fees. If 24-hour profits were only 40,000 dollars, we would even suspect that the strategy had malfunctioned, backtracking on the robot parameters to find optimization space. Claude provided us with tremendous help in data analysis. We uploaded all transaction records from Hyperliquid and IBKR for AI to analyze the source of our losses, pinpoint loopholes, and propose optimizations. This was the first time we used artificial intelligence for trade review, and the effect was remarkable.

Even with stable profits, we maintained an extreme habit of iteration. This was the only way we could maintain a competitive advantage. We discussed robot strategies all day long, he sent code updates almost daily, while I continuously adjusted trading parameters based on real-time market conditions.

The Semiconductor Sector Celebrates

At the end of April, the geopolitical conflicts in Iran eased, and we thought this profitable trend would come to an end. For the past few months, we had stabilized profits of about 500,000 dollars weekly and it was hard to imagine any market maintaining such levels of arbitrage opportunities.

At that moment, semiconductor stocks and various bottleneck-themed stocks experienced skyrocketing trends. Stocks like SNDK and MU surged in a manner reminiscent of meme coins.

The market conditions completely exceeded our expectations. When we built the robot in October last year, the market was dull. Since then, the precious metals, oil, and now the semiconductor sectors all exhibited extreme trends similar to meme coins on Binance.

Luck indeed played a huge role. We happened to hit the timing right, and the final strategy perfectly adapted to the extreme volatility of the market. But this also relied on our early, firm bet on the HIP‑3 and stock perpetual contract tracks, as well as our foresight judgment regarding the TradeXYZ platform.

In May, June, and July, our monthly trading volume stabilized between 1.5 billion and 2.5 billion dollars, with weekly profits remaining steadily in the range of 400,000 to 500,000 dollars.

Conclusion

As of early September. Since we entered the game, numerous institutions have participated in this arbitrage competition. Ethena has also officially announced that it will enter the stock basis trading track within a few weeks.

The window of opportunity that belongs to us may be about to close, but this journey of prospecting has been thrilling enough.

In this seemingly chilly winter of cryptocurrency over the past ten months, we have delivered such a report card:

  • Combined trading volume of HIP‑3 and IBKR: 32 billion dollars
  • Trading volume accounted for 1.5% of the total trading volume on the TradeXYZ platform
  • Final net profit: 10 million dollars

Achieving this profit is thanks to sufficient available funds. Even so, the annualized return on the invested capital has remained between 35% and 45%.

More importantly, this opportunity has allowed us to truly step into the traditional financial market for the first time and grasp the operational logic of the traditional trading market. Ten months ago, we had never traded stocks or understood the concept of futures. Now we have handled trading volumes totaling 32 billion dollars.

Next, we can only wait for the third-quarter incentive plan of Hyperliquid to launch.

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

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink