# Decoders

## Introduction

Decoders are the foundational layer of LYS’s data processing stack. They are specialized modules that interpret and transform raw blockchain instructions, logs, and token transfers into structured, enriched data. Each protocol - whether a DEX, launchpad, or validator client - has its own decoder that understands its unique logic and events.

## Why decoders matter

Without decoders, raw blockchain data is nearly unusable for real-time decision-making. Decoders translate that noise into signals.

* **Raw input**: low-level instructions and logs from Solana blocks
* **Decoded output:** typed events with labeled fields (buy/sell, user, mint, amount, fees, bonding %, etc.)
* **Next layer:** feeds into aggregation systems (for OHLCV, rug detection, volume spikes, user stats, etc.)

## Architecture

Each decoder:

* Parses transactions in real-time
* Extracts known program IDs (per protocol)
* Normalizes data into a shared schema
* Streams decoded results into MongoDB + WebSocket servers

## Use Cases

Decoders directly enable:

* The Solexys frontend (launchpad strategy analysis)
* Historical & real-time API access for clients
* High-frequency bot pipelines
* Real-time WSS subscriptions
* Triggered alerts (volume, rug risk, top wallet moves)


---

# 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/decoders.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.
