Hi, I'm Pavel Dzidukh

0 %
Pavel Dzidukh
Product Manager
Web3 Developer
  • Country:
    Poland
  • City:
    Warsaw
Languages
  • Russian - Native
  • Belarusian - Native
  • English - B2
  • Spanish - B1

Crypto Sniping Bots

March 23, 2022

Sniping Principles and Sniper Bots

Every project listed on an AMM DEX (Decentralized Exchange with Automated Market Making) is under the threat of several types of bots: snipers and frontrunners. Frontrunning is not exclusively a cryptocurrency phenomenon, and you can learn more about its general principles in traditional trading industry here.

During the initial listing of tokens on an AMM DEX, there are significant price fluctuations in the first few minutes. This presents an opportunity for Sniper Bots (SB) to rapidly pump up the token’s price within a very short time. This strategy is known as sniping. The key moment is to be the first to buy the token in one or more consecutive blocks while the liquidity pool is being created and funded. This sniping strategy is particularly effective for projects that launch their tokens through an Initial DEX Offering (IDO) and list them on a DEX afterward. Traders, believing that the price surge is organic and just beginning, purchase the token at the already pumped-up price and can lose a significant portion of the asset’s value within seconds due to the dump caused by the bots. In most cases, both the traders and the token itself suffer, with the price dropping to extremely low levels.

Another example of market manipulation comes from so-called sandwich bots, which predictively buy just a moment before an uninformed investor increases the price and then sell it at a profit.

Below, you can see a 1-min chart showing the influence of a sniper bot on the price. Initially, there is a massive price surge (>10x), followed by an equally sharp drop.

Next, let’s take a look at the hourly chart to understand that all subsequent price values are not even close to the high price at the time of listing:

Some perceive such token actions with bots as a form of gambling and try to profit by anticipating the bot’s actions before the dump, entering at a price below the high. However, it is impossible to predict when the dump will occur, and it mostly happens within a few minutes.

You can read about the VLaunch case with evidence of losses of $2 million from a sniper bot here.

The sniping process is illustrated in this diagram:

The Sniper Bot’s algorithm scans the mempool and unconfirmed transactions. The search continues until a liquidity addition transaction for the token is found. When the transaction is found and matched, it is pushed within the conditions defined by the SB owner.

Regarding the volumes, SBs can place orders for an amount exceeding the liquidity provided by the DEX at the time of its addition. For example, if a project adds 40 ETH in liquidity, and the bot creates a transaction for 60 ETH, the price will pump to extremely high values.

An example of sniping bot code written in Python, with functionality to scan Uniswap, find new LPs, and create transactions, can be found here.

The most popular sniping bots are distributed as White Label solutions:

For Solana blockchain, some examples include:

  • SolNFTbot – an SB for Floor price NFT, indirectly related to the discussed bots but focused on scanning NFT collection prices.
  • SOLtools.xyz – similar SB for Floor NFT
  • Hummingbot – an open-source solution for creating MM and arbitrage bots, theoretically can be used for writing sniping, sandwich, and frontrun bots.

Anti-Sniping

The main concept of anti-sniping is directly opposite to sniping:

  • Tracking large transactions at the moment of liquidity addition.
  • Preventing price manipulation during the initial stages of token listing on DEX.
  • Banning token transfers for specific addresses used by bots after successful transactions, effectively turning the tokens in those addresses into locked liquidity.
  • If successful snipe bot transactions occur – selling tokens during the pump and buying during the attempted dump to maintain the token’s price and neutralize the impact of snipe bots for more accurate subsequent price discovery of the token.

Anti-sniping solutions have two objectives:

  1. Effective protection against snipe bot interference
    1. Activation time of the mechanism after liquidity addition. It’s important to remember that extended periods of anti-snipe protection are not needed since the market should ultimately regulate the token’s price. The initial minutes after liquidity addition are the most susceptible to price manipulation related to bots, making protection most crucial during this time.
    2. Allowable time between individual transactions. One of the methods for detecting bots is transaction execution speed – specifically, the time between individual buy/sell transactions. Analysis of data from one of the ready-made anti-sniping solutions showed a very accurate threshold for identifying bots and effectively blocking them (this information is not disclosed, and only shared after discussions and agreement on collaboration terms). This threshold can be adapted to specific projects.
    3. Maximum number of tokens available for pool addition as liquidity. Another mechanism related to ensuring the token’s price and preventing artificial influence on the rate is to limit the maximum number of tokens available for purchase on an address. This value is determined as a percentage of the token amount in the liquidity pool during liquidity addition, ensuring that as the token price increases, the amount you buy or sell also increases. The mechanism was designed this way because, with the growth and stabilization of the token’s price, there is less incentive to manipulate its price.
  2. Designing and configuring the anti-sniping protection in a way that does not complicate the experience for other users engaging in standard token trading.

Below is a 1-min chart of a project where anti-sniping was applied. The price movement in the beginning is smoother compared to the project chart where snipe bots entered, but later, it starts to accelerate; however, the growth does not exceed 50% in a minute candle.

Ready-made Solutions for Anti-Sniping

  • 111pg: There are two tariff options:
    1. 10 ETHLiquidity protectionAssistance at all stages of liquidity addition
    2. 20 ETHLiquidity protectionAssistance at all stages of liquidity additionCross-promotion among the community of the DeXe ecosystem (over 150,000 subscribers)Unique 111PG farming program
    Cases:
    1. RealFevr
    2. 5 other cases in one article
  • Synapse Network
  • There was also Worminator, but it has unfortunately ceased to exist; the website is offline, and the offer is no longer available.

Conclusion

Snipe bots are a significant problem for projects launched on ETH and L2, but on other blockchains, such activity is considerably lower, to the extent that there are no observed open and available snipe bots for everyone. Therefore, the conclusion is that if snipe bots are present on NEAR, they are likely to be custom-made bots, which not all market participants can create, especially the typical IDO community.

All the anti-sniping proposals mentioned above are valid for ETH and its L2 solutions. All available open-source and White Label solutions are primarily written in Solidity. Therefore, deploying an anti-snipe solution for our token quickly is not feasible, and at this stage, the only option available is to independently develop bots whose functionality can prevent price manipulation during the token listing and liquidity addition on DEX.

It is recommended to re-check all available solutions a month before IDO, as the list of supported blockchains might expand, and we may be able to utilize a ready-made solution.

Posted in DeFi, Research