A NodeJS application that automatically rewards active users on Monad-Testnet with Testnet $MON.
- Real-time monitoring of Monad-Testnet blocks
- Random selection of active addresses from recent transactions, excluding contract addresses and recently selected wallet addresses
- Automated token distribution to selected addresses
- Configurable time intervals for all operations
- Node.js (
v18or higher) - Private key of a wallet with sufficient Testnet $MON on Monad-Testnet
- Clone the repository
- Install dependencies:
npm install
- Create a
.envfile in the root directory (see.env.examplefor reference) - Adjust the configuration in the
src/config.jsfile to match your requirements
Start the application:
npm startThe application is highly configurable through the src/config.js file:
chainId: 10143,
networkName: "Monad Testnet",
networkShortName: "monad-testnet",
currencyDecimals: 18,
currencyName: "Monad",
currencySymbol: "MON",
rpcUrl: process.env.RPC_URL || "https://testnet-rpc.monad.xyz/",
blockExplorerUrl: "https://testnet.monadexplorer.com/",
gasPrice: 51n * 10n ** 9n, // 51 gwei in wei (fixed gas price)blockFetchInterval: 2, // How often to check for new blocks // Keep this low to avoid hitting rate limits
dropInterval: 10, // How often to drop tokens
transactionProcessingInterval: 1, // How long to wait for transactions to be processed after selection
cacheCleanupInterval: 10, // How often to clean up the cache // Should be less than or equal to dropInterval
logStatusInterval: 60, // How often to log statusesaddressesPerBatch: 50, // How many addresses to drop tokens to per batch
amountPerDrop: 0.1, // How much $MON to drop per address per batch
cooldownBatches: 30, // How many batches to wait before dropping tokens again to the same address // Total time before dropping tokens to the same address is dropInterval * cooldownBatcheslogLevel: "INFO", // Logging level ('TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE')The application follows a modular architecture with distributed processing:
- Time Manager (
timeManager.js): Schedules and manages all timed operations - Block Monitor (
blockMonitor.js): Fetches and buffers new blocks continuously - Address Parser (
addressParser.js): Extracts unique addresses from blocks - Address Selector (
addressSelector.js): Intelligently selects recipients with optimized contract detection - Cache Manager (
cacheManager.js): Maintains separate caches for contracts and wallets with different lifetimes - Token Sender (
tokenSender.js): Handles token distribution with transaction queuing - Batch Manager (
batchManager.js): Tracks distribution cycles - Config (
config.js): Centralizes all configurable parameters - Main (
main.js): Orchestrates the entire process
MonDrop uses several optimizations for efficient operation:
- Distributed Processing: Operations happen at different intervals to spread out the load
- Immediate Contract Detection: Addresses are checked for being contracts as soon as blocks arrive
- Smart Caching: Separate caches for contracts and wallets with optimized lifetimes
- Transaction Queuing: Backpressure handling for token distribution
- Cache-First Selection: Address selection prioritizes using cached data to minimize RPC calls
This project is licensed under the GNU Affero General Public License v3.0 or any later version (AGPL-3.0-or-later).
See the AGPL-3.0 License for full details.
This tool is meant for Testnet use with Monad-Testnet only. Always be cautious with private keys and ensure you're using the correct network settings.