A transparent look at how every component in the system connects — from browser to blockchain.
Two layers: the admin stack that users interact with, and isolated bot containers that execute on-chain autonomously.
Each bot runs a continuous asyncio loop. Here is exactly what happens on every iteration.
The bot calls getBalance on its treasury wallet. If balance is below the configured reserve + fee buffer, the cycle is skipped and the bot sleeps.
Spendable = balance − sol_reserve − fee_buffer, then multiplied by the configured buyback_percent. This prevents the wallet from ever running dry.
Requests a quote from Jupiter Aggregator for SOL → TOKEN. Jupiter routes through all Solana DEXes to find the best price with minimal slippage.
GET /swap/v1/quoteJupiter returns a serialized VersionedTransaction. The bot signs it with the treasury keypair (decrypted in-memory, never on disk) and submits via Solana RPC.
Buyback & Burn: calls the SPL Token burn instruction on the received tokens.
Buyback Only: tokens stay in treasury.
Add Liquidity: pairs SOL + tokens into the Raydium or PumpSwap pool.
Stats (SOL spent, tokens burned/bought, cycle count) are written to a JSON file readable by the admin service. A Telegram message with the transaction link is sent if enabled.
json · aiohttp · Telegram Bot APIasyncio.sleep(INTERVAL_SECONDS) — configurable from 60 s to several hours. Near-zero CPU while sleeping.
Private keys are sensitive. Here is every layer of protection applied to keypairs and credentials.
Every treasury and creator wallet is encrypted with AES-256-GCM before being written to the database. The encryption key lives only in the server environment — never stored alongside ciphertext.
All admin API endpoints require a signed JWT token. Tokens are issued on login and expire after 30 days. The signing secret is a configurable environment variable — never hardcoded.
Each bot runs in a dedicated Docker container with its own filesystem, process namespace, and network stack. A crash or compromise in one bot cannot affect any other bot or the admin service.
Every component chosen for reliability, performance, and Solana ecosystem fit.
All buybacks, burns, and liquidity operations are on-chain Solana transactions — finalised in ~400 ms with sub-cent fees.
Routes every swap across all major Solana DEXes for best price. Bots use the lite API for lower latency and no Metis dependency.
Add Liquidity mode deposits into the pool that the token lives on — PumpSwap or Raydium AMM V4, auto-detected at bot startup.
Async Python framework with Pydantic validation. Handles auth, bot management, stats, avatar uploads, and the public API — all in one process.
Sits between FastAPI and PostgreSQL in transaction pooling mode. Caps DB connections to ~20 regardless of concurrent requests or bot count.
Stores users, bots, API keys (SHA-256 hashed), bot stats, and encrypted keypairs. SQLAlchemy async ORM with asyncpg driver.
The admin service manages bot containers via the Docker socket API at runtime. Each bot is an independent container with its own lifecycle and logs.
Serves all static files directly with browser caching and proxies only API calls to FastAPI. Handles file uploads up to 10 MB.
Python's cryptography library encrypts every private key before DB write. Unique 12-byte IV per key and 16-byte authentication tag prevent tampering.