Introduction To DEX Arbitrage | Intermediate Solidity Tutorial

James Bachini

More information in the blog post at:

Github repo at:

Smart contract developers have the ability to swap digital assets multiple times in a single transaction. If the route isn’t profitable then the whole transaction can be rolled back to the original state and the developer only loses a gas fee. The introduction of layer2’s and alternate layer1 blockchains with low and even zero gas fees has made this a playground for arbitrage across decentralised exchanges. This Solidity tutorial will provide an introduction to DEX arbitrage and along with some profitable open-source code to get you started. Good morning…

00:00 DEX Arbitrage Introduction
00:35 How DEX Arbitrage Works
03:32 DEX Arbitrage Smart Contract
06:39 Researching Exchanges, Tokens & Routes
09:13 Creating A Trading Bot Controller
12:04 Results Trading On Aurora
15:48 Competing & Higher Stakes

For more content about crypto markets, blockchain development and DeFi visit my blog at

Most of the code I write and talk about is open-sourced at:

Subscribe to the channel for updates ✅

The content I create is to document my journey and for entertainment purposes. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. DYOR and do not play with funds you do not want to lose.

Did I mention please hit the like button for the YouTube algorithm.

Thanks for watching!