Coder Social home page Coder Social logo

whack-a-mole's Introduction

Whack-A-Mole

The image is of Dugtrio from Pokemon.

And the banner is... Pokemon. I'm a Pokemon fan, what more can I say?


What the heck?

Whack-A-Mole is a CEX-DEX arbitrage bot written in Python.

Arbitrage strategies are like the global Whack-A-Mole game played in parallel.

Multiple players participate to find the mole that pops up, and jump to capture that opportunity.

Who knows who'll win...

What we know for certain is that you'll need a fast pair of eyes on the market at all times, and an extra fast execution engine to capture the moment without latency.

Will our beloved Python be able to accomplish this? We'll see 😎

Example Strategy #1: DEX arbitrage

The main branch is likely to go through a lot of changes, so to run an example that runs without breaking, you should switch to the examples/strategy/dex_arb_base branch before running main.py. Run:

git checkout examples/strategy/dex_arb_base

Example Strategy #2: CEX-DEX arbitrage

You said this is a CEX-DEX arbitrage bot, where the f is it?

I know...πŸ₯² I'm still actively researching the CEX-DEX arbitrage space.

Everyone interested in the process can go visit my other repository which is actually a derivative of Whack-A-Mole:

https://github.com/solidquant/cex-dex-arb-research

This research template is an attempt to find alphas within the crypto space.

You can focus on DEX only arbs, CEX only arbs, and also CEX-DEX arbs using this template.

πŸ›  Recent Updates (2023.08.08):

  1. asyncio error: added nest_asyncio
  2. .env error: added some randomly generated sample private keys, addresses for people that want a complete testing environment
  3. requirements.txt: web3, flashbots, websockets often times have conflicting versions. You sometimes need to delete their fields in the requirements.txt file and install them manually
  4. Telegram bot: updated the code so that the bot runs without having to set the Telegram token in .env

Now with these issues resolved, you can easily test this bot out. It is set to debug, and the private keys are set at random, so you don't need to worry! Just run:

import asyncio
import nest_asyncio

from strategies.dex_arb_base import main


if __name__ == '__main__':
    nest_asyncio.apply()
    asyncio.run(main())

This code is in main.py.

python main.py

Check out my blog post describing in detail what this project attempts to do, and how you can use it.

Go to blog πŸ‘‰


⚑️ For readers that want to talk about MEV and any other quant related stuff with people, please join my Discord! There’s currently no one on the Discord server, so it’s not too active yet, but I hope to meet new people there! 🌎πŸͺ

https://discord.com/invite/e6KpjTQP98

whack-a-mole's People

Contributors

solidquant avatar admi-n avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.