You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Fixes
- modules/launcher/market_adapter_runtime.ts: change stdio from 'inherit' to 'ignore'
to stop market adapter logs from duplicating into dexbot.log (missed second spawn
path — watchdog was fixed in v1.0.3).
- modules/dexbot_class.ts: secondary pending-broadcasts deadlock fix at
_updateOrdersOnChainBatchCOW (missed call site from f5e4340).
## Docs
- docs/COW_INVARIANTS.md: comprehensive system invariants expansion with categorized
prefixes across all subsystems (sync engine, maintenance, grid, reconcile, batch,
fund registry, subscriptions).
## Chore
- Version bumped to 1.0.8 across all manifests.
## Testing
- npx tsc --noEmit: passes
- 1677 total commits
-**Fix**: prevent deadlock in secondary pending-broadcasts recovery path — second call site at `_updateOrdersOnChainBatchCOW` (line 3851) passed `fillLockAlreadyHeld: true` flag to `_reconcileAfterUncertainBroadcast`, fixing a missed deadlock path that fired when a CREATE batch was rejected due to prior pending broadcasts (`f5e4340e`).
10
+
-**Fix**: market adapter log duplication in shared runtime — the in-process `market_adapter_runtime.ts` used `stdio: 'inherit'`, piping all child stdout into dexbot.log. Changed to `'ignore'` to match the watchdog fix from v1.0.3.
11
+
-**Fix**: bot key resolution — extract shared bot key utils into `analysis/bot_key_utils.ts`, fix `roundTo` ReferenceError in browser-side chart JS, add `--use-cached` flag (later removed), add 20 tests (`e440cb3a`).
12
+
-**Fix**: remove `--use-cached` flag — always resolve to candle cache from `--source market_adapter`; removed centers-file fallback with no useful history data (`7eee1ac9`).
13
+
-**Docs**: comprehensive system invariants expansion — `docs/COW_INVARIANTS.md` rewritten with full coverage for COW pipeline, sync engine, maintenance runtime, grid structure, reconcile, batch/pipeline, fund registry, and subscriptions. All invariants now carry categorized prefixes (`INV-COW`, `INV-SYNC`, `INV-MAINT`, etc.).
14
+
-**Chore**: version bumped to 1.0.8 across all manifests.
- When an unmatched order is within `looseTolerance` of an active grid order, it must be cancelled on chain via `_cancelChainOrder` with `releaseUntrackedFunds: true`.
177
173
- Cancelled IDs are filtered out of `unmatchedParsed` to prevent reprocessing.
178
174
- No size guard — any duplicate at the same price is a violation.
179
175
-`SUSPECTED_DUPLICATE_TOLERANCE_FLOOR` (absolute price floor) is removed — only `tolerance * SUSPECTED_DUPLICATE_TOLERANCE_MULTIPLIER` is used.
180
176
181
-
-`INV-RECON-002` Rebalance must not convert on-chain slots to SPREAD via CREATE
177
+
-`INV-RECON-004` Rebalance must not convert on-chain slots to SPREAD via CREATE
182
178
-`performSafeRebalance` must not emit `CREATE` actions that convert existing on-chain slots into SPREAD orders.
183
179
- On-chain mid-slot must keep its BUY/SELL type before commit.
184
180
185
-
-`INV-RECON-003` Extreme placement ordering
181
+
-`INV-RECON-005` Extreme placement ordering
186
182
- BUY placements must use nearest available free slots first (ascending price).
187
183
- SELL placements must use nearest available free slots first (descending price).
188
184
@@ -214,18 +210,6 @@ This document defines the non-negotiable behavioral invariants for the DEXBot2 s
214
210
215
211
---
216
212
217
-
## Pipeline Signals
218
-
219
-
-`INV-PIPE-001` Stale correction entry removal
220
-
-`correctOrderPriceOnChain` must remove the entry from `ordersNeedingPriceCorrection` in ALL exit paths: success, skip (updateOrder returns null), and error.
221
-
- Use `try`/`catch`/`finally` with `.filter()` removal only in `finally`.
-`updateGridFromBlockchainSnapshot` called from `applyGridDivergenceCorrections` must be wrapped in try/catch that clears `_gridSidesUpdated` on failure.
225
-
- A throw must not leave `_gridSidesUpdated` permanently set, which would block the next tick.
@@ -277,134 +261,9 @@ This document defines the non-negotiable behavioral invariants for the DEXBot2 s
277
261
-`_reconcileAfterUncertainBroadcast` must pass `fillLockAlreadyHeld=true` because `_fillProcessingLock` is already held by the fill-processing call chain.
278
262
- AsyncLock is not reentrant; a second `acquire()` would queue forever.
279
263
280
-
---
281
-
282
-
## Constants & Precision
283
-
284
-
-`INV-CONST-001` All magic numbers centralized in `constants.ts`
285
-
- Hardcoded fallbacks in runtime code are prohibited.
286
-
- Every timing value, limit, and threshold must have a named constant.
287
-
288
-
-`INV-PREC-001` Precision helpers throw on invalid precision
289
-
-`formatAmountByPrecision` and `formatSizeByOrderType` must throw when precision is undefined.
290
-
- Silent fallback to `DEFAULT_ASSET_PRECISION (8)` is prohibited.
291
-
-`floatToBlockchainInt` throws on undefined precision — callers must guarantee precision is available before calling.
-**Sync Engine**: does not reintroduce `newSizeInt <= 0` fast-path (`INV-SYNC-001`); does not add TTL-based refetch (`INV-SYNC-002`); orphan adoption checks price-level uniqueness (`INV-SYNC-004`).
400
-
-**Maintenance**: pipeline signals are passed to `isPipelineEmpty` (`INV-MAINT-001`); illegal-state abort arms cooldown (`INV-MAINT-002/003`).
401
-
-**Reconcile**: duplicate chain orders at same price are cancelled unconditionally (`INV-RECON-001`); no CREATE-based spread conversion of on-chain slots (`INV-RECON-002`).
402
-
-**Batch**: stale-only cancel uses fast path without recovery sync (`INV-BATCH-002`); "cannot deduct" triggers sync, not virtualization (`INV-BATCH-003`).
Copy file name to clipboardExpand all lines: docs/DEXBOT_COMPARISON.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# DEXBot vs DEXBot2 — Detailed Comparison Report
2
2
3
3
> **Date:** 2026-06-16 *(metrics refreshed against local source trees)*
4
-
> **Scope:** Full architectural, functional, and operational comparison between the original [DEXBot](https://github.com/Codaone/DEXBot) (Python, v1.0.0) and DEXBot2 (TypeScript, v1.0.7).
4
+
> **Scope:** Full architectural, functional, and operational comparison between the original [DEXBot](https://github.com/Codaone/DEXBot) (Python, v1.0.0) and DEXBot2 (TypeScript, v1.0.8).
5
5
> **Audience:** Developers, contributors, and operators evaluating or migrating between the two projects.
6
6
7
7
---
@@ -36,7 +36,7 @@
36
36
37
37
| Attribute | DEXBot (original) | DEXBot2 |
38
38
|---|---|---|
39
-
|**Release Track**| 1.0.0 | v1.0.7|
39
+
|**Release Track**| 1.0.0 | v1.0.8|
40
40
|**Language**| Python 3.6+ | TypeScript 5.x |
41
41
|**Status**| Released 1.0.0, unmaintained | Active development |
42
42
|**Last Repo Activity**| May 23, 2020 | 2026-06-25 |
@@ -774,7 +774,7 @@ Where:
774
774
775
775
| Metric | DEXBot | DEXBot2 |
776
776
|---|---|---|
777
-
| **Release Track** | 1.0.0 | v1.0.7 |
777
+
| **Release Track** | 1.0.0 | v1.0.8 |
778
778
| **Active Since** | ~2018 | December 2025 |
779
779
| **Last Commit** | May 23, 2020 | 2026-06-25 |
780
780
| **Total Commits** | 2281 | 1659 at current HEAD |
Copy file name to clipboardExpand all lines: docs/EVOLUTION.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
3
3
## Executive Summary
4
4
5
-
DEXBot2 is a sophisticated decentralized exchange trading bot for the BitShares blockchain. This report documents the complete evolution of the project from its inception in December 2025 through the current 1.0.7 stable release.
5
+
DEXBot2 is a sophisticated decentralized exchange trading bot for the BitShares blockchain. This report documents the complete evolution of the project from its inception in December 2025 through the current 1.0.8 stable release.
6
6
7
7
### Key Milestones
8
8
-**Project Inception**: December 2, 2025
9
9
-**Growth Phase**: 1,670+ commits over ~7 active months
10
10
-**Code Maturity**: Evolution from basic utilities to a ~58,000+ LoC intelligent TypeScript system
11
11
-**Stability**: Progression from manual testing to a suite of 200+ automated test files
12
-
-**Releases**: 42 release entries (v0.1.0 to v1.0.7)
12
+
-**Releases**: 43 release entries (v0.1.0 to v1.0.8)
13
13
14
14
---
15
15
@@ -66,6 +66,10 @@ Consolidated the market adapter with split data sources (Kibana, native API), AM
66
66
67
67
**Jun 25**: DAEMON_ERRORS retry-path fix — `DaemonKeyStore` session-expiry retry never fired due to locally-hardcoded mismatch with canonical constants. Canonical error-code hardening — `DAEMON_CODES` added to `constants.ts` for `BROADCAST_DEADLINE`/`CREDENTIAL_DAEMON_UNAVAILABLE`, `MasterPasswordError.code` static property, replacing 12+ literal sites with single-source-of-truth references.
0 commit comments