CHAPTER 01
Institutional Architecture & Non-Custodial Model (v2.1.0)
DMNE Meme Alpha v2.1.0 is an institutional quantitative algorithmic execution platform engineered specifically for Solana meme coin micro-liquidity markets under canonical contract schema_version = "2.0.0". Signals ingest from dmne-social-daemon over UDS (/tmp/dmne_social.sock) into a decoupled dual-speed Rust core (CSV == PostgreSQL dmne_quant == /api/state & SSE /events).
โก SUB-MILLISECOND HOT-PATH (RUST)
Engineered in pure Rust with lock-free atomics, bounded rolling ring buffers, and Tokio async actors. Microstructure evaluations execute in under 5 microseconds, driving a 1.5s exit loop and dispatching priority Jito bundles direct to Solana block builders.
๐ COLD-PATH DATA LAKE (POSTGRESQL)
Every trade settlement, rejection snapshot, and tick trace is asynchronously ingested into PostgreSQL (dmne_quant) with CSV backfill parity (|bankroll - (baseline + sum_csv)| < 1e-8). Ensures complete forensic fidelity without synchronous lock contention.
๐ ROLE-ISOLATED MULTI-RPC ROUTING (v2.1.0)
Strictly isolates preflight & execution (SOLANA_RPC_URL serving getTokenLargestAccounts, simulateTransaction, getLatestBlockhash, getBalance at 125ms global pacing) from high-volume background discovery (BACKGROUND_RPC_URLS Chainstack + Alchemy round-robin pool with 220ms per-endpoint departure pacing for getSignaturesForAddress & getTransaction with maxSupportedTransactionVersion: 1).
๐ก๏ธ 300s QUOTA BREAKER & TTL METADATA CACHE
An automatic 300s primary hard-quota circuit breaker triggers instant failover on HTTP 429 exhaustion to authenticated backup RPCs. Immutable getAccountInfo mint metadata is cached for 300s (IMMUTABLE_MINT_INFO_CACHE_TTL_SECS), and getTokenLargestAccounts concentration snapshots are cached for 30s (HOLDER_CACHE_TTL_SECS).
Multi-Tenant Prop Model & Canonical Telemetry: Traders (e.g. Master Admin, Giuseppe, Giovanni) operate isolated virtual/on-chain workspaces driven by canonical execution_mode (PAPER / LIVE), live Solana RPC getBalance bankroll synchronization in LIVE mode, cached background sol_price_eur FX conversion, and Fractional Kelly Sizing (4.5% to 8.5% NAV) across 4 concurrent execution slots.
CHAPTER 02
Pre-Trade Filtration, Fail-Closed RPC & Discovery Gates
Over 99.4% of candidate tokens are filtered prior to capital exposure. In v2.1.0, candidates must clear live-tick filters before spending RPC budget, followed by fail-closed on-chain security checks and live Jupiter V0 transaction simulation:
1. Early Live-Tick Snapshot Gate & Fail-Closed RPC Security
Evaluates quote freshness (≤ 3000ms), pool liquidity floor (≥ $28,000), UTC chop-session blocking (23:00โ06:00 UTC), and 2-tick confirmation before RPC calls. Enforces fail-closed getAccountInfo (300s cached) mint/freeze authority revocation & Token-2022 transfer-fee (≤ 100 bps) checks plus getTokenLargestAccounts (30s cached) HHI dispersion checksโany unavailable or rate-limited RPC security check fails closed ([SECURITY GATE] Rejecting).
2. Hawkes Self-Exciting Point Process Filter
Measures background arrival traces (BACKGROUND_RPC_URLS) in fractional Unix seconds (t ∈ ℝ). Calculates the self-excitation branching ratio (η = α / β). Robotic clocking and wash-trading are detected when η ≥ 1.15 with sample size N ≥ 5, triggering immediate rejection.
3. Genesis Guard & Slot 0 Anti-Sniper Cluster Detection
Surveils block 0 bundlers. Rejects any token where block 0 transactions bundle > 25.0% of circulating supply or multi-wallet clusters share identical Jito bribe tip accounts. Protects against coordinated sniper dumps.
4. Cumulative Volume Delta (CVD) Orderflow Gate
Maintains a 60-second rolling taker volume window. Requires taker buy pressure ratio ≥ +15.0% ((BuyVol - SellVol) / TotalVol ≥ 0.15) prior to queue entry confirmation.
5. Live Jupiter V0 VersionedTransaction Preflight & -32602 Fail-Fast
Constructs real swaps via Jupiter /swap/v1/quote + /swap/v1/swap when funded (falling back to a compiled Solana V0 ComputeBudget + SystemProgram VersionedTransaction), verifies bincode::deserialize::<VersionedTransaction> and the 1232-byte Jito UDP MTU on raw wire bytes, and dispatches simulateTransaction (sigVerify: false, replaceRecentBlockhash: true, encoding: "base64") with 550ms exponential backoff (550ms + 1100ms). Explicitly classifies JSON-RPC -32602 (RPC_INVALID_PARAMS) as fail-fast without mislabeling it as RPC_RATE_LIMIT_OR_TRANSPORT.
CHAPTER 03
AI Cruise Agent // In-Flight Dynamic Exit Supervisor
Once a position is entered, the DCS Cruise Control Supervisor continuously evaluates micro-volatility, LP reserve retention, and orderflow pressure on every 1.5s exit tick:
๐ VOLATILITY-SCALED PROFIT RATCHET
Computes rolling tick standard deviation (σ_realized). Trails peak price with dynamic delta Δ_trail = clamp(1.65 × σ, 8.0%, 22.0%). Arms the dynamic floor at ≥ +15.0% MFE (≥ +4.0% locked), applies a mid-zone ratchet at +25.0% → +4.0%, and enforces full breakeven arm at +24.0% → +8.0%.
โ ๏ธ CVD ABSORPTION TRIPWIRE
Detects hidden passive dumping into retail buying. If price is elevated but the CVD ratio collapses below -30.0%, the supervisor cuts the trailing delta in half (0.5 × Δ_trail) and immediately ratchets the exit floor.
EMERGENCY RISK CIRCUIT MATRIX:
Early Abort: -10.0%
10k Tip • 30s momentum stall
Flash Dump: -15.0%
100kโ250k Tip • 1-tick collapse
Hard Stop-Loss: -8.0%
100kโ250k Tip • Loss ceiling
Max Slippage / LP Drain: -25.0%
100kโ250k Tip • ≥35% LP drain
CHAPTER 04
AI Launch Agent // Cold-Path Forensic Autopsy Lake
Every settled loss trade automatically undergoes a post-mortem forensic autopsy stored in PostgreSQL trade_forensic_autopsies, reconciled under canonical contract schema_version = "2.0.0" with deterministic sandbox_replay parity (atol = 1e-10):
RAPID_DRAIN_RUG
Catastrophic LP withdrawal or developer dump within seconds of pool initialization.
EXCESSIVE_SLIPPAGE
Adverse price drift (> 4.0%) between quote simulation and confirmed on-chain fill.
ORGANIC_STOP
Natural market retracement triggering disciplined hard stop without liquidity drain.
NORMAL_EXIT
Standard capital recycling via stagnation TTL or partial take-profit harvest.
Counterfactual Replay Simulator: Evaluates whether tightening parameters (e.g. Min Liquidity $35,000, CVD Ratio ≥ +25%) would have mathematically averted historic losses without filtering out historical multi-bagger winners.
CHAPTER 05
Admin PR Gate, v2.1.0 Environment & CLI Runbook
DMNE enforces strict Human-in-the-Loop governance and zero-disruption deployments. The AI agent never autonomously edits config.toml or restarts dmne-alpha.service while active_positions > 0.
๐ก๏ธ MATHEMATICAL SAFETY INVARIANT BOUNDS
• Stop Loss: -25.0% ≤ SL ≤ -8.0%
• Min Liquidity: $15,000 ≤ Liq ≤ $100,000
• Emergency Tip: 100kโ250k lamports
โ๏ธ v2.1.0 .env & CONFIG.TOML OPERATIONAL PARAMETERS
• SOLANA_RPC_URL: Dedicated preflight & execution primary (125ms global pacing, 300s quota breaker, 550ms simulation backoff).
• BACKGROUND_RPC_URLS: Comma-separated Chainstack + Alchemy backup pool (220ms pacing per endpoint) for discovery & auto-failover.
• JUPITER_QUOTE_API_URL: https://lite-api.jup.ag/swap/v1/quote
• JUPITER_SWAP_API_URL: https://lite-api.jup.ag/swap/v1/swap (500 bps default preflight slippage cap, 1232B Jito MTU check).
OPERATIONAL CLI RUNBOOK (v2.1.0):
# 1. Run full unit + golden_cycle_contract + DB parity test suite
cargo test --all
# 2. Live Safety Gate: Confirm ZERO active slots (0/4) before build & restart
curl -s http://127.0.0.1:8090/api/state | jq '{slots: (.active_positions | length), mode: .execution_mode, persist_err: .persistence_error_count}'
# 3. Build optimized release binary ONLY when slots == 0/4 & safely reload daemon
cargo build --release && sudo systemctl restart dmne-alpha.service
# 4. Verify DB == CSV == API parity & check AI Launch Agent proposal board
psql "host=localhost user=ubuntu dbname=dmne_quant" -Atc "SELECT COUNT(*) FROM settled_trades WHERE tenant_id='giuseppe';"
cargo run --release --bin dmne_agent_harness -- plan
CHAPTER 06
Operational Command Center & Dashboard Functions
The DMNE command console provides real-time supervisory controls, emergency circuit tripping, non-custodial capital vaulting, multi-slot concurrency management, and quantitative reporting:
โธ PAUSE SCANNER
ADMISSION FREEZE
Toggles state.is_scanner_paused. Halts candidate queue admissions and prevents opening new positions. In-flight positions in slots 1โ4 remain 100% supervised by the DCS Cruise Control and exit strictly according to their exit ladders.
๐ PANIC DUMP
CIRCUIT FLUSH
Immediate priority liquidation across all active slots. Dispatches maximum urgency Jito bundles with 100,000โ250,000 lamports emergency bribe tips to outrun pool drainers. Permanently marks closed tokens with toxic quarantine tags.
๐ณ DEPOSIT & ๐ธ WITHDRAW
NON-CUSTODIAL VAULT
Non-custodial capital adjustments reconciling live on-chain balance with PostgreSQL settled PnL (LIVE mode binds NAV to live Solana RPC getBalance). Enforces a 0.0300 SOL Gas Reserve Floor; active-slot capital cannot be withdrawn.
๐ FILTER TABS & RADAR
PRIORITY ROUTING
Segments pre-trade candidates: ALL, HIGH CONVICTION (Score ≥ 80), PUMP.FUN, RAYDIUM, and GRADUATING (≥ 95% curve). Graduated pools are automatically given queue priority routing.
๐ ACTIVE SLOTS (1 - 4)
4-SLOT CONCURRENCY
Real-time microstructure cards tracking spot vs entry price, floating PnL, Peak MFE, rolling volatility σ, ratcheted trailing floor, and CVD taker pressure meter. Supports individual slot telemetry inspection and manual single-position liquidation.
๐ฅ CSV EXPORT (LEDGER)
RFC-4180 COMPLIANT
One-click client-side export generating dmne_forensic_trades_<timestamp>.csv containing all 25 institutional telemetry columns (hold times, MFE/MAE excursions, realized PnL, exit rules, Jito tips, and toxic flags) for Python/Jupyter analysis.
v2.1.0 ROLE-ISOLATED ADMISSION & EXECUTION FLOW:
+-----------------------------------------------------------------------------------------------+
| v2.1.0 ROLE-ISOLATED ADMISSION & CONCURRENCY FLOW |
+-----------------------------------------------------------------------------------------------+
| [ Social UDS / Background Pool (220ms) ] ---> [ Early Live-Tick & Snapshot Gate ] |
| | |
| (Fresh Quote, Liq ≥ $28k, Non-Chop) |
| v |
| [ 300s Cached Authority + Fail-Closed HHI (30s) + Hawkes/Genesis ] |
| | |
| (Passes All Security Gates) |
| v |
| [ Jupiter V0 / System V0 Preflight -> 1232B MTU -> simulateTx ] |
| (Fail-fast -32602 RPC_INVALID_PARAMS | 550ms/1100ms 429 Backoff) |
| | |
| v |
| +--------------------------------------+----------------------------------+ |
| | If PAUSED | If ACTIVE | |
| v v | |
| [ HOLD IN QUEUE ] [ Vacant Slot? ] ---> [ SLOT #1 - #4 (1.5s Exit Loop)]|
| (Exits Stay Supervised) | | |
| v | |
| [ CSV == PostgreSQL == /api/state (Schema 2.0.0) ] |
+-----------------------------------------------------------------------------------------------+
EMERGENCY TIP ESCALATION & JITO EXECUTION DEFENSE:
+-----------------------------------------------------------------------------------------------+
| EMERGENCY TIP ESCALATION & LIQUIDATION MATRIX |
+-----------------------------------------------------------------------------------------------+
| Routine State: |
| Standard Execution Priority: 10,000 lamports (0.000010 SOL) Jito Bundle Tip |
| |
| Emergency Escalations: |
| 1. Early Abort (-10.0%, 30s) ---> 10,000 lamports (Stagnation Momentum Cull) |
| 2. Hard Stop-Loss (-8.0%) ---> 100,000โ250,000 lamports (HIGH_URGENCY Emergency Bribe)|
| 3. Flash Dump (-15.0% 1-tick) ---> 100,000โ250,000 lamports (HIGH_URGENCY Emergency Bribe)|
| 4. Max Slippage / LP Drain -35% ---> 100,000โ250,000 lamports (HIGH_URGENCY Emergency Bribe)|
| 5. Manual Panic Dump Button ---> 100,000โ250,000 lamports (Immediate All-Slot Flush) |
+-----------------------------------------------------------------------------------------------+