From 6a01d55ced44ecedb7eac6682f50f4274682c0f9 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 16 Mar 2026 21:37:27 +0000 Subject: [PATCH] fix: txnBot not covered by any phase documentation (#895) --- docs/ENVIRONMENT.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md index 2340696..aee4378 100644 --- a/docs/ENVIRONMENT.md +++ b/docs/ENVIRONMENT.md @@ -14,10 +14,20 @@ Docker Compose services (in startup order): | **ponder** | On-chain indexer + GraphQL API | 42069 | HTTP /ready or GraphQL | | **landing** | Landing page (Vue 3 + Vite) | 5174 | HTTP response | | **webapp** | Staking app (Vue 3) | 5173 | HTTP response | -| **txn-bot** | Automated recenter/tx bot | — | Process alive | +| **txn-bot** | Automated `recenter()` and `payTax()` upkeep ([services/txnBot/](../services/txnBot/)) | 43069 | Process alive | | **caddy** | Reverse proxy / TLS | 80/443 | — | | **otterscan** | Block explorer | 5100 | — | +## txnBot Service + +`services/txnBot/` is the automation service responsible for keeping the protocol healthy: + +- **`recenter()` monitoring** — polls Ponder GraphQL metrics and submits `recenter()` transactions to the LiquidityManager when price drift requires repositioning. +- **`payTax()` tracking** — monitors staking positions for overdue taxes and calls `payTax()` when it is profitable to do so. +- **Status endpoint** — exposes `GET /status` (port 43069) for operational health checks. + +txnBot starts in the third phase of the dev stack (after ponder) alongside webapp and landing. See [services/txnBot/AGENTS.md](../services/txnBot/AGENTS.md) for configuration, safety checklist, and debugging guidance. + ## Network Contexts Two network contexts are relevant: the dev-stack Anvil (docker-compose) and the backtesting tools that require Base mainnet.