• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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!

More Repositories

1

android-api-graph_flow

Avoid complex flows between fragments/views/whatever
Java
47
star
2

gradle-api-easy_publish

Publish bintray aar/jar multi-module in a duper easy way
Groovy
27
star
3

android-api-loquacious

Loquacious is a localized remote resource manager library for Android
Kotlin
24
star
4

go-pipeline

Build, execute and represent pipelines (aka workflows / templates) in Go
Go
19
star
5

android-api-RxFacebook

Reactive Extension for Facebook SDK
Kotlin
19
star
6

feature-flags

Feature Toggles (aka Feature Flags) in Kotlin
Kotlin
15
star
7

android-view-snapchat-structure

(WIP) Change design for inner one
Java
2
star
8

android-api-resources-on-demand

[DEPRECATED] Reduce the size of APKs by making the resources dynamic and downloading them on demand
Java
2
star
9

ml-reading

Papers and stuff you should definetely read about ML
2
star
10

android-api-events

A common but outstanding event bus (?)
Java
1
star
11

megaman-3

Multiplayer Megaman 3
C++
1
star
12

spark-api-routes

Show all registered spark routes, with their corresponding http method
Java
1
star
13

gradle-transform-api-fusrodah

Toy project to see how the transform API of gradle works
Kotlin
1
star
14

android-api-camera

Custom camera for android in its simplest and fanciest form
Java
1
star
15

impermanent-loss-monitor

Impermanent loss monitor bot to notify myself when an LP loss surpasses a threshold
TypeScript
1
star
16

android-fiuba-taller-II-android_cookbook

Guide for students of taller II subject (fiuba). It explains basics + provides some examples of stuff they might use
Java
1
star
17

classic-nft-ponzi

[PLAYGROUND] Just a playground for the usual NFT ponzi. The purpose is just learning so I highly discourage you to use this code in production
Solidity
1
star
18

fiuba-aninfo-cucumber_tests

Tests in cucumber for ANINFO university subject
Java
1
star
19

ios-arxiv_reader

iOS application for reading CS papers published on arxiv
Swift
1
star
20

ds-protocol-gossip

Gossip protocol implementation in kotlin
Kotlin
1
star
21

fiuba-orga-pc-julia-set

Application to draw julia set based on window bounds and sugars
Assembly
1
star
22

kt-defer

Go's defer statement in Kotlin, because go defers are awesome
Kotlin
1
star