Speed is truth. In high-frequency Solana DeFi, latency is the difference between alpha and ruin.
01Bare Metal Ingestion
Most retail trading tools rely on standard RPC polling (e.g., getAccountInfo every 400ms). This creates a critical "blind spot" where blocks are confirmed on-chain before the user's interface updates.
Yurei Agent eliminates this by utilizing Helius RPC streaming directly from custom-built Geyser plugins. Instead of polling, we open a persistent, bi-directional stream with Validator nodes.
Standard Polling
400ms - 2500ms
Data arrives AFTER candles form. You are already too late.
Yurei Helius Stream
< 20ms
Data arrives BEFORE most retail tools even know a block exists.
02Kernel-Level Parsing
Standard libraries (like @solana/web3.js) introduce significant overhead due to JavaScript's garbage collection and event loop. To achieve deterministic speed, the core of Yurei Agent is written in C11 with critical paths optimized in x86 Assembly.
We utilize libwebsockets and epoll for non-blocking I/O. When a "Mint" or "LP Add" event is detected, it is not processed as a Javascript object; it is parsed as a raw byte array.
Technical Specification
| Language | C11, x86 Assembly, sBPF |
| I/O Model | Non-blocking (epoll) |
| Data Source | Helius RPC (Geyser Plugin) |
| Target Latency | < 20ms |
| Database | PostgreSQL (libpq direct) |
| Network | libwebsockets, libcurl |
03Risk Vector Calculation
The Agent performs deterministic analysis of on-chain instruction sets. It does not "guess" or use probabilistic models for its core checks. Every scan produces a normalized risk score based on weighted vectors:
Code Risk Vector
Mint Authority, Freeze Authority, Upgrade Authority analysis. Max penalty: +40.0
Liquidity Risk Vector
LP lock status, TVL analysis. Unlocked LP = Infinite Risk. Formula: (TVL / Locked_%) * Multiplier
Behavioral Risk Vector
Deployer wallet history, Tx_Delta analysis. <10ms delta = Automated Script. Max penalty: +25.0
AlgorithmThe Math of DYOR
Yurei Agent does not "feel" market sentiment. It calculates risk using a deterministic weighted sum of vectors.
ƒ(L)Liquidity Paradox
As Locked_% → 0, the Risk Score approaches infinity (∞). This effectively flags "soft rugs" where liquidity exists but is unsecured.
δtBehavioral Delta
Quantifies human reaction time. If δt < 200ms, the probability of the actor being a bot is > 99.9%.
04Quantitative Analysis Layer
Beyond real-time detection, Yurei Agent includes a quantitative analysis module (yurei-quant-insight) for detecting alpha signals from historical DeFi data. Built with Polars for high-performance dataframe operations and async SQLAlchemy for database interactions.
This layer enables pattern detection across thousands of token launches, identifying deployer behavior clusters and liquidity manipulation signatures.
05The Pipeline
- 1ObservationValidators broadcast a new block. Helius Edge Nodes capture this instantly via Geyser plugin.
- 2IngestionYurei Agent receives the gRPC stream. Jito bundles are flagged. Snipe transactions are indexed before the UI even renders.
- 3Vector CalculationRaw bytes are parsed and risk vectors (A, B, C) are calculated deterministically. No ML inference at this stage.
- 4Sanitization & HandoffData is normalized into the Protocol NAVI schema and pushed to the LLM inference engine. Total time: ~350ms.
06Open Source Infrastructure
We believe that critical infrastructure should be verifiable. The following components are open-source under MIT license:
yurei-geyser-client
High-performance Solana Yellowstone gRPC client. Streams PumpFun/Raydium events into PostgreSQL.
yurei-jsonrpc-client
Solana JSON-RPC/WebSocket ingestion engine. Streams logs into PostgreSQL (C11 + libwebsockets/libcurl).
yurei-quant-insight
Quantitative analysis layer for detecting alpha signals from Solana DeFi data. Built with Polars & Python.
yurei-fast-filter-asm
High-performance Solana raw event filtering using sBPF Assembly for microsecond-level processing.
navi-event-tokenizer
Preprocessing engine converting raw Solana events into semantic tokens for Protocol NAVI LLM training.
x402-yurei-agent-access
Permissionless agent-to-agent access layer powered by x402 micropayment protocol.
07x402 Agent Access Protocol
Yurei Agent supports permissionless agent-to-agent access via the x402 micropayment protocol. External AI agents can query Yurei's risk analysis engine with per-request USDC payments — no subscriptions, no API keys, no friction.
This enables a future where autonomous trading agents can perform due diligence on tokens before execution, paying only for the intelligence they consume.