Nov 15, 2022
9:10 pm
CET
Lighting talk

Randomized Trading Bots on Uniswap Using Python

How to build a trading bot for Uniswap

About this session

I’ll be talking about how we can use bots to trade between any trading pair on Uniswap.

Uniswap is the #1 Decentralized Exchange in the industry. They currently support Ethereum, Polygon, Optimism, Arbitrum and Celo. These are the blockchains that this bot can directly run on.

Furthermore, since most DEXs are forks of Uniswap V2, this bot can potentially trade on all of them with a bit of modification.

Now, the cool thing about this bot is that it’s super simple for the user. The user can fire-and-forget. The bot will keep trading between that pair until it runs out of gas.

Once deployed, the bot will never have to be stopped. All the user has to do is to send tokens to the wallet address that the bot controls. The bot will trade what it holds more for what it holds less. You cannot go more simple than that.

The bot trades everything randomly, with heavy use of the “random” Python library. The user can set their desired interval range between each trade, along with the range of the desired portion of the bot’s token holding.

Since the bot is so random, we can prevent other people from predicting the bot’s behavior and front run it.

If we stack enough of these bots together, they’ll draw crazy price charts.

Add to Calendar

Follow us on Telegram for updates