Skip to content

Commit

Permalink
built
Browse files Browse the repository at this point in the history
  • Loading branch information
bambi-bf committed Nov 5, 2024
1 parent ae6fea2 commit 6d78468
Show file tree
Hide file tree
Showing 29 changed files with 3,664 additions and 1,792 deletions.
48 changes: 30 additions & 18 deletions .env.copy
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,40 @@ PRIVATE_KEY=
RPC_ENDPOINT=
RPC_WEBSOCKET_ENDPOINT=


####### BUY SETTING #######
IS_RANDOM=
BUY_AMOUNT=
BUY_UPPER_AMOUNT=
BUY_LOWER_AMOUNT=
BUY_INTERVAL=
BUY_DURATION=

#### BUY BY POOL SITUATION ####
PRICE_MODE=
START_BUYING_WHEN_PRICE_DROPS=
STOP_WHEN_PRICE_RAISES=
PRICE_CHECK_INTERVAL=500
PRICE_CHECK_DURATION=30000
IS_RANDOM=true
DISTRIBUTION_AMOUNT=0.01
BUY_AMOUNT=0.01
BUY_UPPER_AMOUNT=0.002
BUY_LOWER_AMOUNT=0.001

BUY_INTERVAL_MAX=2000
BUY_INTERVAL_MIN=4000

CHECK_BAL_INTERVAL=3000
DISTRIBUTE_WALLET_NUM=8

SWAP_ROUTING=true

###### FOR MASSIVE BUY #####
WALLET_NUM=8

########## FOR SELL MODE ##########
SELL_ALL_BY_TIMES=20 # how many time it will take to sell all tokens in subwallets through small buy and sell
SELL_PERCENT=100 # how many percent of token in main wallet will be sold gradually

#### TOKEN PAIR SETTING ####
TOKEN_MINT=
#TOKEN_MINT=tgw7RiFwLUsM9dHNGj2mdAZjuivdsk8FH9RESxFX8LX
TOKEN_MINT=6VbEGuqwhjdgV9NxhMhvRkrFqXVNk53CvD7hK3C3yQS9
POOL_ID=null

###### JITO SETTING ######
BLOCKENGINE_URL=tokyo.mainnet.block-engine.jito.wtf
JITO_MODE=true
JITO_FEE=1600000
TX_FEE=10
ADDITIONAL_FEE=0.006 # should be larger than 0.006SOL
JITO_KEY=
JITO_FEE=120000
BLOCKENGINE_URL=ny.mainnet.block-engine.jito.wtf


###### GENERAL SETTING ######
LOG_LEVEL=info
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,5 @@ pnpm-lock.yaml

# Visual Studio Code
*.code-workspace

data.json
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 FlexiWay

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Solana Volume Bot on Raydium and Meteora

This bot is designed to automate the distribution of SOL to multiple wallets and execute endless buy and sell swap transactions simultaneously on the Raydium platform. It leverages Solana's blockchain technology to perform these operations efficiently.

## Features

- **Automated SOL Distribution**: Distributes SOL to new wallets.
- **Endless Buy and Sell Swaps**: Performs simultaneous buy and sell transactions.
- **Configurable Parameters**: Allows customization of buy amounts, intervals, distribution settings, and more.
- **Massive Buy Mode**: Enables the configuration of multiple wallets for large-scale buy operations.
- **Sell Mode**: Gradually sells all tokens in sub-wallets through small transactions.
- **Token Pair Settings**: Configurable token mint and pool ID for swap operations.
- **Logging**: Supports adjustable logging levels for better monitoring and debugging.

## Environment Variables

The bot uses the following environment variables, which should be defined in a `.env` file:

```env
PRIVATE_KEY= # Private key for the main wallet
RPC_ENDPOINT= # RPC endpoint for Solana
RPC_WEBSOCKET_ENDPOINT= # RPC WebSocket endpoint for Solana
####### BUY SETTING #######
IS_RANDOM=true # Enable random buy amounts
DISTRIBUTION_AMOUNT=0.01 # Amount of SOL to distribute to each wallet
BUY_AMOUNT=0.01 # Fixed buy amount
BUY_UPPER_AMOUNT=0.002 # Upper limit for random buy amount
BUY_LOWER_AMOUNT=0.001 # Lower limit for random buy amount
BUY_INTERVAL_MAX=2000 # Maximum interval between buys in milliseconds
BUY_INTERVAL_MIN=4000 # Minimum interval between buys in milliseconds
CHECK_BAL_INTERVAL=3000 # Interval to check wallet balances in milliseconds
DISTRIBUTE_WALLET_NUM=8 # Number of wallets to distribute SOL to
SWAP_ROUTING=true # Enable swap routing
###### FOR MASSIVE BUY #####
WALLET_NUM=8 # Number of wallets for massive buy operations
########## FOR SELL MODE ##########
SELL_ALL_BY_TIMES=20 # Number of times to sell all tokens in sub-wallets gradually
SELL_PERCENT=100 # Percentage of tokens to sell from the main wallet
#### TOKEN PAIR SETTING ####
TOKEN_MINT=6VbEGuqwhjdgV9NxhMhvRkrFqXVNk53CvD7hK3C3yQS9 # Token mint address
POOL_ID=null # Pool ID for the token pair
TX_FEE=10 # Transaction fee
ADDITIONAL_FEE=0.006 # Additional fee (should be larger than 0.006 SOL)
JITO_KEY= # Jito key
JITO_FEE=120000 # Jito fee
BLOCKENGINE_URL=ny.mainnet.block-engine.jito.wtf # Block engine URL
###### GENERAL SETTING ######
LOG_LEVEL=info # Logging level (info, debug, error)
```

## Usage
1. Clone the repository
```
git clone https://github.com/poseisol/raydium-volume-bot
cd raydium-volume-bot
```
2. Install dependencies
```
npm install
```
3. Configure the environment variables

Rename the .env.copy file to .env and set RPC and WSS, main keypair's secret key, and jito auth keypair.

4. Run the bot

```
npm start
```

## Contact

### Please fork to use it and follow me on github.

### If you want more customized app, please contact [@dave](https://t.me/davevasu) in Telegram and [!Myrade](https://discordapp.com/users/197424152603394049) in Discord
27 changes: 18 additions & 9 deletions constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,33 @@ export const RPC_ENDPOINT = retrieveEnvVariable('RPC_ENDPOINT', logger)
export const RPC_WEBSOCKET_ENDPOINT = retrieveEnvVariable('RPC_WEBSOCKET_ENDPOINT', logger)

export const IS_RANDOM = retrieveEnvVariable('IS_RANDOM', logger) === 'true'
export const SWAP_ROUTING = retrieveEnvVariable('SWAP_ROUTING', logger) === 'true'
export const DISTRIBUTION_AMOUNT = Number(retrieveEnvVariable('DISTRIBUTION_AMOUNT', logger))
export const BUY_AMOUNT = Number(retrieveEnvVariable('BUY_AMOUNT', logger))
export const BUY_UPPER_AMOUNT = Number(retrieveEnvVariable('BUY_UPPER_AMOUNT', logger))
export const BUY_LOWER_AMOUNT = Number(retrieveEnvVariable('BUY_LOWER_AMOUNT', logger))
export const BUY_INTERVAL = Number(retrieveEnvVariable('BUY_INTERVAL', logger))
// export const BUY_DURATION = Number(retrieveEnvVariable('BUY_DURATION', logger))

// export const PRICE_MODE = retrieveEnvVariable('PRICE_MODE', logger) === 'true'
// export const START_BUYING_WHEN_PRICE_DROPS = Number(retrieveEnvVariable('START_BUYING_WHEN_PRICE_DROPS', logger))
// export const STOP_WHEN_PRICE_RAISES = Number(retrieveEnvVariable('STOP_WHEN_PRICE_RAISES', logger))
// export const PRICE_CHECK_INTERVAL = Number(retrieveEnvVariable('PRICE_CHECK_INTERVAL', logger))
export const BUY_INTERVAL_MIN = Number(retrieveEnvVariable('BUY_INTERVAL_MIN', logger))
export const BUY_INTERVAL_MAX = Number(retrieveEnvVariable('BUY_INTERVAL_MAX', logger))

export const SELL_ALL_BY_TIMES = Number(retrieveEnvVariable('SELL_ALL_BY_TIMES', logger))
export const SELL_PERCENT = Number(retrieveEnvVariable('SELL_PERCENT', logger))

export const DISTRIBUTE_WALLET_NUM = Number(retrieveEnvVariable('DISTRIBUTE_WALLET_NUM', logger))
export const CHECK_BAL_INTERVAL = Number(retrieveEnvVariable('CHECK_BAL_INTERVAL', logger))

export const WALLET_NUM = Number(retrieveEnvVariable('WALLET_NUM', logger))

export const TX_FEE = Number(retrieveEnvVariable('TX_FEE', logger))

export const TOKEN_MINT = retrieveEnvVariable('TOKEN_MINT', logger)
export const POOL_ID = retrieveEnvVariable('POOL_ID', logger)

export const LOG_LEVEL = retrieveEnvVariable('LOG_LEVEL', logger)

export const ADDITIONAL_FEE = Number(retrieveEnvVariable('ADDITIONAL_FEE', logger))
export const JITO_KEY = retrieveEnvVariable('JITO_KEY', logger)
export const BLOCKENGINE_URL = retrieveEnvVariable('BLOCKENGINE_URL', logger)
// export const JITO_MODE = retrieveEnvVariable('JITO_MODE', logger) === 'true'
export const JITO_FEE = Number(retrieveEnvVariable('JITO_FEE', logger))
export const JITO_AUTH_KEYPAIR = retrieveEnvVariable('JITO_KEY', logger)

export const LOG_LEVEL = retrieveEnvVariable('LOG_LEVEL', logger)

Loading

0 comments on commit 6d78468

Please sign in to comment.