# Infrastructure Overview

#### 1. **Token Management & Data Layer**

* Users can track and manage tokens by providing contract addresses directly.
* The system collects price data, transaction history, and liquidity details.
* Historical data is stored for trend tracking and strategy backtesting.

#### 2. **Strategy & Risk Layer**

* User-defined strategies specify entry/exit rules, stop-loss, and profit targets.
* Risk thresholds (price drops, position size limits, slippage tolerances) are applied before any trade is executed.
* This layer acts as a filter, ensuring only valid trades move forward.

#### 3. **Core Engine**

* Handles real-time market monitoring.
* Executes trades based on configured strategies.
* Optimized for high throughput, with faster execution and improved RPC handling for reliability.

#### 4. **Execution Handlers**

* Specialized services that construct, send, and confirm buy/sell transactions on the Solana blockchain.
* After each trade, token states are updated (holdings, PnL, active orders).

#### 5. **Persistence Layer (Database)**

* MongoDB stores all relevant data: token states, trading history, risk events, and execution logs.
* Ensures persistence across sessions and enables accurate reporting/analysis.

#### 6. **User Dashboard & Communication Layer**

* The dashboard, connected via **Socket.IO**, streams real-time data to users.
* Displays balances, active orders, historical trades, and live execution updates.
* Provides configuration panels for strategies, risk parameters, and wallet details.


---

# 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.devoid.trade/system-overview/infrastructure-overview.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.
