HyperLiquid DEX Arbitrage Project Description
- 24 hours ago
- 2 min read
In this project, I will attempt to code a DEX Arbitrage Bot on HyperLiquid. I'm going to focus on perpetual futures contracts for Real-World-Assets (RWAs).
The goal is to identify arbitrage opportunities and to create a trading bot that can capitalize on such opportunities. I'm going to look at price discrepancies on HyperLiquid and hedge the price difference with the underlying CFD assets, thus making money on the spread.
[Disclaimer]
Content provided by ATJ Research does not serve as investment advice but serves for research purposes only. Your capital is at risk when trading in the financial markets. Past performance is not an indicator of future results. The use of ATJ Traders' content or 3rd party investment services is solely at your own discretion and responsibility.


Requirements
For this project, you're going to need a HyperLiquid trading account. You can sign-up using my affiliate link and receive a discount on your trading commissions: https://app.hyperliquid.xyz/join/ATJTRADER
Also, you will need an MT5 CFD broker. Currently, I am using IC Markets. But I am migrating to a different CFD broker that also support USDC deposits and withdrawals to enable faster rebalancing and reducing USDC/USD conversion costs. More information on this later.
Strategy
When the price difference is negative, it means that HyperLiquid price is lower than on MT5. We can try to buy the HyperLiquid asset and sell the MT5 asset on the same time. We then wait for price to return back to the mean which will then generate profits for us.
Vice versa, is the price difference is positive, we can sell the HyperLiquid asset and buy the MT5 asset.
Additional Edge
Perpetual futures contract have a funding rate mechanism (usually every 1 or 8 hours). When perpetual futures prices are above the real market price, long positions pay funding to short positions.
When perpetual futures prices are below the real market price, short positions pay funding to long positions.
As a result, our arbitrage trading strategy should make money in funding rates as it helps to establish fair price between perpetual futures and the real world price.
More information here: https://hyperliquid.gitbook.io/hyperliquid-docs/trading/funding
Risks
Execution Risk (Slippage)
Margin StopOut Risk - positions can close on 1 leg due to insufficient margin
Pricing Risk - Perpetual Futures contract may not fully reflect the underlying CFD contract
Project Goals
Create an app that monitors pricing discrepancies between perpetual futures on the real world price
Create a trading script that arbitrages the price discrepancies and generates a profit.
Create a reporting app that evaluates the trades and calculates profits.
Member benefits
Once the project is finished and the code is tested, I will share my project with ATJ Research members where they can download the code and try to trade the strategy themselves.
If you're interested to become an ATJ Research Member, you can visit this link: https://www.atjresearch.com/pricing-plans/list