On-chain Arbitrage Practical Manual Practical Edition

CN
2 hours ago

Chapter One Arbitrage World View

1.1 The Essence of Arbitrage

"The essence of arbitrage is to make profits with low risk, with risk being the primary concern."

Arbitrage = Price difference of the same asset in different markets/forms, buy low and sell high to make a profit.

Key Understanding:

Risk-free arbitrage is rare; arbitrage also has risk, just varies in exposure.

Arbitrage is "one leg + another leg," treating LP as one leg, finding the other leg is what constitutes arbitrage; a single leg is just betting on direction.

Risky arbitrage is no different from contracts—distinguish between "arbitrage" and "gambling."

👉 Click to enter Bybit and explore the new world of arbitrage:

https://jump.do/zh-Hans/xlink-proxy?id=15

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image1
1.2 Overview of Arbitrage Categories

On-Chain Arbitrage Overview

├── CEX-CEX (cross-exchange arbitrage/price difference)
│   └── Same coin, different exchange - low threshold/public RPC sufficient

├── CEX-DEX (price difference discovery + arbitrage)
│   └── Interaction between on-chain and off-chain - establish operations before enhancing infrastructure

├── On-Chain MEV (sandwich/backrun)
│   └── Competition is fierce - bribery starting at 95%

├── Cross-Chain Arbitrage (bridge price difference/aggregators)
│   └── No flashswap - requires bridge liquidity

└── Others: new listing/guaranteed return/Korean exchange premium - fee arbitrage - coin-stock RWA (Bstock) - airdrop farming

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image2

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image3

1.3 Five Major Illusions

"Illusion of price difference, underestimation of costs, illusion of scale, simulation trap, execution failure."

Illusion of price difference: Appears to have price difference, but disappears during actual transactions.

Underestimation of costs: Fees/slippage/cost of capital eat into profits.

Illusion of scale: Works well on a small scale during backtesting, but fails when scaled due to price impact.

Simulation trap: Profits on a simulation do not equal real profits (slippage/transaction/lag).

Execution failure: Strategy is correct, but execution fails (order failure/insufficient gas/lag).

Cost-scale relationship is U-shaped: Too small eliminated by fixed costs; too large consumed by price shocks and capacity—optimal in between.

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image4

Chapter Two Beginner Essentials (Must-Dos for Newbies)

2.1 Funding Fee Arbitrage

① Observe fee rates (perpetual funding fees extreme positive/negative)
    ↓
② Buy spot (same exchange unified account buy spot)
    ↓
③ Hedge with contracts (open counter positions to lock direction)
    ↓
④ Earn funding fee (settled every 8 hours, receive/pay rates)

Profit = funding fee rate × position - fees - slippage

⚠ Prerequisites: unified account · positive funding fees are rare · small capital may not cover fees

Principle: Perpetual contracts settle based on funding fee rates; when rates are extreme: buy spot + open counter positions to lock in fees.

Prerequisite: Unified account (auto hedge between spot and contracts on the same exchange).

"Positive funding fee is very rare"—few opportunities but mechanisms are simple.

DEX without token issuance can do this (like ONDO).

2.2 CEX-DEX Price Difference Discovery MVP

"Set a goal for yourself, such as creating a CEX-DEX price difference discovery and automatic arbitrage MVP version; this should be relatively simple."

1. Binance API + DEX quotes (Uniswap/OKX DEX API) pulls prices.

2. Calculate the price difference, alert if it exceeds the threshold.

3. Start with "discovery," not "execution," run it through before adding automated ordering.

Key Point: On-chain and off-chain price differences disappear quickly—monitoring must be fast; "write scripts, first write a monitoring script, once you write it and use it, you’ll understand."

2.3 Small Capital LP and Impermanent Loss

LP is essentially long, hedging has little significance.
Bull markets, LP is cost-effective (last year's BSC bull market was very enjoyable); bear markets "you might accidentally take over the position."
Risk management: monitor significant withdrawals (signals of exit) + exit quickly.
JLP is one of the few LPs that can hedge; ordinary LPs "earn are basically the money of robots."
Practice: Play games/Uni to form an LP to understand impermanent loss.

Chapter Three Infrastructure and Tools

3.1 Node/RPC Selection

Trying it out will help understand that public RPC can also be operational.

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image5

Principle: First ensure operations, then consider enhancing infrastructure.

3.2 Monitoring System

1. "Our first requirement should be to monitor and identify abnormal market signals."
2. Monitor significant withdrawals from LP (signals of exit).
3. Monitor on-chain anomalies/big transactions.

3.3 Bridge Aggregators:

LI.FI: Aggregates liquidity from multiple pools, calculates optimal execution paths off-chain (essentially an off-chain oracle);

Price assessment depends on index breadth and path algorithms;

Bybit products: cross-exchange fee arbitrage + contractual price difference productization; underlying = Bybit providing funds to place orders on different exchanges, internal algorithms calculate liquidation prices.

Comparison: Kyber incurs forward slippage; "turning once takes much longer, only suitable for markets with low real-time requirements."

Chapter Four Advanced Play

CEX-CEX cross-exchange arbitrage process.

① Monitor price differences → ② Buy at exchange A → ③ Sell at exchange B → ④ Settle profits.

Reality: Price difference from 0.15% to 0.11% · transaction completion is the biggest pit · order lag risk.
Advanced: monitor campus withdrawal/anomaly signals → execute automatically → private node speed up.

Price difference decay: earns from 0.15%, must roll to 0.11% to profit.

Biggest pit: issues with order transactions.

Order lag risk: On Trump’s day, OK halting 1.5 million dollars for half a day.

"Arbitrage requires significant capital; small funds are insufficient to cover fees."

4.2 New Listing/Guaranteed Return/Korean Exchange Premium

Squid on Korean exchanges + new listing price guaranteed: "Even if you lose, you won't lose much"—note it’s about losing less, not not losing.

The essence of guaranteed new listings is "betting on DEX issuing tokens and airdrops."

4.3 Coin-Stock Arbitrage (New Direction of RWA)

"So many issuers are pegged to stocks, it feels similar to the arbitrage idea of stablecoins."

Binance Web3 API supports Bstock/Ondo/Xstock, Bstock is interchangeable 1:1 with the main site.
Space: price difference arbitrage; risk: "14,000 for 30 USD risk feels enormous" (zero below).
X timeline has been flooded with bStocks—high attention but doubtful profitability/risk ratio.

Chapter Five MEV Deep Waters (Understand the Roll Rates, Enter with Caution)

5.1 Sandwich Attack Principle

Large transactions enter mempool → bot buys first (frontrun) → large amount pushes up price → bot sells (backrun), capturing the middle price difference.

5.2 Current Status: Intense Competition

"Bribery on the mainnet has already started at 95%, it's fundamentally hard to compete."
"The sandwich on the mainnet already resembles ae13."
"The public mempool is firmly held by builders and MEV bots, and private sorters are black boxes."

Atomic arbitrage is very competitive, high bribery ratios.

Sol has seen a surge of order flow bots, validators are stepping in to "grab market shares."

5.3 Differentiated Strategies

If you can't win on direct competition → try differentiation.

Learning opportunities: flashbots, replicate big bot models to harvest spillage.

Chapter Six Mindset and Discipline

6.1 Manual Operation vs Automation

"When manual operation can earn, it often earns more; waiting to automate loses more instead."

Manual operation is feasible when the market is good; top players have professional dashboards/automated systems.

Low latency competition → requires automation; being slow = by the time it's calculated others have already completed arbitrage.

6.2 Learning Path

On-Chain Arbitrage Learning Path

├── Novice Stage: AI Check-ins · Concept Eduction · Use AI to define learning path

├── Practice Stage: Funding Fee Arbitrage (Simulation) - CEX-DEX Price Difference Discovery MVP - Small Capital LP Formation

├── Advanced Stage: Cross-Exchange Arbitrage Script - Monitoring System (Withdrawals/Anomalies) - LI.FI/Bridge Aggregation

└── High-Level Stage: Flashbots/Private Channels - MEV Reversal/Eating Spillage - Sorter/Mempool

Newbies can use AI as a coach: let AI develop plans/break down learning paths.
Knowledge is not scarce; direction is scarce.
Coding only covers the initial step; algorithms previously not open sourced are even more painful.

6.3 Risk Discipline

Risk Map

Arbitrage Risk Map

├── Five Major Illusions (Illusion of Price Difference/Underestimation of Cost/Illusion of Scale/Simulation Trap/Execution Failure)

├── Market Risks (price spikes/price convergence/order lag)

├── Execution Risks (order transaction failure/insufficient gas/network latency)

├── Capacity Risks (opportunity capacity small/big capital eats price impact)

├── Principal Threshold (small capital insufficient for fees/arbitrage needs large capital)

└── Competition Risks (top takers eat away profits/bribery starting at 95%)

Exposure management: arbitrage also has risks; exposure size is controlled by yourself.

Lag plans: exchanges may lag orders during significant market movements.

Exit signals: monitor significant withdrawals.

Capacity awareness: when opportunity capacity is small, use small positions.
Do not go all in: 0xsun going all in is betting, not arbitrage.

​​​​


​​​​​​​

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image6

On-Chain Arbitrage Practical Handbook Practical Volume_aicoin_Image7​​​​​​​

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

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink