fourmm
v0.1.0
Published
fourMM — agent-first CLI for Four.meme market making on BSC
Downloads
113
Maintainers
Readme
fourMM — Four.meme Market Maker
Agent-first CLI for Four.meme market making on BSC.
What it does
fourMM is a command-line tool for running market-making strategies on Four.meme tokens on BNB Smart Chain, designed to be driven by AI agents (Claude Code, MCP clients) or used directly.
Key Features
- Flashbot Bundle Execution — Pump/dump commands sign all wallets' txs offline and submit via
eth_sendBundle(BlockRazor), atomically executing in the same block. No MEV, no sandwich. - Atomic Router Contract — A Solidity router on BSC does
buy + sell round-tripin a single tx (volume()),buy for another wallet(turnover()), andPancakeSwap round-trip(volumePancake()). - Bonding Curve + PancakeSwap Auto-Routing — Every trade command detects whether the token has graduated and routes through the correct contract. Your volume bot doesn't break at graduation.
- Token Creation — Full Four.meme REST API integration: auth, image upload, token registration, on-chain
createToken, optional dev-buy. - Refuses TaxToken / X Mode — Because the round-trip math doesn't work. fourMM knows what real market making means.
Install
pnpm install
pnpm buildRequires Node.js >= 22.
Quick Start
# Initialize config (BlockRazor MEV-protected RPC by default)
fourmm config init
# Create wallet group with 5 wallets
fourmm wallet create-group --name snipers --count 5
# Fund wallets from your main wallet
fourmm transfer out --from 0xYourWallet --to-group 1 --value 0.01
# Create a token on Four.meme
fourmm token create --name "My Token" --symbol "MTK" --image logo.png --dev-wallet 1
# Buy
fourmm trade buy --group 1 --token 0x...4444 --amount 0.01
# Sell all
fourmm trade sell --group 1 --token 0x...4444 --amount all
# Pump price (Flashbot bundle, all wallets buy atomically each round)
fourmm tools robot-price --group 1 --token 0x...4444 --direction up --target-price 0.00001 --amount 0.01
# Dump price
fourmm tools robot-price --group 1 --token 0x...4444 --direction down --target-price 0.000001 --amount 0.01
# Generate volume (atomic buy+sell per wallet, zero net position)
fourmm tools volume --group 1 --token 0x...4444 --amount 0.01 --rounds 10
# Check PnL
fourmm query monitor --group 1 --token 0x...4444Agent Integration
# Option 1: Install skills globally (any agent can discover them)
pnpm install && pnpm build
npx fourmm skills add
# Option 2: MCP server (Claude Desktop / Cursor / etc.)
npx fourmm --mcpSkills are in the skills/ directory. The top-level skills/SKILL.md is a routing table that maps user intents to commands. Sub-skills (skills/fourmm-*/SKILL.md) contain detailed parameter schemas and output types.
Commands (34)
config (3) init, set, get
wallet (11) create-group, generate, list-groups, group-info,
add, import, export, export-group, overview,
delete-group, remove
token (5) create, info, pool, identify, graduate-status
trade (4) buy, sell, sniper, batch
tools (3) volume, turnover, robot-price
transfer (3) in, out, many-to-many
query (5) balance, price, kline, transactions, monitorSee skills/SKILL.md for the full routing guide with all options.
Architecture
┌─────────────────────────────────────────────┐
│ AI Agent (Claude Code / MCP) │
│ reads skills/SKILL.md → picks command │
└──────────────┬──────────────────────────────┘
│
┌──────────────▼──────────────────────────────┐
│ fourmm CLI (incur framework) │
│ 34 commands, TOON/JSON/YAML output │
│ zod schemas for agent-safe I/O │
└──────────────┬──────────────────────────────┘
│
┌──────────┼──────────────┐
│ │ │
┌───▼───┐ ┌───▼────┐ ┌─────▼──────┐
│Bonding│ │Pancake │ │ Flashbot │
│ Curve │ │ Swap │ │ Bundle │
│(V1/V2)│ │(Router)│ │(eth_send │
│ │ │ │ │ Bundle) │
└───┬───┘ └───┬────┘ └─────┬──────┘
│ │ │
┌───▼─────────▼──────────────▼──────┐
│ BSC Mainnet │
│ TokenManager2 PancakeRouter02 │
│ FourmemeMmRouter v2 │
│ (0xd62c...216c) │
└────────────────────────────────────┘On-Chain Contracts
| Contract | Address | Description |
|----------|---------|-------------|
| FourmemeMmRouter v2 | 0xd62c2fd94176f98424af83e4b9a333d454b2216c | Atomic volume/turnover/volumePancake |
| TokenManager2 | 0x5c952063c7fc8610FFDB798152D69F0B9550762b | Four.meme V2 (buy/sell/create) |
| TokenManagerHelper3 | 0xF251F83e40a78868FcfA3FA4599Dad6494E46034 | Unified query interface |
| PancakeSwap V2 Router | 0x10ED43C718714eb63d5aA57B78B54704E256024E | Graduated token trading |
Environment Variables
| Variable | Description |
|----------|-------------|
| FOURMM_PASSWORD | Master password for wallet encryption |
| BSC_RPC_URL | Override primary RPC endpoint |
| BSCSCAN_API_KEY | BSCScan API key |
Tech Stack
- CLI Framework: incur — agent-first with TOON output, CTAs, skills/MCP auto-generation
- EVM Client: viem — TypeScript EVM interactions
- Contracts: Foundry — Solidity development + fork testing
- Encryption: crypto-js AES — wallet-at-rest encryption
- Bundle: BlockRazor
eth_sendBundle— Flashbot-style atomic execution
License
MIT
