How to Experience On-Chain Arbitrage in Web3 Without Writing Code

How to Experience On-Chain Arbitrage in Web3 Without Writing Code

I jumped into Web3 from scratch in April last year, focusing on MEV (Miner Extractable Value) arbitrage on the blockchain. After a year, my trading system is up and running, with a total nonce (number of transactions) reaching five figures, a profitability rate of over 95%, and single trade net profits peaking at 200,000 yuan.

However, developing such an arbitrage system requires some coding skills. So, in this voyage, I’ll share a way to experience on-chain arbitrage without writing code, helping beginners understand the principles, processes, and risks of on-chain arbitrage.

1. Principles of On-Chain Arbitrage

I previously shared some insights in the Shengcai You Shu community in a post titled "Web3 Introduction: Some On-Chain Arbitrage and On-Chain Scams". Here’s a brief recap:

The most common strategy for on-chain arbitrage involves arbitraging ERC20 tokens between two decentralized exchanges (DEXs). Given the abundance of DEXs, it’s easy to find two pools trading the same token pair. When the price difference between these two pools is significant enough, you can buy low on one side and sell high on the other, completing an arbitrage.

For example, consider this trade on UniswapV2 and SushiSwap from September 2023: Transaction on Etherscan.

The arbitrageur first swapped 0.0871983 WETH for some RARI tokens on UniswapV2, then exchanged these RARI tokens for 0.0888229 WETH on SushiSwap. The gross profit was 0.0888229 - 0.0871983 = 0.0016246 WETH, which basically just covered the gas fees, resulting in little to no net profit.

Sometimes, this arbitrage involves not just two pools but three or more, similar to forex arbitrage. In crypto, we also see triangular arbitrage or multilateral arbitrage.

For instance, consider this trade from September 2023: Transaction on Etherscan.

The arbitrageur performed a triangular arbitrage with WETH, DAI, and SNX across UniswapV3, UniswapV2, and Balancer, ultimately securing a gross profit of 0.004335288 WETH and a net profit of around 0.001 ETH.

2. Furucombo

The arbitrage trades mentioned earlier might seem too complex and distant for beginners. So, let's introduce a simpler tool for experiencing arbitrage: Furucombo.

Furucombo is a drag-and-drop DeFi transaction builder tool (website: Furucombo.app), launched in March 2020. This tool supports most mainstream DeFi protocols, such as exchanges (UniswapV2/V3, SushiSwap, Curve, etc.), lending platforms (Aave, Compound, etc.), and staking pools (Lido, etc.).

It supports multiple languages (you can switch to Chinese in the bottom left corner of the website) and operates on the Ethereum mainnet, Polygon, and two popular Layer 2 solutions, Arbitrum and Optimism.

On Furucombo, you can set up your trading sequence by dragging and dropping blocks, like building with LEGO. Then, you can connect your wallet, approve tokens, and send transactions. For instance, you can set up the aforementioned dual-sided arbitrage trade like this:

Note: The token prices might have changed since the example trade, so the current setup might show no gross profit and even a loss. However, you can try reverse trading (from SushiSwap to UniswapV2), which might yield a gross profit. For example, after reversing the trade, there was a gross profit of about 0.00027 WETH, but it wasn't enough to cover the gas fees, so there was still no net profit.

If your wallet doesn't have enough tokens, you can use flash loan protocols to borrow and repay in a single transaction. For example, this transaction from August 2020 demonstrates such an arbitrage process:

Transaction on Etherscan.

  1. First, a flash loan of 1 WBTC is taken from Aave.
  2. Then, the 1 WBTC is swapped for 1.00296439 renBTC on Curve.
  3. Next, all renBTC are swapped for 1.00584 WBTC on 1inch (in reality, the on-chain transaction received 1.02234918 WBTC).
  4. After repaying Aave 1 WBTC (plus a 0.09% fee), the gross profit from this transaction is 0.02144918 WBTC. The gas fee paid was 0.1559325825 ETH. Converting all of this to the prices in August 2020, the net profit for this manual arbitrage trade was $193.76.

Important Note: As with most arbitrage opportunities, it was possible to manually capture these opportunities in the early days. However, nowadays, with more programmatic traders like us joining the space, the chances of manually finding profitable arbitrage opportunities are nearly non-existent. In most cases, profitable opportunities are captured by bots immediately. In other cases, as demonstrated above, there might be a gross profit but no net profit (gross profit lower than gas fees), making it unnecessary to submit the trade.

Therefore, it's no longer recommended to use Furucombo for manual arbitrage but only to try and experience the arbitrage process.

3. Other Uses of Furucombo

Although arbitrage isn't feasible with Furucombo, it remains a highly intuitive platform for learning various DeFi operations, especially for those new to DeFi and Web3. Here are a few examples of what you can do:

(1) Learning DeFi

Since Furucombo supports most mainstream DeFi protocols and operates on Polygon and two major Layer 2 networks with low gas fees, you can experience these protocols at a very low cost. You can see how each protocol transaction looks on Etherscan once it’s on-chain.

You can also create tutorials for others by combining these transaction processes. Moreover, the Furucombo website has a "Learn" section that offers pre-built transaction combinations for educational purposes.

(2) Combo Transactions and Multi-Chain, Multi-Address Transfers

With combo transactions, you can buy multiple tokens in a single go. Furucombo also has a new feature that supports multi-chain, multi-address transfers, with the ability to upload target addresses via CSV.

This tool is useful for dispersing funds when participating in new token sales or airdrops.

(3) Farming Strategies

Furucombo has introduced modules for liquidity farming and staking farming, which function like "investment" strategies that can earn relatively low-risk returns. The website’s investment section highlights pools with relatively high farm yields.

(4) Loan Liquidation and Migration

By combining flash loans with lending protocols, you can handle loan liquidations and position clean-ups. For example, consider this transaction combination:

  • Flash loan of 18,000 USDC from Aave.
  • Repay Compound to retrieve the 7.2249 ETH collateral.
  • Swap 7.2249 ETH for 22,863 USDC on Uniswap V2.
  • Repay the flash loan plus 16.2 USDC in interest, ending with 4,847 USDC remaining.

Sometimes, your loan position is about to expire or the collateral ratio is insufficient. Or, you find another lending protocol offering a better rate but don’t want to liquidate your current asset. You might want to migrate the loan (take a new loan to repay the old one) instead of converting to another asset.

In traditional finance, you would need bridge funding with potentially high interest to swap the old loan for a new collateralized loan, repaying the bridge funding.

In the blockchain world, flash loans act as this bridge funding. You can use them to perform loan migrations instantly. For example:

  • Flash loan of 3,500 DAI.
  • Repay MakerDAO to retrieve 5 ETH collateral.
  • Collateralize the 5 ETH on Aave and borrow 3,500 DAI.
  • Repay the flash loan, incurring only minor fees and gas costs.

This allows you to achieve instantaneous leverage and complete loan migrations seamlessly.

4. Risk Warnings

Finally, let’s discuss the risks.

In previous discussions with friends in the Shengcai community, I mentioned that Furucombo was a profitable arbitrage tool a few years ago but isn't anymore. On-chain programmatic arbitrage is a highly competitive, niche field with significant barriers to entry. It's rare to find beginner tutorials that teach you how to make money in this area because of common sense:

  1. If something is profitable now, it won't be shared publicly.
  2. If it's shared publicly, the profitable period has likely passed.
  3. If it's both profitable and public, there's usually a high barrier to entry.
  4. If it's profitable, public, and has no barrier to entry, be cautious—it might be a scam.

Someone once shared an open-source on-chain triangular arbitrage software (I've blurred the download link). It had detailed instructions and video tutorials, making it look legitimate. It supported a graphical interface, showed profit fluctuations, and claimed you could earn over 20 ETH a month with just a few clicks.

However, upon deeper inspection, this so-called open-source software had a hidden backdoor that sent your account's private key to a specific address.

In the Web3 world, greed can be dangerous and can easily lead you into traps. In this "dark forest," you can't emphasize security enough. I hope that in your future ventures, you'll all sail safely to shore.