# sicknature-x/sol-warlock-meteora-lp-bot architecture

> Architecture diagram of the GitHub repository sicknature-x/sol-warlock-meteora-lp-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sicknature-x/sol-warlock-meteora-lp-bot
- Repository: https://github.com/sicknature-x/sol-warlock-meteora-lp-bot

## Overview

Sol Warlock is a Meteora DLMM liquidity-pool bot for Solana, defaulting to paper trading and controlled through Telegram and its Mini App. Its main workflow screens pools, manages simulated positions and risk, and can be switched to live execution with a configured wallet. The graph also preserves Mini App reporting and live-control capabilities. Relationships are limited to README statements, source excerpts, and SOURCE INDEX references; several execution details are unsampled, so their internal links are omitted.

Main entry points: [`sol-lp-bot/bot.js`](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/bot.js) (Trading Bot), [`sol-lp-bot/miniapp/server.js`](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/miniapp/server.js) (Mini App Server), [`sol-lp-bot/screen-reasons.js`](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/screen-reasons.js) (Pool Screening), [`sol-lp-bot/live-control.js`](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-control.js) (Live Controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Pool Screening"]
  node_screen["Pool Screening<br/>[screen-reasons.js]"]
  node_poolsource["Pool Source"]
  node_antirug["Rug Checks<br/>[antirug.js]"]
  node_entrycost["Entry Cost"]
  node_tvldrop["TVL Drop<br/>[tvl-drop.js]"]
end

subgraph group_paper["Paper Trading"]
  node_bot["Trading Bot<br/>[bot.js]"]
  node_paperstate["Paper Positions<br/>[paper-multi.js]"]
  node_policy["Entry Policy"]
  node_strategy["Paper Strategy<br/>[paper-strategy.js]"]
  node_runs["Paper Runs<br/>[paper-runs.js]"]
  node_history[("Trade History<br/>[paper-history.js]")]
  node_pnl["PnL Display<br/>[paper-quote-pnl.js]"]
  node_quote["Quote Client"]
end

subgraph group_live["Live Trading"]
  node_livecontrol["Live Controls<br/>[live-control.js]"]
  node_wallet[("Wallet Store<br/>[wallet-store.js]")]
  node_liveopen["Live Open<br/>[live-open-exec.js]"]
  node_liveclose["Live Close<br/>[live-close-exec.js]"]
  node_liveexit["Exit Rules<br/>[live-exit.js]"]
  node_reshape["Reshape Core<br/>[reshape-core.js]"]
end

subgraph group_interface["Telegram Interface"]
  node_miniapp["Mini App UI<br/>[app.js]"]
  node_server["Mini App Server<br/>[server.js]"]
  node_notify["Telegram Notify<br/>[telegram-notify.js]"]
  node_calendar["PnL Calendar"]
  node_settings["Paper Settings<br/>[paper-settings.js]"]
  node_env["Environment Config<br/>[env-config.js]"]
end

node_user(("Telegram User"))
node_jupiter{{"Jupiter Quotes"}}

node_user -->|"uses"| node_miniapp
node_miniapp -.->|"requests data"| node_server
node_bot -->|"screens pools"| node_screen
node_screen -->|"checks risk"| node_antirug
node_screen -->|"reads pools"| node_poolsource
node_screen -->|"checks cost"| node_entrycost
node_screen -->|"checks TVL"| node_tvldrop
node_bot -->|"uses positions"| node_paperstate
node_bot -->|"uses policy"| node_policy
node_bot -->|"uses strategy"| node_strategy
node_bot -->|"manages runs"| node_runs
node_bot -.->|"records trades"| node_history
node_bot -->|"sends updates"| node_notify
node_quote -->|"requests quotes"| node_jupiter
node_server -->|"reads settings"| node_settings
node_server -->|"controls live"| node_livecontrol
node_server -->|"reads wallet"| node_wallet
node_server -->|"builds calendar"| node_calendar
node_server -->|"reads activity"| node_history
node_livecontrol -->|"checks wallet"| node_wallet
node_livecontrol -->|"uses settings"| node_settings
node_liveopen -.->|"uses geometry"| node_reshape
node_bot -.->|"executes live"| node_liveopen
node_bot -.->|"closes positions"| node_liveclose
node_bot -.->|"checks exits"| node_liveexit
node_server -->|"loads config"| node_env

click node_miniapp "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/miniapp/public/app.js"
click node_server "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/miniapp/server.js"
click node_bot "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/bot.js"
click node_screen "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/screen-reasons.js"
click node_poolsource "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/pool-screen-source.js"
click node_antirug "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/antirug.js"
click node_entrycost "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-entry-cost.js"
click node_tvldrop "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/tvl-drop.js"
click node_paperstate "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-multi.js"
click node_policy "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-entry-policy.js"
click node_strategy "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-strategy.js"
click node_runs "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-runs.js"
click node_history "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-history.js"
click node_pnl "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-quote-pnl.js"
click node_quote "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-quote-client.js"
click node_livecontrol "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-control.js"
click node_wallet "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/wallet-store.js"
click node_liveopen "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-open-exec.js"
click node_liveclose "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-close-exec.js"
click node_liveexit "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-exit.js"
click node_reshape "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/reshape-core.js"
click node_notify "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/telegram-notify.js"
click node_calendar "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-pnl-calendar.js"
click node_settings "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-settings.js"
click node_env "https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/env-config.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_screen,node_poolsource,node_antirug,node_entrycost,node_tvldrop,node_user toneBlue
class node_bot,node_paperstate,node_policy,node_strategy,node_runs,node_history,node_pnl,node_quote toneAmber
class node_livecontrol,node_wallet,node_liveopen,node_liveclose,node_liveexit,node_reshape toneMint
class node_miniapp,node_server,node_notify,node_calendar,node_settings,node_env toneRose
class node_jupiter toneIndigo
```

## Components

### Pool Screening

- [Pool Screening](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/screen-reasons.js): `sol-lp-bot/screen-reasons.js`
- [Pool Source](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/pool-screen-source.js): `sol-lp-bot/pool-screen-source.js`
- [Rug Checks](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/antirug.js): `sol-lp-bot/antirug.js`
- [Entry Cost](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-entry-cost.js): `sol-lp-bot/paper-entry-cost.js`
- [TVL Drop](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/tvl-drop.js): `sol-lp-bot/tvl-drop.js`

### Paper Trading

- [Trading Bot](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/bot.js): `sol-lp-bot/bot.js`
- [Paper Positions](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-multi.js): `sol-lp-bot/paper-multi.js`
- [Entry Policy](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-entry-policy.js): `sol-lp-bot/paper-entry-policy.js`
- [Paper Strategy](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-strategy.js): `sol-lp-bot/paper-strategy.js`
- [Paper Runs](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-runs.js): `sol-lp-bot/paper-runs.js`
- [Trade History](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-history.js): `sol-lp-bot/paper-history.js`
- [PnL Display](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-quote-pnl.js): `sol-lp-bot/paper-quote-pnl.js`
- [Quote Client](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-quote-client.js): `sol-lp-bot/paper-quote-client.js`

### Live Trading

- [Live Controls](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-control.js): `sol-lp-bot/live-control.js`
- [Wallet Store](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/wallet-store.js): `sol-lp-bot/wallet-store.js`
- [Live Open](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-open-exec.js): `sol-lp-bot/live-open-exec.js`
- [Live Close](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-close-exec.js): `sol-lp-bot/live-close-exec.js`
- [Exit Rules](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/live-exit.js): `sol-lp-bot/live-exit.js`
- [Reshape Core](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/reshape-core.js): `sol-lp-bot/reshape-core.js`

### Telegram Interface

- [Mini App UI](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/miniapp/public/app.js): `sol-lp-bot/miniapp/public/app.js`
- [Mini App Server](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/miniapp/server.js): `sol-lp-bot/miniapp/server.js`
- [Telegram Notify](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/telegram-notify.js): `sol-lp-bot/telegram-notify.js`
- [PnL Calendar](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-pnl-calendar.js): `sol-lp-bot/paper-pnl-calendar.js`
- [Paper Settings](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/paper-settings.js): `sol-lp-bot/paper-settings.js`
- [Environment Config](https://github.com/sicknature-x/sol-warlock-meteora-lp-bot/blob/main/sol-lp-bot/env-config.js): `sol-lp-bot/env-config.js`

### Other components

- **Telegram User**
- **Jupiter Quotes**

## Connections

- Telegram User → Mini App UI: uses
- Mini App UI → Mini App Server: requests data
- Trading Bot → Pool Screening: screens pools (evidence: `sol-lp-bot/bot.js`)
- Pool Screening → Rug Checks: checks risk (evidence: `sol-lp-bot/screen-reasons.js`)
- Pool Screening → Pool Source: reads pools (evidence: `sol-lp-bot/screen-reasons.js`)
- Pool Screening → Entry Cost: checks cost (evidence: `sol-lp-bot/screen-reasons.js`)
- Pool Screening → TVL Drop: checks TVL (evidence: `sol-lp-bot/screen-reasons.js`)
- Trading Bot → Paper Positions: uses positions (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Entry Policy: uses policy (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Paper Strategy: uses strategy (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Paper Runs: manages runs (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Trade History: records trades (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Telegram Notify: sends updates (evidence: `sol-lp-bot/bot.js`)
- Quote Client → Jupiter Quotes: requests quotes (evidence: `sol-lp-bot/paper-quote-client.js`)
- Mini App Server → Paper Settings: reads settings (evidence: `sol-lp-bot/miniapp/server.js`)
- Mini App Server → Live Controls: controls live (evidence: `sol-lp-bot/miniapp/server.js`)
- Mini App Server → Wallet Store: reads wallet (evidence: `sol-lp-bot/miniapp/server.js`)
- Mini App Server → PnL Calendar: builds calendar (evidence: `sol-lp-bot/miniapp/server.js`)
- Mini App Server → Trade History: reads activity
- Live Controls → Wallet Store: checks wallet (evidence: `sol-lp-bot/live-control.js`)
- Live Controls → Paper Settings: uses settings (evidence: `sol-lp-bot/live-control.js`)
- Live Open → Reshape Core: uses geometry
- Trading Bot → Live Open: executes live (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Live Close: closes positions (evidence: `sol-lp-bot/bot.js`)
- Trading Bot → Exit Rules: checks exits (evidence: `sol-lp-bot/bot.js`)
- Mini App Server → Environment Config: loads config (evidence: `sol-lp-bot/miniapp/server.js`)
