Skip to content

starlash7/Narkina5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NARKINA 5

64 Cells · 512 Agents · 7 Floors · 1 Survivor
Autonomous launch-selection arena on Solana, graduating winners to Bags-track launch flow

Narkina5 is a tournament system for token launch selection. Instead of launching first and evaluating later, we run a full elimination arena and promote only the final survivor.

Live Links

TL;DR

  • Problem: most meme launches optimize attention first and quality later.
  • Solution: Narkina5 runs a deterministic season tournament before launch.
  • Mechanism: 512 agents compete in 64 cells across a 7-floor season, cut by PnL each round.
  • Result: only the final survivor is promoted into Bags-track graduation flow.

Why This Feels New

Narkina5 treats launch selection as a competitive systems problem:

  • launch quality is earned through survival pressure, not manual curation
  • selection happens under identical market snapshots, not subjective scoring
  • graduation is wired to execution flow, not just a ranking screen

Bags Hackathon Objective (Q1 2026)

Narkina5 is now optimized for Bags Hackathon evaluation priorities:

  • Real traction first: onchain performance + app usage growth
  • Verifiable shipping: deployed product, onchain evidence, auditable outputs
  • Deeper Bags alignment: project direction is set to Bags token/API/fee-sharing integration

Current implementation note:

  • Launch rail is currently PumpPortal-based.
  • Product objective and roadmap are now Bags-first, with integration tasks prioritized in TODOS.md.

Quick Walkthrough

  1. Open Home and enter PnL Arena
  2. Start bracket run and confirm floor schedule (64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1)
  3. Verify season loop: phase pipeline, PnL accounting, deterministic eliminations
  4. Confirm winner finalization and Bags-track graduation path

Graduation -> Launch Workflow (Bags-Track Objective)

The launch path is already integrated end-to-end, with one explicit user approval step:

  1. Season completed and one survivor cell is finalized.
  2. Graduation gate is evaluated (PnL, drawdown, consistency, risk, weekly slot, feed reliability).
  3. If eligible, Narkina5 composes winner metadata and uploads it through /api/pumpfun?action=ipfs.
  4. Narkina5 requests create-transaction bytes through /api/pumpfun?action=trade.
  5. Manual approval (required): the connected wallet signs once.
  6. Signed transaction is sent on Solana mainnet.
  7. UI returns proof artifacts in real-time:
    • mint address
    • launch page link
    • tx hash / explorer link
    • downloadable season receipt JSON

Automation boundary:

  • Automated: winner selection, gate checks, metadata composition, tx construction.
  • Manual: one wallet signature before on-chain launch.

Live operator controls:

  • Gate Profile: strict or hackathon thresholds.
  • Feed Reliability Mode: balanced (blocks only FAILING) or strict (requires WORKING).
  • Launch Safety Lock: default LOCKED; must be manually unlocked before launch.

Recommended Operating Presets

Preset Gate Profile Feed Reliability Safety Lock When to use
Hackathon Demo hackathon balanced LOCKED by default, unlock only right before signature Live judge demos and short submission videos
Production Safe strict strict LOCKED by default, unlock per approved launch window Real operations with reputation/risk protection

Narkina5 Graduation Workflow

Architecture (Production Topology)

┌──────────────────────────── Client Layer ────────────────────────────┐
│ React App (Home / PnLArena / About)                                   │
│ - competition controls and floor progression UI                        │
│ - wallet session and signing context (Privy)                           │
└───────────────────────────────┬───────────────────────────────────────┘
                                │ HTTPS
                                v
┌────────────────────────── API Boundary Layer ─────────────────────────┐
│ Vercel Functions                                                       │
│ - /api/market      (DexScreener proxy, response shaping)              │
│ - /api/agent       (Claude role decision endpoint)                     │
│ - /api/pnl-agent   (PnL-focused decision endpoint)                     │
│ - /api/pumpfun     (Launch proxy; current rail: PumpPortal, Bags objective) │
└───────────────┬──────────────────────┬──────────────────────┬─────────┘
                │                      │                      │
                v                      v                      v
           DexScreener API         Anthropic API       PumpPortal (current rail)

┌────────────────────────── Arena Core Layer ───────────────────────────┐
│ pnl-types.ts        domain contracts (Cell, Agent, Portfolio, Trade)  │
│ pnl-competition.ts  floor state machine + elimination engine           │
│ pnl-market.ts       market normalization + fallback path               │
│ transactions.ts     Solana transaction builders                        │
│ pumpfun.ts          winner graduation and launch orchestration         │
└───────────────────────────────┬────────────────────────────────────────┘
                                │ signed tx + RPC calls
                                v
                      Solana Mainnet + AgenC Program

Runtime Contracts

Contract Responsibility Source
PnLCompetitionState full arena state, floor cursor, winner, logs narkina5-frontend/src/services/pnl-types.ts
TradingCell per-cell lifecycle, phase, portfolio, elimination status narkina5-frontend/src/services/pnl-types.ts
Portfolio + Trade value accounting, position exposure, trade history narkina5-frontend/src/services/pnl-types.ts
PnLLogEntry round-by-round audit trail and replay visibility narkina5-frontend/src/services/pnl-types.ts

Reliability and Control Strategy

  • Market feed disruption falls back to normalized local path in pnl-market.ts.
  • Feed reliability mode is enforced at graduation gate evaluation time.
  • AI cost is bounded by spotlight-cell policy; non-spotlight cells use deterministic decisions.
  • Graduation is gated by floor-7 completion and winner finalization in pnl-competition.ts.
  • Launch safety lock requires explicit operator unlock before wallet-sign launch.
  • Transaction building and signing are isolated in transactions.ts and Solana wallet context.

Arena Engine Design

Bracket Model

Floor 1: 64 cells x 8 agents = 512  -> top 32 survive
Floor 2: 32 cells x 8 agents = 256  -> top 16 survive
Floor 3: 16 cells x 8 agents = 128  -> top 8 survive
Floor 4:  8 cells x 8 agents = 64   -> top 4 survive
Floor 5:  4 cells x 8 agents = 32   -> top 2 survive
Floor 6:  2 cells x 8 agents = 16   -> top 1 survives
Floor 7:  1 cell  x 8 agents = 8    -> 1 winner graduates

Season Structure

  • One season = 7 floors / 7 rounds with fixed elimination schedule
  • Operational cadence target: 1 floor per day for a weekly championship
  • End of season: one champion cell enters graduation gate
  • Graduation throughput is capped to protect launch quality and protocol reputation

Cell Phase Pipeline

research -> analysis -> strategy -> execution -> risk_review

Each phase updates the same typed state contracts and feeds the floor-level ranking pass.

AI Agent Operating Model (Latest)

Each cell has 8 agents mapped into five roles:

  • Researcher: narrative discovery, X query templates, catalyst detection
  • Analyst: Wyckoff/technical regime checks, trend validation
  • Strategist: thesis weighting, allocation planning, scenario orchestration
  • Trader: execution timing, slippage/impact-aware order decisions
  • RiskManager: concentration/suspicion filters and trade veto authority

Agent doctrine diversity is built-in:

  • Wyckoff
  • Scalping
  • Technical
  • MacroResearch
  • OrderFlow

Every agent carries a skill vector (riskAppetite, execution, researchDepth, chartSkill, adaptation, edgeScore) and updates it each round through a learning loop.

Execution + Risk Hardening (Latest)

  • Slippage baseline reduced to 0.15%
  • Minimum hold window introduced (2 rounds) to reduce churn
  • Buy decisions require expected edge (bps) > execution costs (slippage + impact + congestion fee proxy)
  • RiskManager can veto toxic buys using:
    • suspicion scoring (momentum spikes + weak turnover + ultra-new pair bias)
    • holder concentration proxy
    • liquidity/turnover quality thresholds
  • Skill profiles and confidence adapt every round based on realized cell delta

Strategy Diversification Upgrade (2026-03-03)

Goal: increase graduation probability by improving team strategy quality, not by lowering gate cutlines.

Direction:

  • Keep graduation gate thresholds intact and raise pass likelihood through stronger cell behavior.
  • Make each cell operate with a distinct strategic identity (not small random variation).
  • Add market-regime response so cells adapt between trend, volatility, and risk-off states.
  • Improve survival consistency with proactive exits and concentration control.

Implemented:

  • Added fixed cell archetypes: TrendRider, MeanReverter, BreakoutHunter, LiquidityFarmer, ShieldWall.
  • Added per-cell behavior traits: discipline, aggression, patience, innovation.
  • Added floor phase policy: boot / expansion / survival with phase-dependent sizing and turnover.
  • Added market regime detection and archetype-regime fit scoring in trade selection.
  • Added dynamic position-count cap and concentration-aware entry buffer.
  • Added proactive sell triggers: stop-loss, take-profit, risk-off rotation, hard risk-off defense.
  • Upgraded learning loop to include drawdown stress in confidence/risk/adaptation updates.

Current status:

  • Engine logic upgraded in narkina5-frontend/src/services/pnl-competition.ts.
  • Gate policy remains unchanged (no threshold relaxation in this iteration).

Graduation Gate Policy

Champion cells do not auto-launch. They pass all gates:

  • Strict profile:
    • PnL: >= +10 SOL (relaxed to >= +8 SOL after long dry streak)
    • Drawdown: <= 15%
    • Consistency: >= 55%
    • Risk violations: <= 0
    • Throughput cap: 1 graduation per season window
  • Hackathon profile:
    • PnL: >= +6 SOL (relaxed to >= +5 SOL)
    • Drawdown: <= 22%
    • Consistency: >= 45%
    • Risk violations: <= 1
    • Throughput cap: max(2, default cap)
  • Feed gate:
    • balanced: launch blocked only when feed is FAILING
    • strict: launch blocked unless feed is WORKING
  • Safety lock:
    • launch action is disabled while lock is LOCKED

If any gate fails, champion metadata is retained but launch is blocked.

Determinism + Cost Control

  • deterministic elimination and scoring for replayability
  • selective AI usage on spotlight cells to keep costs bounded
  • same market snapshot basis per floor for fair comparison

What Is Real vs Simulated

Component Status
Solana wallet + signing Real
DexScreener market feed Real
Floor progression + elimination Deterministic simulation
AI trade reasoning Hybrid (Claude + deterministic paths)
Bags-track launch pipeline Integrated (current rail: PumpPortal)

Repository Structure (Responsibility-First)

narkina5-frontend/
  src/
    pages/
      Home.tsx               # Product narrative + entry
      PnLArena.tsx           # Live competition runtime UI
      About.tsx              # Context and architecture overview
    services/
      pnl-types.ts           # Canonical domain types/constants
      pnl-competition.ts     # Bracket engine and elimination logic
      pnl-market.ts          # Market ingest and normalization
      agent.ts               # AI decision client
      pumpfun.ts             # Launch integration service (Bags-track objective)
      agenc.ts               # AgenC protocol helpers
      transactions.ts        # Solana tx builders
    contexts/
      SolanaContext.tsx      # Wallet and connection context
    components/
      Header.tsx
      Footer.tsx
      Icons.tsx
  api/
    market.ts                # DexScreener proxy
    agent.ts                 # Claude endpoint
    pnl-agent.ts             # PnL decision endpoint
    pumpfun.ts               # Launch proxy (PumpPortal rail)

Tech Stack

Layer Technology
Frontend React 19, TypeScript, Vite
Chain Solana Mainnet, @solana/web3.js
Wallet Privy
AI Claude (Haiku 4.5)
Market Data DexScreener API
Launch Bags-track objective (current rail: PumpPortal)
Deployment Vercel

Test Coverage

  • Engine baseline tests are included with vitest:
    • 64 cells / 512 agents generation invariant
    • healthy-market decision generation
    • toxic-buy veto path
    • valid-buy execution path
  • Market guardrail tests are included:
    • feed reliability mode behavior (balanced vs strict)

Local Setup

cd narkina5-frontend
npm install

Create .env:

VITE_PRIVY_APP_ID=your_privy_app_id
ANTHROPIC_API_KEY=your_anthropic_api_key
VITE_TOKEN_CA=your_launch_token_ca
VITE_PROJECT_X_URL=https://x.com/Narkina5Agent
VITE_PROJECT_WEBSITE_URL=https://narkina5.vercel.app

Run:

npm run dev

About

Autonomous elimination arena on Solana. 512 agents compete across 7 floors, only the final survivor graduates to Pump.fun launch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages