# Architecture

The LYS platform is built from the ground up to deliver ultra-fast, structured, and AI-ready blockchain data. This architecture enables data ingestion, decoding, enrichment, aggregation, and delivery - all within milliseconds.

Here’s how the full system is structured:

```
LYS Data Stack
──────────────

DECODERS ─────┐
              │
              ├──> ETL: LYS Core
              │     └── Decodes and structures Solana blockchain events
              │
              ├──> Real-Time Aggregations
              │     └── Triggers: ATH, volume spikes, bundle detection
              │     └── Output: Live WSS streams for bots, dashboards
              │
              ├──> Historical Aggregations
              │     └── Indexed event storage for backtesting, PnL, token history
              │
              ├──> Solexys ETL
              │     └── Specialized decoding for agent insights and AI context
              │
              ├──> Solexys Blockchain API
              │     ├── Enriched token data for AI agents
              │     └── Solexys Frontend queries live metrics and wallet behavior
              │
              ├──> Solexys Off-Chain API
              │     └── Handles chat history, user-defined strats, watchlists
              │
              └──> Raw Data API & WebSocket
                    └── Raw decoded Solana block data in real time

```

### Data flow summary

1. **Raw ingestion**\
   Full Solana blocks ingested from Geyser + validator infrastructure.
2. **Protocol-specific decoding**\
   Custom parsers extract true on-chain intent from transactions.
3. **Event normalization**\
   Unified schema output: swaps, transfers, votes, launches, etc.
4. **Aggregation engines**\
   Real-time summarization (e.g volume, ATHs) + historical indexing.
5. **API layer**\
   REST + WebSocket endpoints for raw and enriched data delivery.
6. **Agent layer (Solexys)**\
   NLP-driven strategy interface backed by real-time intelligence.

{% hint style="info" %}
This architecture ensures that whether you're building trading bots, training AI agents, or doing advanced research - LYS delivers structured data with **speed, context, and precision.**
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lyslabs.ai/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
