This document provides instructions for the DLMM Liquidity Bot known as Meteor Shower, an open-source tool designed to automate the process of providing liquidity on the Meteora platform. Specifically, this bot helps users automatically re-center their positions in Meteora's Dynamic Liquidity Market Maker (DLMM) pools. By monitoring the active price bin, the bot can close and reopen a liquidity position to keep it centered, aiming to optimize fee capture and manage position effectiveness.
This tool is intended for users who have a solid understanding of decentralized finance (DeFi), liquidity pools, and the inherent risks involved. Please read the following disclaimers carefully before proceeding.
No Financial Advice The information and tools provided in this guide are for informational purposes only and do not constitute financial, investment, or trading advice. You should not construe any such information or other material as legal, tax, investment, financial, or other advice. The use of this bot is at your sole discretion and risk.
Risk of Financial Loss Providing liquidity in a DLMM, like any other automated market maker, carries significant financial risks. These risks include, but are not limited to, impermanent loss, price volatility, and potential loss of your entire deposited capital. The automated nature of this bot does not eliminate these risks and may, in some market conditions, amplify them.
Open-Source Software This is an open-source software provided on an "as is" basis, without warranties or representations of any kind, express or implied. The developers and contributors of this software are not liable for any bugs, errors, or vulnerabilities in the code. You are responsible for reviewing and understanding the code before you use it.
Smart Contract Risk The bot interacts with the smart contracts of the Meteora platform and may use other third-party protocols like Jupiter for token swaps. Smart contracts can have vulnerabilities or behave in unexpected ways, which could lead to a partial or total loss of your funds.
No Guarantee of Performance There is no guarantee that this bot will perform as expected or that it will be profitable. Market conditions can change rapidly, and the bot's re-centering strategy may not be effective in all scenarios. Past performance is not indicative of future results.
By choosing to use the DLMM Liquidity Bot, you acknowledge that you have read, understood, and accepted these risks. You agree that the developers and contributors of this software will not be held liable for any losses or damages that may arise from its use.
This guide explains how to set up and run the DLMM liquidity bot for Meteora on Solana.
Follow these simple steps to download code from GitHub and access it via the Command Line Interface (CLI).
- Visit the GitHub repository at this link: https://github.com/DitherAI/MeteorShower/tree/main
- Click on the green
<> Codebutton on the right side of the page. - Select
Download ZIP. Your download will start automatically.
- Navigate to your computer's
Downloadsfolder (or wherever the file was downloaded). - Locate the file named
MeteorShower-main.zip. - Right-click the ZIP file and select
Extract All. - Choose a location to extract the files (the default is typically fine).
- Click
Extract.
- Open your Command Line Interface (CLI):
- Windows: Search for
Command Promptin your Start Menu. - MacOS: Search for and open
Terminalusing Spotlight Search (Cmd + Space). - Linux: Open the
Terminalapplication from your applications menu.
- Windows: Search for
- Navigate to the directory:
- Replace
<your-username>with your actual username. - On Windows:
cd C:\Users\<your-username>\Downloads\MeteorShower-main
- On MacOS or Linux:
cd ~/Downloads/MeteorShower-main
- Replace
- Check if you're in the right place:
This command should list files like
ls
README.mdand other files from the repository.
You're now ready to use or explore the code!
Ensure Node.js is installed on your system. If you are unfamiliar, Node is how you will run the javascript code.
-
Download: Node.js Official Website
-
Check Installation: Run the following commands in your terminal:
node -v npm -v
If both commands return version numbers, Node.js is installed successfully.
We have the required libraries defined in our packages.json. Run the following command in your terminal to install these required packages:
npm installCreate a file named .env in your project directory. We will create this file by running the following script in our command line:
node configure.js runBelow we go through each item during setup. Input your known values or use the defaults. You can also edit the .env file directly after we create it during configuration.
This reference explains every value in .env.example, what it controls, and how to pick a setting. Comments that start with # are ignored by the bot—they are just notes for you.
RPC_URL- Full HTTPS endpoint for a Solana RPC node. Use the URL (including any API key query-string) given by Helius, Triton, QuickNode, or your own validator. Without a reliable RPC, the bot cannot send transactions.
- If you do not have an RPC provider then we recommend Helius - https://www.helius.dev/ which has a free tier which is more than capable of supporting this bot.
WALLET_PATH- Absolute path (or
~/…) to the JSON key-pair created bysolana-keygen new. If you did not have a wallet created before usingconfigure.jsthen leave this blank. If you leave this blank,configure.jswill generate a new wallet and fill the path for you. Back up this file—whoever has it controls your funds.
- Absolute path (or
# WALLET_ADDRESS=…- This comment is added automatically by
configure.jsafter it knows your public key. It is informational only. This is the wallet address which you will need to transfer your funds before you run the bot.
- This comment is added automatically by
POOL_ADDRESS- Address of the Meteora DLMM liquidity-bin pair you intend to provide liquidity to—not the LP token mint. Copy it from the Meteora UI or a block explorer. You must use a SOL pool pair. Underlined is the pool address from a Meteora URL:
https://app.meteora.ag/dlmm/<u>6wJ7W3oHj7ex6MVFp2o26NSof3aey7U8Brs8E371WCXA</u>?referrer=portfolio
TOTAL_BINS_SPAN- Total number of bins that your position will cover, counting both sides of the active price. A wider span reduces recenter frequency but spreads your capital thin; a narrow span concentrates fees but requires more rebalancing. Meteora uses 69 as a default.
LOWER_COEF- Fraction of those bins allocated below the active price. For symmetrical exposure use
0.5. A lower number biases more bins above price; a higher number places more below.
- Fraction of those bins allocated below the active price. For symmetrical exposure use
LIQUIDITY_STRATEGY_TYPE- Preset that shapes how liquidity is distributed inside your span.
Spot,Curve, orBidAskdistribute liquidity differently. Choose one recognised by the version of Meteora you are running. - Here is a quick overview: https://docs.meteora.ag/overview/products/dlmm/1-what-is-dlmm#liquidity-shapes
- Preset that shapes how liquidity is distributed inside your span.
PRIORITY_FEE_MICRO_LAMPORTS- Extra compute-unit fee expressed in micro-lamports. Higher numbers buy faster confirmations. Around
50000corresponds to the "very high" preset on main-net.
- Extra compute-unit fee expressed in micro-lamports. Higher numbers buy faster confirmations. Around
SOL_FEE_BUFFER_LAMPORTS- Amount of SOL (in lamports) the bot will reserve for future rent and fees. Default is
70000000(0.07 SOL). The bot refuses to drop below this balance. This is to cover the refundable pool rent and to cover transaction costs after capital is allocated.
- Amount of SOL (in lamports) the bot will reserve for future rent and fees. Default is
PRICE_IMPACT- Maximum allowed price impact when Jupiter performs swaps to balance your tokens.
0.1means 0.10 %.
- Maximum allowed price impact when Jupiter performs swaps to balance your tokens.
SLIPPAGE- Slippage tolerance, expressed in basis points.
10equals 0.1 %.
- Slippage tolerance, expressed in basis points.
MONITOR_INTERVAL_SECONDS- How often, in seconds, the bot checks price drift and position health.
CENTER_DISTANCE_THRESHOLD- When price moves this far from the centre of your span, the bot closes and reopens the position. The value is expressed as a fraction of half-span.
0.45means 45 % of half-width. In a 20 bin pool, the bot will recenter when the pool is on the final bin before ‘out of range’.
- When price moves this far from the centre of your span, the bot closes and reopens the position. The value is expressed as a fraction of half-span.
MANUALtrueinstructs the bot to use your fixedTOTAL_BINS_SPAN.falsemakes it query an external API for an adaptive span.
DITHER_ALPHA_API- URL of the service that returns historical volatility metrics. Used only when
MANUAL=false.
- URL of the service that returns historical volatility metrics. Used only when
LOOKBACK- Number of days of historical data the bot requests when calculating an adaptive span.
LOG_LEVEL- Controls how much information the bot prints. Accepted values:
fatal,error,warn,info,debug,trace. Usedebugif you are troubleshooting.
- Controls how much information the bot prints. Accepted values:
Copy this block into a new file named .env, then replace the highlighted bits:
RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY_HERE
WALLET_PATH=~/id.json
POOL_ADDRESS=PASTE_YOUR_POOL_ADDRESS
TOTAL_BINS_SPAN=40
LOWER_COEF=0.5
LIQUIDITY_STRATEGY_TYPE=Spot
PRIORITY_FEE_MICRO_LAMPORTS=50000
SOL_FEE_BUFFER_LAMPORTS=70000000
PRICE_IMPACT=0.1
SLIPPAGE=10
MONITOR_INTERVAL_SECONDS=30
CENTER_DISTANCE_THRESHOLD=0.45
MANUAL=true
DITHER_ALPHA_API=http://0.0.0.0:8000/metrics
LOOKBACK=30
LOG_LEVEL=infoOnce the file is saved, you can start the bot with node cli.js run. Good luck!
-
Run the bot with default settings:
node cli.js run
-
Run the bot with a custom monitoring interval (e.g., every 30 seconds):
node cli.js run --interval 30
- Opens Liquidity Positions: Creates a DLMM liquidity position centered around the current active bin.
- Balances Tokens: Automatically uses Jupiter to balance your token holdings to optimal ratios.
- Continuous Monitoring: Tracks your position value and performance in real-time.
- Automatic Rebalancing: Closes and reopens positions when the active price moves too far from your liquidity center.
- A Solana wallet containing the tokens for your target pool.
- Some SOL for transaction fees (the bot reserves 0.07 SOL as a fee buffer).
- Your wallet file must be a JSON array containing private key bytes.
- Maintains a buffer of SOL to ensure transactions complete.
- Implements retry logic for failed transactions.
- Validates token balances before performing actions.
- Uses slippage protection when swapping tokens.
- Press
Ctrl+Cat any time to stop the bot.
To enable manual control, update your .env file:
MANUAL=true
TOTAL_BINS_SPAN=15 # Sets a fixed bin span width
LOWER_COEF=0.5 # 50% bins below, 50% above the active price
CENTER_DISTANCE_THRESHOLD=0.45 # Rebalances at 45% drift- Manage your position size and span directly.
- API optimization isn't available to you.
- Implementing your own liquidity management strategies.
- Optimal range based on dynamic volatility.
- Adaptive positioning based on current market conditions.