Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6027cae
fix: repair evolveThresholds keys, add maxVolatility filter, add mark…
claude Apr 6, 2026
eb328c6
feat: below-range OOR fast exit, fee dilution metrics, price momentum…
claude Apr 6, 2026
5e8ff23
feat: dynamic bins, pool scoring, rebalance-on-OOR, fee velocity exit
claude Apr 6, 2026
54fd4e1
docs: rewrite README with all improvements and new features
claude Apr 6, 2026
b674ce5
feat: tier1+tier2 profit improvements — adaptive SL, smart sizing, st…
claude Apr 6, 2026
7195a2b
fix: add deploy_position to MANAGER_TOOLS to enable rebalance
claude Apr 7, 2026
a00cef3
feat: add web dashboard with real-time monitoring and control
claude Apr 7, 2026
75e9baa
feat: integrate dashboard into bot startup + document setup
claude Apr 7, 2026
b05938e
fix: wrap startDashboard in try/catch — it returns void not Promise
claude Apr 7, 2026
f21dd80
fix: dashboard auth, error handling, and status endpoint
claude Apr 7, 2026
b796a7b
feat: Tier A profit improvements — range placement, entry timing, SL,…
claude Apr 7, 2026
ed2ff2b
feat: Tier B profit improvements — dual-side, smart rebalance, scorin…
claude Apr 7, 2026
c560369
feat: Tier C profit improvements — scoring depth, streak protection, …
claude Apr 7, 2026
da3e796
remove: web dashboard (port conflict)
claude Apr 7, 2026
7471d7a
fix: relax maxPoolAgeHours 72h → 168h to prevent empty screening
claude Apr 8, 2026
6f9cacd
fix: remove maxPoolAgeHours hard limit (null = no max)
claude Apr 8, 2026
7826561
fix: remove bins_above=0 override from screener prompt + clarify DRY_RUN
claude Apr 8, 2026
198999d
fix: remove bins_above=0 override from screener prompt + clarify DRY_RUN
claude Apr 8, 2026
e889e44
Merge branch 'claude/build-dlmm-bot-UK6dq'
claude Apr 8, 2026
342d165
docs: update README and CLAUDE.md to reflect all recent improvements
claude Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Three agent roles filter which tools the LLM can call:
| Role | Purpose | Key Tools |
|------|---------|-----------|
| `SCREENER` | Find and deploy new positions | deploy_position, get_top_candidates, get_token_holders, check_smart_wallets_on_pool |
| `MANAGER` | Manage open positions | close_position, claim_fees, swap_token, get_position_pnl, set_position_note |
| `MANAGER` | Manage open positions | close_position, claim_fees, swap_token, get_position_pnl, set_position_note, deploy_position, get_active_bin, get_pool_memory |
| `GENERAL` | Chat / manual commands | All tools |

Sets defined in `agent.js:6-7`. If you add a tool, also add it to the relevant set(s).
Expand Down Expand Up @@ -81,13 +81,26 @@ Sets defined in `agent.js:6-7`. If you add a tool, also add it to the relevant s
| maxBundlersPct | screening | 30 |
| maxTop10Pct | screening | 60 |
| blockedLaunchpads | screening | [] |
| minPoolAgeHours | screening | 6 |
| maxPoolAgeHours | screening | null (no limit) |
| minFeePerPosition | screening | 1.5 |
| maxEntry5mPricePct | screening | 12 |
| minEntry5mPricePct | screening | -20 |
| athFilterPct | screening | -15 |
| deployAmountSol | management | 0.5 |
| maxDeployAmount | risk | 50 |
| maxPositions | risk | 3 |
| gasReserve | management | 0.2 |
| positionSizePct | management | 0.35 |
| minSolToOpen | management | 0.55 |
| outOfRangeWaitMinutes | management | 30 |
| stopLossPct | management | -35 (fallback) |
| bidAskStopLossPct | management | -20 |
| spotStopLossPct | management | -35 |
| takeProfitFeePct | management | 20 |
| maxDrawdownFromPeak | management | 8 |
| rebalanceOnOOR | management | true |
| rebalanceMinFeeVelocity | management | 30 |
| managementIntervalMin | schedule | 10 |
| screeningIntervalMin | schedule | 30 |
| managementModel / screeningModel / generalModel | llm | openrouter/healer-alpha |
Expand Down Expand Up @@ -118,9 +131,11 @@ Before `deploy_position` executes:

---

## bins_below Calculation (SCREENER)
## bins_below / bins_above Calculation (SCREENER)

Linear formula based on pool volatility (set in screener prompt, `index.js`):
Both values are auto-calculated server-side. The LLM must NOT pass either — passing any value overrides the optimization.

**bins_below** — Linear formula based on pool volatility:

```
bins_below = round(35 + (volatility / 5) * 34), clamped to [35, 69]
Expand All @@ -130,6 +145,15 @@ bins_below = round(35 + (volatility / 5) * 34), clamped to [35, 69]
- High volatility (5+) → 69 bins
- Any value in between is valid (continuous, not tiered)

**bins_above** — Calculated in `computeOptimalBinsAbove()` in `tools/dlmm.js`:

```
bid_ask → round(bins_below × 0.20)
spot / curve → round(bins_below × 0.35)
```

This places price below the top of range so the position captures upward movement before going OOR.

---

## Telegram Commands
Expand Down Expand Up @@ -223,5 +247,4 @@ Not required for normal operation.

## Known Issues / Tech Debt

- `lessons.js evolveThresholds()` evolves `maxVolatility` + `minFeeTvlRatio` (wrong key names — should be `minFeeActiveTvlRatio`; `maxVolatility` doesn't exist in config at all). The evolution is a no-op for those keys.
- `get_wallet_positions` tool (dlmm.js) is in definitions.js but not in MANAGER_TOOLS or SCREENER_TOOLS — only available in GENERAL role.
Loading