Degen Code

Degen Code

Project: Snowsight Arbitrage Bot

Tying It Together

May 14, 2022
∙ Paid

Welcome back Degens!

This is another long project post where I will tie together many things I’ve covered over the past few weeks.

For background, I recommend reviewing the posts on mempool observation, asynchronous websocket listeners, the introduction to Snowsight, and the Snowsight transaction propagator.

This will be deeply technical and complex, so I won’t spend much time introducing the concept. This project will deliver a bot with the following features:

  • Use a websocket subscription to observe new blocks and the latest base fee

  • Use a websocket subscription to receive new Sync events for liquidity pools, then translates these sync events to reserve amounts.

  • Maintain a continuous subscription to the Snowsight service by sending payments.

  • Use the Snowsight mempool service to receive notifications for pending and completed transactions.

    • Using these notifications, track and dynamically adjust to fluctuating gas fees.

  • Calculate and execute on profitable arbitrage opportunities.

  • Send transactions through the Snowsight transaction propagator.

Though this project uses Snowsight, it does not take advantage of the mempool to frontrun and backrun transactions. The backrunning project was completed a few weeks after this was posted (link HERE), so review that if you’re interested.

This project also uses the Snowsight premium service as a low-latency way to submit transactions and improve our awareness of mempool competition to set our gas fees.

Here we go!

User's avatar

Continue reading this post for free, courtesy of BowTiedDevil.

Or purchase a paid subscription.
© 2025 BowTiedDevil · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture