🧬
Head First DeFi: TX & Strategies
  • Decoding the DNA of DeFi Transactions & Strategies
    • From Arbitrage, Sandwich to JIT and Oracle Manipulation
    • Be Prepared To Explore the DeFi World
    • Case Study Format
  • MEV Transaction & Strategy 101
    • A $3.2 Million Profit Arbitrage, the Most Lucrative MEV of 2022
    • Understand Back-Run Arbitrages and Their Signals and Join the MEV Game.
    • Wallchain's MEV Arbitrage Redistribution
    • MEV Blocker, the multi-transaction MEV redistribution system that refunds 90% of builder rewards
    • With NFT arbitrage, someone was snipping your Baby Doge.
    • The Hidden Tax That You Should Know About
    • MEV-Share, Flashbots' MEV Redistribution Solution
  • Don't Let Your Trading Become the Recipe of Someone's Sandwich
    • The Notorious Jaredfromsubway.eth's Sandwich Attack
    • Combined with Flash Loan, This Leveraged Sandwich Launched the Attack with Millions of Volumes
    • Sandwich Targeting Liquidity Providers
    • The Flash-Loan-Enabled Sandwich Attack against Ethereum Foundation
  • Under the Hood of the DeFi Lego
    • What's Really Going on When Processing Liquidity in a Uniswap Pool?
      • Pretend You Are One of the Shareholders of a Bank Branch.
      • Let's Match the Bank Branch to a Uniswap Pool.
      • Adding Liquidity.
      • Removing Liquidity.
      • Conclusion
    • Liquidation: A Good Entry Point to Comprehend Internal Accounting Used by Many DeFi Protocols.
    • A Cross-Chain Arbitrage: The Art of Arbitraging BANANA Cross BSC and Polygon Chains
    • Liquidity Rebalancing: Moving Around $9.4 Million for More Fee Revenues.
    • Rebalancing loan positions utilizing AAVE Flash loan
    • How Does the Grok Token Exploiter Exploit the X Token By Baking His Own Cake And Eating it?
  • Unlocking the Power of Advanced DeFi Transactions and Becoming a DeFi Sleuth
    • Just-in-Time, an MEV Type That Benefits Traders in the Same Trading Venue
    • A Bot Devised Arbitrage Strategies Centered on Autonomous Minting and Burning of Synthetic Tokens
    • The Defect in a Lending Protocol's Oracle Module Was Exploited by a Bot to Generate a $110K Profit
    • A $296K-Profit Arbitrage Done by the Lightning Reflex Bot After the Vyper-Curve Exploit
    • Coffeebabe.eth Utilized Curve's CRV/WETH Pool's Price Deviation for a $5.4 Million Profit Arbitrage.
    • An Attacker Baited MEV Arbitrage Bots and Emptied Their Wallets
    • How Enso Solves 73.5ETH in 116 Steps in One Transaction
Powered by GitBook
On this page
  • Strategy One Liner
  • Big Picture
  • Key Steps
  • Key Protocols
  • Key Addresses
  • Key Assets
  • Simplified Illustration
  • Step-by-step Decoding
  • More Details

Was this helpful?

  1. Under the Hood of the DeFi Lego

A Cross-Chain Arbitrage: The Art of Arbitraging BANANA Cross BSC and Polygon Chains

PreviousLiquidation: A Good Entry Point to Comprehend Internal Accounting Used by Many DeFi Protocols.NextLiquidity Rebalancing: Moving Around $9.4 Million for More Fee Revenues.

Last updated 1 year ago

Was this helpful?

Strategy One Liner

Using 4 transactions, the bot completed a cross-chain arbitrage between BNB Smart Chain (BSC) and Polygon, swapping BANANA and other cryptos in 2 minutes, and reaped $28 as revenue. explains the same transaction.

Big Picture

This graph combines 4 Txs from 2 Chains, Polygon and BSC, into one chart. One can easily identify the corresponding chains by the chain icon tagged with the token flow. The transaction steps are marked in chronological order of occurrence by capital letter dash number.

Key Steps

Steps A-6: The arbitrager swapped 6000 USDC for 3322.9 BANANA on BSC through an aggregator contract 0xbaf…a9643.

Step B: The arbitrager transferred 3322.9 BANANA to 0x171...319f1 (Anyswap) on BSC.

Step C: The arbitrager received 3322.9 BANANA on Polygon. Steps B and C are the cross-chain transactions. BANANA is transferred from BSC to Polygon in these steps.

Steps D-0,14: The arbitrager swapped 3322.9 BANANA for 6028 USDC through an aggregator contract 0x114…17187.

Key Protocols

MultiChain (formerly Anyswap): A decentralized cross-chain swap protocol.

ApeSwap: A decentralized exchange (DEX) on multiple chains.

UniswapV2: A major DEX.

Balancer: Another DEX.

Key Addresses

The pentagon "from 0x9bb...bd255" is the arbitrager's address.

The pentagon "from 0x171...319f1" is Anyswap's address. Because this chart combines multiple transactions together, there may be several "from"s.

The ovals with "APE_LP" are ApeSwap's Pools. ApeSwap is a multichain DEX. This graph shows its BNB and Polygon Pools.

Key Assets

BANANA, USDC, WETH, WMATIC, DAI

Simplified Illustration

The capital letters A-D mark the order of the transactions.

Step-by-step Decoding

Step A-0: The arbitrager sent 6000 USDC to an aggregator 0xbaf…a9643, aiming to swap for BANANA.

Steps A-1,2: The aggregator swapped 6000 USDC to 6000 BUSD.

Steps A-3-5: The 6000 BUSD was swapped to 3322.9 BANANA.

Step A-6: The arbitrager received 3322.9 BANANA swapped from his 6000 USDC.

Step B: The arbitrager transferred 3322.9 BANANA to 0x171...319f1 (Anyswap) on BSC.

Step C: The arbitrager received 3322.9 BANANA on Polygon. Steps B and C are the cross-chain transactions. BANANA is transferred from BSC to Polygon in these steps.

Step D-0: The arbitrager sent 3322.9 BANANA to an aggregator 0x114…17187, aiming to swap back to USDC.

Steps D-1 to D-5: The arbitrage used the aggregator to swap BANANA to WETH, then to DAI then to USDC.

Steps D-6 to D-13: First, swap BANANA to WMATIC, then to USDC.

Step D-14: Sent all the USDCs swapped from D-1 to D-13 back to the arbitrager. That is a total of 6028 USDC.

More Details

The bot gained revenue of 28.4604 USDC on Polygon. The entire cross-chain arbitrage process took about 2 minutes, and the total gas cost was about $1.35.

Because the assets are moved from one chain to another in the cross-chain arbitrage, the bot would occasionally rebalance assets on these two chains, as shown in the following graph.

This YouTube video
Transaction Flow Chart | EigenTx:multi/0x89b6fb2d15832aac4ad7d983d1546b559bfacdddb874eb7ee9786df450d1c1f4,0x6a59a157a3bde09ba4ad93de9860aa1fa88f884357a79668e272a7c00d632b1e,0x385f73521f3a1227f7958d8263a0f7da245448178918d8cb87dd6956c28e4b3d,0xadee80fbf811c3c23c92eeb8ea70dc171a3256f079e1bf1c371e17cd6ac8b4c9EigenPhi
Transaction Flow Chart | EigenTx:multi/0x427d0460abc2a5652418afb37cb70379a2ccd149fce24b77bb64fcd4d3dcac04,0x01bf35b469b408f78956df6df8c35a8d341ff150193c2db674d3996c0f7df925EigenPhi
Logo
Logo