EVM Liquidity Sniper Bot consuming GETH txs through the mempool

AX-50 Liquidity Sniper

This bot requires you to run the GETH client + use ethers framework.

Supports any EVM environment and UniSwapV2 forked AMM seemlessly.

This is heavily based on https://github.com/Supercycled/cake_sniper, so major thanks to him.

Use at you own risk.

What is this

AX-50 is a frontrunning bot primarily aimed at liquidity sniping on AMMs like PancakeSwap. Even though this repository serves as a liquidity sniper, it's architecture is flexible enough to allow any type of frontrunning operation to be built on top of it (eg. liquidations, sandwich attacks, etc).

Being able to frontrun implies building over GETH client and having access to the mempool. It's HIGHLY RECOMMENDED to have your own node for liquidity sniping (and pretty much any frontrunning operation). If you don't have access to a node of your own the bot still supports a less performant mode of sniping.

The bot is divided in 2 sections:

  1. Configurations: An initial phase (previous to the actual snipe) where we configure the environment:
    • A trigger contract which is setted up with the configuration of the token you want to snipe (token address, route of swap, amount, wallet address that receives, etc). This trigger will be the one in charge of buying the tokens thus performing the snipe, when the time comes.
    • A swarm of accounts/wallets that will clogg the mempool once the liquidity is added, executing the snipe through the trigger. This swarm of accounts is useful because we will be racing against other bots trying to frontrun the liquidity addition. So the more accounts trying the better the odds. Ideally one of all the accounts will succesfully snipe while the others will fail/revert (without doing nothing, except wasting gas).
  2. Sniping: Consists on a stimulus phase where we listen to a stimulus of a liquidity addition. Once we spot it we clogg the mempool with our own txs executing the trigger that will perform the snipe (one tx per account in the swarm). All txs have the same gas as the liquidity addition tx, so the mempool sets them (ideally) at the same priority as the add liq tx. addition, hence frontrunning others. Sniping can be performed in 2 modes: PendingTxs or Block. Each one offers vastly different results at the cost of resources.
    • PendingTxs: The most performant and profitable mode, but by far the most resource intensive. This mode observes pending txs arriving to the mempool whilst looking for the liquidity addition we expect.
    • Block: Far less performant mode but with way lower requirements. This mode observes newly mined blocks as they are added to the head of the blockchain and scans the txs in it, looking for the liquidity addition we expect.

Setup

  1. Create a config/local.json file following the template and samples provided inside the directory (config/*.local.json). This will be used by our scripts in the configuration and sniping phase. (you won't have yet the trigger address, this comes later)

  2. Deploy all contracts using the truffle migrations (create an .env file with BINANCE_MAINNET_WALLET_PRIVATE_KEY or BINANCE_MAINNET_WALLET_MNEMONIC). Contract deployment uses variables provided in config/local.json (eg. the factory ones) so make sure to have it properly configured beforehand. Running them should configure:

    • The trigger custom router address with your CustomRouter
    • The trigger admin with the deployer wallet (this is important)
    • Trigger and Router addresses (factory, native wrapped coin, factory creationCode hash)
  3. Set the trigger address generated by the contract deployment in your config/local.json.

  4. If you don't have a swarm yet, create one running npm run create-swarm. This should create a config/bee_book.json similar to the template one (config/template.bee_book.json) to be used by the sniper on each snipe

  5. [Optional] Preview the order you will create and snipe with npm run order-preview, to avoid undesired results.

  6. Configure the trigger contract with the provided order running npm run configure-trigger

  7. [Optional] If you want to recover the spread bnb in the swarm or rollback the trigger configuration (recovering the bnb supplied), run npm run swarm-refund / npm run withdraw-trigger. Else leave it there for future snipes.

In future snipes, you can avoid most of the steps and just run step 1 & 6, simply configuring the trigger for a new snipe.

Usage

If you have already configured the trigger contract, simply leave the client running with go run ./.... Once the liquidity is added it should snipe it transparently.

And that's it! the bot should be working without hassles! The bot is currently defined to work with any EVM and UniSwapV2 forked AMM.

Donations

If you found the bot useful and you want to share some of those juicy profits with me, I accept donations through BEP20 (BSC) at 0x8f5d3374373aDA8b2c201C5cAc4c384FD42d2390 in any type of token (hopefully one with liquidity hehe)

Cheers and happy sniping!

Similar Resources

Feline-bot - Feline Bot for Discord using Golang

Feline Bot for Discord Development This bot is implemented using Golang. Feature

Feb 10, 2022

The serverless OTP telegram service use telegram as OTP service, and send OTP through webhook

Setup OTP First thing, you need prepare API(webhook) with POST method, the payload format as below { "first_name": "Nolan", "last_name": "Nguyen",

Jul 24, 2022

This utility allows you to execute Minecraft server commands through the RCON protocol via Telegram chat.

Minecraft RCON by Telegram This utility allows you to execute Minecraft server commands through the RCON protocol via Telegram chat. FAQ When you run

Jul 24, 2022

A Discord bot for managing ephemeral roles based upon voice channel member presence.

A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles A Discord bot for managing ephemeral roles based upon voice channel member presence. Quickstart Click on the Ephemeral Roles logo head

Dec 19, 2022

IRC, Slack, Telegram and RocketChat bot written in go

IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022

Simple yet customizable bot framework written in Go.

Simple yet customizable bot framework written in Go.

Introduction Sarah is a general-purpose bot framework named after the author's firstborn daughter. This comes with a unique feature called "stateful c

Dec 12, 2022

Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022

A golang implementation of a console-based trading bot for cryptocurrency exchanges

A golang implementation of a console-based trading bot for cryptocurrency exchanges

Golang Crypto Trading Bot A golang implementation of a console-based trading bot for cryptocurrency exchanges. Usage Download a release or directly bu

Dec 30, 2022

VK bot package for Go

Go VK bot package This is simple VK.com bot API. At 2019-03-01 VK was restrict messages.send for user_tokens. This bot can work with group_token, and

Sep 26, 2022
Comments
  • Bump github.com/ethereum/go-ethereum from 1.10.5 to 1.10.8

    Bump github.com/ethereum/go-ethereum from 1.10.5 to 1.10.8

    Bumps github.com/ethereum/go-ethereum from 1.10.5 to 1.10.8.

    Release notes

    Sourced from github.com/ethereum/go-ethereum's releases.

    Hades Gamma (v1.10.8)

    Geth v1.10.8 is a pre-announced hotfix release to patch a vulnerability in the EVM (CVE-2021-39137).

    The exact attack vector will be provided at a later date to give node operators and dependent downstream projects time to update their nodes and software. All Geth versions supporting the London hard fork are vulnerable (the bug is older than London), so all users should update.

    Credits for the discovery go to @​guidovranken (working for Sentnl during an audit of the Telos EVM) and reported via [email protected].

    Beside the fix, we're merged in a few tiny polishes and fixes. For a rundown, please consult the Geth 1.10.8 release milestone.


    As with all our previous releases, you can find the:

    Styx Theta (v1.10.7)

    Geth v1.10.7 is a maintenance release, mostly focusing on a few post-London polishes.

    A few important notes to keep in mind:

    • The return type for oldestBlock in eth_feeHistory was changed from decimal to hex. This is to conform to the updated spec that was released after Geth's London hard-fork release was already made. The input blockCount parameter was also updated, but there Geth will accept both hex and decimal to keep backward compatibility.
    • The -miner.gastarget CLI flag was deprecated and is a noop. This flag is already a noop for networks running the London hard-fork, since it London miners only take into account the -miner.gaslimit flag. For non-London private networks and Geth forks, this might result in a gas bump depending on how the miners are configured.
    • Docker builds were changed from DockerHub Automated Builds to offsite builds and manual pushes to DockerHub. At the same time, we've added support for multi-arch images, the original tags being the metadata image, linking a -amd64 and a -arm64 tags together. No changes are needed for docker users, but keep us posted if something strange happens. On the upside, Geth now has official arm64 docker images too.

    Changes made:

    • Change the oldestBlock return type in eth_feeHistory to hex, accept both decimal and hex as the block count (#23239, #23363).
    • Cap max usable gas in eth_estimateGas better for 1559 transactions (#23309).
    • When deploying multiple contracts via abigen, only parse the ABI once (#22583).
    • Return maxFeePerGas for the gasPrice of pending transactions (#23345).
    • Check cached blocks too when attempting to retrieve a header (#23299).
    • Reject transactions imitated from non EOA accounts (#23303).
    • Reduce allocations a bit while CPU mining ethash (#23199).
    • Deprecate the -miner.gastarget CLI flag (#23213).
    • Switch over to manual docker pushes (#23373).

    Bugs fixed:

    • Fix a nil pointer panic for certain abigen generated code due to missing context initialization (#23188).
    • Fix nil pointer panic in certain automatic access list generation RPC API calls (#23225).
    • Fix a regression that prevented clef from signing a legacy transaction (#23274).
    • Fix a permission error during snapshot based pruning on Windows (#23370).
    • Fix the marshaling of errors from the tracers (#23292).

    For a full rundown of the changes please consult the Geth 1.10.7 release milestone.


    ... (truncated)

    Commits
    • 2667545 params: release Geth v1.10.8
    • 1d99573 core/vm: faster code analysis (#23381)
    • f38abc5 eth/gasprice: feeHistory improvements (#23422)
    • dfeb2f7 go.mod: upgrade golang.org/x/sys for go1.17 support (#23406)
    • bb1f7eb signer/core/apitypes: remove dependency on internal/ethapi (#23362)
    • d02c605 core: only check sendernoeoa in non fake mode (#23424)
    • c368f72 Revert "eth: drop eth/65, the last non-reqid protocol version" (#23426)
    • 5566e5d eth/downloader: fix typo in comment (#23413)
    • 57feabe eth, internal/ethapi: make RPC block miner field show block sealer correctly ...
    • 16ecdd5 cmd/utils: add --nousb to the list of deprecated flags (#23388)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

Discord Nitro sniper Written in Golang
Discord Nitro sniper Written in Golang

Discord Nitro sniper Written in GO lang ?? Wow this looks like Slows Sniper Maybe the same src ?? Features Multiple accounts support to claim on one m

Jan 10, 2022
Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Sep 9, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

Dec 16, 2021
Dlercloud-telegram-bot - A Telegram bot for managing your Dler Cloud account

Dler Cloud Telegram Bot A Telegram bot for managing your Dler Cloud account. Usa

Dec 30, 2021
Quote-bot - Un bot utilisant l'API Twitter pour tweeter une citation par jour sur la programmation et les mathématiques.

Description Ceci est un simple bot programmé en Golang qui tweet une citation sur la programmation tout les jours. Ce bot est host sur le compte Twitt

Jan 1, 2022
Discord-bot - A Discord bot with golang

JS discord bots Install Clone repo git clone https://github.com/fu-js/discord-bo

Aug 2, 2022
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
Slack-emoji-bot - This Slack bot will post the newly created custom Slack emojis to the channel of your choice

Slack Emoji Bot This Slack bot will post the newly created custom Slack emojis t

Oct 21, 2022
Sex-bot - The sex bot and its uncreative responses
Sex-bot - The sex bot and its uncreative responses

Sex Bot The sex bot, made with golang! The sex bot can't hear the word "sexo" he

Nov 11, 2022