Giter Club home page Giter Club logo

pancaketokensniper's Introduction

PancakeSwap Token Sniper

BSC BNB Pancake token sniper The BSC token sniper listens for new blocks on BSC relating to the pancake swap factory contract. The createPair log event is emitted on the pancake swap factory whenever a new liquidity pool is added. The sniper will filter the logs from these blocks to find these createPair events. Then with the correct RUG checks it will buy the token, after a certain amount of profit has been made it will automatically sell the token. The token sniper will also listen to the chain and filter out transactions which call the function addLiquidityETH these events will be sniped and go through the relevent checks.

Donations

This is a free project but any funding is appricated. ETH/BNB: 0x71f74dEbb7fd42E61de32256537284E06DE8812d

Socials

Telegram: https://t.me/PancakeTokenSniper

Prerequisites

  • Net5.0 (Only need this if you are trying to run the code otherwise please see releases it provides binaries)

Config

The Config is listed in appsettings.json There are values which you will have to set yourself, these are denoted with xxx.

Bsc Node and Http Api

Inside the config you will see BscHttpApi and BscNode keys. Both are obtained from https://moralis.io for free. You will have to navigate to Speedy Notes and click endpoints on the Bsc Network. image

Remember BscNode should be WS mainnet Endpoints and BscHttpApi should be Http endpoints image

Bsc Scan API Key

The BSC Scan API key is obtained for free from https://bscscan.com/myapikey

Running the project

If you want to run the project you can go to releases and a binary that will execute on your OS, or install Net5.0 then compile and run the application. You can use dotnet run BscTokenSniper to do this.

Rug Checks

There are specific checks involved that this sniper does when buying tokens. Some config values in appsettings.json inside SniperConfiguration are used to influence the rug checks. You can disable the Rug checks by setting the RugCheckEnabled to false. Be warned this is dangerous.

  1. Minimum % total supply in the liquidty pool. The config relating this value is called MinimumPercentageOfTokenInLiquidityPool. A example of this is if you want the token ZZZ to have atleast 90 percent of its supply inside the liqudity pool you can set this value to 90.
  2. The ability to scan contract source code and exclude buying from contracts when they include a specific string. The config key is called ContractRugCheckStrings
  3. Minimum amount of BNB (This can be changed to any other token by using LiquidityPairAddress) inside liquidity pool. The config key is called MinLiquidityAmount.
  4. Ensures liquidty pair created has one of the LiquidityPairAddress address
  5. If HoneypotCheck is true the sniper will try to buy the HoneypotCheckAmount, then it will try to sell it. If this operation is successful it will buy the SnipeAmount
  6. If RugdocCheckEnabled is true the sniper will use the Rugdoc honeypot checker to check the contract
  7. The WhitelistedTokens can be used to bypass any honeypot and rug checks. This field accepts multiple token addresses
  8. If the CheckRouterAddressInContract is enabled the sniper will check if the contract contains the router address
  9. If the OnlyBuyWhitelist is enabled the contract will only interact with whitelisted tokens

Buying

The amount to snipe is denoted in the config as AmountToSnipe. This value will trade the LiquidityPairAddress in your wallet with the coin to snipe at the current trade price. You can set a delay on the buying buy setting the value BuyDelaySeconds to greater than 0

Selling

The Sniper automatically sells once a certain percentage of profit is made. This is defined in the config key ProfitPercentageMargin

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

TODO

  • Support Uniswap and other liquidity providers
  • Persist bought assets on Postgres
  • Target specific token addresses & detect when locked
  • Check for Renounce ownership

pancaketokensniper's People

Contributors

jayarrowz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pancaketokensniper's Issues

[Feature request] Allow the user inputted values to be random between X & Y values

Current behavior
The config file allows for user configured values such as :
"AmountToSnipe": 0.0005,
"ProfitPercentageMargin": 20,
"SellSlippage": 0.5,
"HoneypotCheckAmount": 0.0000001,

Desired behavior
Allow the user to input a value X and a value Y, the bot will then pick a random amount that is in between X and Y for every contract such as :
"MinAmountToSnipe": 0.0005,
"MaxAmountToSnipe": 0.005,
"MinProfitPercentageMargin": 20,
"MaxProfitPercentageMargin": 25,
"MinSellSlippage": 0.5,
"MaxSellSlippage": 1.5,
"MinHoneypotCheckAmount": 0.0000001,
"MaxHoneypotCheckAmount": 0.0000019,

[Feature Request] Monitor for liquidity add which can initiate re-audit and buy

Background
The bot detects a new token, runs audits and one of those audits is that there isn't enough liquidity which means we can't buy.

If all other audits such as honeypot / rugcheck pass but liquidity fails, it can be a legit token that just hasn't added liquidity yet.

Request
Add a liquidity monitor:

  • If the token passes other audit checks but only fails liquidity, monitor it.
  • If it's a specific contract snipe - include liquidity monitoring
  • When liquidity is added, proceed to run the audit again (if it's random contract) or just buy if it's a specific snipe contract
    This means we can still come back to a new token after liquidity is added

[Feature Request]Allow the audit for source code PCS Router address to be toggled by the user

Background
In
the appsettings.json, the user specifies the "PancakeswapRouterAddress" and "V1PancakeswapRouterAddress".

The bot runs a check on the contract source code to see if the contract mentions the router address and if it's a match or not to what we list out.

This is to prevent some rug pulls that happened at the start of the bot.

Problem
Some valid contracts do not specific the router address in their contract code. Some legit launches do, some legit launches don't.
As such, the bot may be failing valid potential buys

Request
Allow this "Check source code for PCS address" to be set by the user in appsettings.json so the user can enable or disable it.

[Feature Request] Database of historical tokens for risk assessment

This request is to:

  • Add a database or log file that stores every contract that was not bought due to a fail in the audit. whether it is a rugcheck, honeypot fail etc
  • Each time the bot finds a new contract, it compares data against the log file as part of it's audit

Rules

  • Previous contract with same name was rugcheck/honeypot failed?
  • Previous contract owner is the owner of this new found contract?
  • X Y Z (whatever else we deem as good data to check on each contract)

This means the bot is learning from historical data to help with risk assessment of new contracts

[Feature] Ultimate Honeypot tester

  • Ability to run a blank ETH complaint blockchain locally
  • Ability to deploy the token to rug check onto the chain
  • Ability to clone the liquidity pools of the token to rug check
  • Check contract owner if any
  • Find all values in token contract which modify state and execute with random values and check if buy and sell still work
  • Forward time and check if buy and sell still work

This comes with no gas cost as everything is local. Essentially should be quicker then any API calls and should work multichain and most chains have local nodes.

[Feature Request] Buy delay after audit checks passed

It would be nice to have a configurable amount of seconds that will delay the bot in starting the "Buy" after a token passes rugcheck/honeypot check.

ie The bot finds a contract, it passes all the checks, then I want to implement a 10 second delay on purchasing so it doesn't look as much like a bot to the devs

[Feature request] Implement Specific Token Snipe

Background
Sometimes we already know an upcoming contract that will launch and we will want to target this contract as soon as it's available.

Request
Implement an option to select Specific Token Snipe so when selected, the user can:

  1. Enter in the contract address for a specific token
  2. Customize all values such as the snipe amount , audits etc for a specific token (even if it's different than the standard snipe on random contracts
  3. Allow the snipe amount to be a token value rather than a bnb value so we can max buy if we know the token amount
  • for a whitelisted address we want to snipe - we can have custom amounts like this:
    "WhitelistedTokens": [
    "0x0000000000000000000000000000000000000000"
    ],
    "AmountToSnipe": 0.00051,
    "WhitelistedAmountToSnipe": 0.05,

edit: removed 2. Enter in the name (if they don't know the contract address yet the bot will buy all "New" contracts with this name)

Sell error

Hello guys, with SniperService.cs modified by twilker and the •original repo files from JayArrowz the bot now approve but fails same to sell with this error Fail with error 'PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT€'
For sure caused by a low slippage. Is this possible to add the function for modify slippage sell?

Thanks for your work

•Original repo files i mean the latest files provided by JayArrowz

Add a functionality to Blacklist tokens that keeps adding liquidity.

It will be a good idea if you can add a functionality that will blacklist old tokens that kees adding liquidity. Just as we have the whitelist functionality create a similar one for blacklist. With the blacklist functionality once we detect old tokens we can manually add them to the black list so that next time they add liquidity, the bot will ignore it and it will not waste any resources to perform a rug test on it. Remember we pay gas fees each time there is a honeypot test. Thanks

Questions about the algorithm

Hi, first of all thanks for sharing the code, I really appreciate the hard work involved in this project. I had a couple of questions regarding the algorithm since I am trying to make my own sniper but in Python.

I think one of the most critical parts of snipers is clearly the security and how fast you can check whether you are sniping a rug/honeypot or not. In this case, you have very well implemented a function that makes a small transaction to check whether the token is a honeypot, and if you can sell it then you proceed to buy the token as desired. Most of my questions are related to this part, I am interested to know:

  1. How many milliseconds (or seconds) do you lose when you enable that safety check for honeypot?
  2. Have you checked the profitability of the bot with and without the honeypot check? I guess adding the honeypot check sacrifices a bit on profit for more safety, but it is still better than manually doing the transaction on PancakeSwap.
  3. In general, what is your experience on the profitability of this bot? Lets say, out of 100 sniped tokens, do you have any numbers on the amount of profit or loss?

Again, thanks for the code and looking forward hearing from you

Need better/newer rug-check for execution reverted: PancakeLibrary: INSUFFICIENT_INPUT_AMOUNT error

It seems new coins might be taking advantage of this or other bots to (presumably) allow initial rug-checks of small amounts but not any more or higher ones once more people are bought in. Not sure what sort of checks can be done, but perhaps waiting until you can read other sell outputs on the contract or perhaps adding a multi-buy/sell feature to follow the coin up so long as it's rising and sell-able?

[Feature request] Multi wallet buys after pass all audits

This request is to allow wallet 1 + 2 + 3 configured in the json config file.

When a contract is found, only wallet 1 is used for the tests, such as the honeypot buy test.

If all of the checks are passed and the wallet is sniped, proceed to snipe it with each snipe amount allocated to wallet 1 , 2, 3 etc so we can multi buy in one flow without new instances running of the bot.

buy specified token

hi, I know which token I wanna buy, could you adjust so you can snipe that specific token?

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.