dexbot 1.6.5 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -4
- package/README.md +104 -35
- package/analysis/README.md +11 -16
- package/analysis/account_resolver.ts +1 -11
- package/analysis/bot_usage/kibana_bot_queries.ts +1 -1
- package/analysis/chain_pool.ts +1 -1
- package/analysis/fills_source.ts +0 -6
- package/analysis/grid_correction_check.ts +20 -26
- package/analysis/resolve_source.ts +1 -1
- package/analysis/trade_profitability.ts +2 -5
- package/analysis/trend_detection/README.md +1 -3
- package/analysis/trend_detection/package.json +1 -1
- package/claw/package.json +1 -1
- package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
- package/claw/runtimes/openclaw-plugin/package.json +1 -1
- package/claw/tests/test_claw_mcp_transport.ts +2 -2
- package/dist/analysis/account_resolver.d.ts +1 -4
- package/dist/analysis/account_resolver.d.ts.map +1 -1
- package/dist/analysis/account_resolver.js +1 -1
- package/dist/analysis/account_resolver.js.map +1 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts +1 -2
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts.map +1 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.js +1 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.js.map +1 -1
- package/dist/analysis/chain_pool.d.ts +1 -3
- package/dist/analysis/chain_pool.d.ts.map +1 -1
- package/dist/analysis/chain_pool.js +1 -1
- package/dist/analysis/chain_pool.js.map +1 -1
- package/dist/analysis/fills_source.d.ts +1 -51
- package/dist/analysis/fills_source.d.ts.map +1 -1
- package/dist/analysis/fills_source.js +1 -1
- package/dist/analysis/fills_source.js.map +1 -1
- package/dist/analysis/grid_correction_check.d.ts +2 -3
- package/dist/analysis/grid_correction_check.d.ts.map +1 -1
- package/dist/analysis/grid_correction_check.js +18 -26
- package/dist/analysis/grid_correction_check.js.map +1 -1
- package/dist/analysis/resolve_source.d.ts +1 -1
- package/dist/analysis/resolve_source.d.ts.map +1 -1
- package/dist/analysis/trade_profitability.d.ts.map +1 -1
- package/dist/analysis/trade_profitability.js +2 -7
- package/dist/analysis/trade_profitability.js.map +1 -1
- package/dist/dexbot.d.ts.map +1 -1
- package/dist/dexbot.js +60 -74
- package/dist/dexbot.js.map +1 -1
- package/dist/market_adapter/core/kibana_candles.d.ts +1 -15
- package/dist/market_adapter/core/kibana_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_candles.js +1 -1
- package/dist/market_adapter/core/kibana_candles.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts +1 -35
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.js +10 -54
- package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
- package/dist/market_adapter/inputs/kibana_feed_source.d.ts +1 -8
- package/dist/market_adapter/inputs/kibana_feed_source.d.ts.map +1 -1
- package/dist/market_adapter/inputs/kibana_feed_source.js +1 -1
- package/dist/market_adapter/inputs/kibana_feed_source.js.map +1 -1
- package/dist/market_adapter/inputs/window_cache.d.ts +2 -63
- package/dist/market_adapter/inputs/window_cache.d.ts.map +1 -1
- package/dist/market_adapter/inputs/window_cache.js +22 -102
- package/dist/market_adapter/inputs/window_cache.js.map +1 -1
- package/dist/modules/account_bots.d.ts +16 -2
- package/dist/modules/account_bots.d.ts.map +1 -1
- package/dist/modules/account_bots.js +107 -44
- package/dist/modules/account_bots.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.js +0 -31
- package/dist/modules/bitshares-native/crypto/ecc.browser.js.map +1 -1
- package/dist/modules/credit_runtime.d.ts +0 -2
- package/dist/modules/credit_runtime.d.ts.map +1 -1
- package/dist/modules/credit_runtime.js +1 -10
- package/dist/modules/credit_runtime.js.map +1 -1
- package/dist/modules/dexbot_class.d.ts +13 -10
- package/dist/modules/dexbot_class.d.ts.map +1 -1
- package/dist/modules/dexbot_class.js +0 -9
- package/dist/modules/dexbot_class.js.map +1 -1
- package/dist/modules/dexbot_cow_runtime.d.ts +13 -0
- package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_cow_runtime.js +13 -1
- package/dist/modules/dexbot_cow_runtime.js.map +1 -1
- package/dist/modules/order/accounting.d.ts +4 -18
- package/dist/modules/order/accounting.d.ts.map +1 -1
- package/dist/modules/order/accounting.js +4 -34
- package/dist/modules/order/accounting.js.map +1 -1
- package/dist/modules/order/export.d.ts +9 -12
- package/dist/modules/order/export.d.ts.map +1 -1
- package/dist/modules/order/export.js +9 -12
- package/dist/modules/order/export.js.map +1 -1
- package/dist/modules/order/grid.d.ts +35 -40
- package/dist/modules/order/grid.d.ts.map +1 -1
- package/dist/modules/order/grid.js +43 -43
- package/dist/modules/order/grid.js.map +1 -1
- package/dist/modules/order/grid_reconcile.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile.js +111 -20
- package/dist/modules/order/grid_reconcile.js.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts +5 -3
- package/dist/modules/order/grid_reconcile_internal.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.js +18 -3
- package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
- package/dist/modules/order/manager.d.ts +0 -8
- package/dist/modules/order/manager.d.ts.map +1 -1
- package/dist/modules/order/manager.js +0 -10
- package/dist/modules/order/manager.js.map +1 -1
- package/dist/modules/order/utils/order.d.ts +22 -7
- package/dist/modules/order/utils/order.d.ts.map +1 -1
- package/dist/modules/order/utils/order.js +103 -21
- package/dist/modules/order/utils/order.js.map +1 -1
- package/dist/modules/order/utils/withPoolRef.d.ts +12 -0
- package/dist/modules/order/utils/withPoolRef.d.ts.map +1 -1
- package/dist/modules/order/utils/withPoolRef.js +17 -0
- package/dist/modules/order/utils/withPoolRef.js.map +1 -1
- package/dist/modules/order/working_grid.d.ts +8 -13
- package/dist/modules/order/working_grid.d.ts.map +1 -1
- package/dist/modules/order/working_grid.js +8 -29
- package/dist/modules/order/working_grid.js.map +1 -1
- package/dist/scripts/sync-version.js +0 -22
- package/dist/scripts/sync-version.js.map +1 -1
- package/dist/scripts/update_dist_freshness.d.ts +12 -0
- package/dist/scripts/update_dist_freshness.d.ts.map +1 -1
- package/dist/scripts/update_dist_freshness.js +30 -1
- package/dist/scripts/update_dist_freshness.js.map +1 -1
- package/docs/BITSHARES_ONBOARDING.md +9 -6
- package/docs/COW_INVARIANTS.md +1 -0
- package/docs/DEXBOT_COMPARISON.md +11 -11
- package/docs/EVOLUTION.md +8 -7
- package/docs/FUND_MOVEMENT_AND_ACCOUNTING.md +1 -1
- package/docs/GRID_PRICE_INVARIANT.md +518 -0
- package/docs/GRID_RECALCULATION.md +1 -1
- package/docs/GRID_RECONCILE.md +60 -39
- package/docs/ORDER_ENGINE_POST_1.0_RETROSPECTIVE.md +556 -0
- package/docs/README.md +3 -3
- package/docs/WORKFLOW.md +12 -6
- package/docs/architecture.md +40 -38
- package/docs/developer_guide.md +4 -8
- package/market_adapter/README.md +16 -12
- package/modules/README.md +1 -1
- package/package.json +7 -3
- package/scripts/README.md +0 -9
- package/scripts/reset-settings.sh +1 -1
- package/analysis/ama_fitting/package.json +0 -12
- package/analysis/analyze_derivatives.ts +0 -320
- package/analysis/derivative_chart_generator.ts +0 -874
- package/analysis/trend_detection/SIGNAL_DOCUMENTATION.md +0 -403
- package/analysis/trend_detection/derivative_analyzer.ts +0 -1059
- package/dist/analysis/analyze_derivatives.d.ts +0 -68
- package/dist/analysis/analyze_derivatives.d.ts.map +0 -1
- package/dist/analysis/analyze_derivatives.js +0 -287
- package/dist/analysis/analyze_derivatives.js.map +0 -1
- package/dist/analysis/derivative_chart_generator.d.ts +0 -12
- package/dist/analysis/derivative_chart_generator.d.ts.map +0 -1
- package/dist/analysis/derivative_chart_generator.js +0 -891
- package/dist/analysis/derivative_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts +0 -248
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.js +0 -910
- package/dist/analysis/trend_detection/derivative_analyzer.js.map +0 -1
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* 2. _cloneGrid(source) - Clone grid Map (internal)
|
|
29
29
|
* 3. _cloneOrder(order) - Clone single order object with metadata cloning (internal)
|
|
30
30
|
*
|
|
31
|
-
* GRID OPERATIONS (
|
|
31
|
+
* GRID OPERATIONS (5 methods)
|
|
32
32
|
* 4. get(id) - Get order by ID
|
|
33
33
|
* 5. set(id, order) - Set order and mark as modified
|
|
34
34
|
* 6. delete(id) - Delete order and mark as modified
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
* 14. getIndexes() - Get lazy-computed price/type/state indexes
|
|
48
48
|
*
|
|
49
49
|
* MODIFICATION TRACKING (1 method)
|
|
50
|
-
*
|
|
50
|
+
* 15. isModified() - Check if any modifications made
|
|
51
51
|
*
|
|
52
52
|
* SYNCHRONIZATION (1 method)
|
|
53
|
-
*
|
|
53
|
+
* 16. syncFromMaster(masterGrid, orderId, masterVersion) - Sync specific order from master
|
|
54
54
|
* Used when fills arrive during rebalancing
|
|
55
55
|
*
|
|
56
|
-
* STALENESS & DIAGNOSTICS (
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
56
|
+
* STALENESS & DIAGNOSTICS (4 methods)
|
|
57
|
+
* 17. markStale(reason) - Mark working grid as stale (version mismatch)
|
|
58
|
+
* 18. isStale() - Check if grid is stale
|
|
59
|
+
* 19. getStaleReason() - Get reason for staleness
|
|
60
|
+
* 20. getMemoryStats() - Get memory usage estimate
|
|
61
61
|
*
|
|
62
62
|
* ===============================================================================
|
|
63
63
|
*
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
* ===============================================================================
|
|
72
72
|
*/
|
|
73
73
|
import { buildDelta, buildIndexes } from './utils/order.js';
|
|
74
|
-
import { parseSlotIndex } from './utils/slot.js';
|
|
75
74
|
import { COW_PERFORMANCE } from '../constants.js';
|
|
76
75
|
class WorkingGrid {
|
|
77
76
|
grid;
|
|
@@ -180,26 +179,6 @@ class WorkingGrid {
|
|
|
180
179
|
}
|
|
181
180
|
return this._indexes;
|
|
182
181
|
}
|
|
183
|
-
/**
|
|
184
|
-
* Return slots sorted by slot-N (parseSlotIndex), price as tie-break.
|
|
185
|
-
* Mandated for strategy/validate deterministic ordering per determinism plan.
|
|
186
|
-
*/
|
|
187
|
-
getOrderedSlots() {
|
|
188
|
-
const slots = Array.from(this.grid.values());
|
|
189
|
-
return slots.sort((a, b) => {
|
|
190
|
-
const pa = parseSlotIndex(a?.id);
|
|
191
|
-
const pb = parseSlotIndex(b?.id);
|
|
192
|
-
const aOk = pa !== null && Number.isFinite(pa);
|
|
193
|
-
const bOk = pb !== null && Number.isFinite(pb);
|
|
194
|
-
if (aOk && bOk)
|
|
195
|
-
return pa - pb;
|
|
196
|
-
if (aOk)
|
|
197
|
-
return -1;
|
|
198
|
-
if (bOk)
|
|
199
|
-
return 1;
|
|
200
|
-
return Number(a?.price) - Number(b?.price);
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
182
|
/**
|
|
204
183
|
* Build delta actions from master grid
|
|
205
184
|
* @param {Map} masterGrid - Original master grid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"working_grid.js","sourceRoot":"","sources":["../../../modules/order/working_grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAIH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"working_grid.js","sourceRoot":"","sources":["../../../modules/order/working_grid.ts"],"names":[],"mappings":"AAAA;;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AC,OAAO,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACzB,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,kDAAkD;YAClD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;YACtD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACzB,CAAC;QAED,sEAAsE;QACtE,+DAA+D;QAC/D,IAAI,aAAa,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAC1D,IAAI,CAAC,WAAW,GAAG,aAAc,CAAC;QACtC,CAAC;IACL,CAAC;CACJ;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -66,28 +66,6 @@ const targets = [
|
|
|
66
66
|
return JSON.stringify(json, null, 2) + '\n';
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
-
{
|
|
70
|
-
file: 'analysis/ama_fitting/package.json',
|
|
71
|
-
update(content, version) {
|
|
72
|
-
const json = JSON.parse(content);
|
|
73
|
-
if (json.version === version)
|
|
74
|
-
return null;
|
|
75
|
-
json.version = version;
|
|
76
|
-
return JSON.stringify(json, null, 2) + '\n';
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
file: 'analysis/ama_fitting/package-lock.json',
|
|
81
|
-
update(content, version) {
|
|
82
|
-
const json = JSON.parse(content);
|
|
83
|
-
if (json.version === version && json.packages?.['']?.version === version)
|
|
84
|
-
return null;
|
|
85
|
-
json.version = version;
|
|
86
|
-
if (json.packages?.[''])
|
|
87
|
-
json.packages[''].version = version;
|
|
88
|
-
return JSON.stringify(json, null, 2) + '\n';
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
69
|
{
|
|
92
70
|
file: 'analysis/trend_detection/package.json',
|
|
93
71
|
update(content, version) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-version.js","sourceRoot":"","sources":["../../scripts/sync-version.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC;AAEhC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AACzF,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC;AAC1C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEnD,IAAI,CAAC,aAAa,EAAE,CAAC;IACnB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;AAClE,CAAC;AAOD,MAAM,OAAO,GAAa;IACxB,+DAA+D;IAC/D;QACE,IAAI,EAAE,mBAAmB;QACzB,MAAM,CAAC,OAAO,EAAE,OAAO;YACrB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACjC,IAAI,IAAI,CAAC,OAAO,KAAK,OAA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,CAAC;IACN,OAAO,CAAC,GAAG,CAAC,mCAAmC,aAAa,GAAG,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
export declare const REQUIRED_DIST_ENTRIES: string[];
|
|
12
12
|
/** Roots compiled by the root tsconfig.json (`include`), used to map sources to dist. */
|
|
13
13
|
export declare const COMPILED_SOURCE_ROOTS: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Relative directory prefixes the root `tsconfig.json` excludes from the
|
|
16
|
+
* production build. The freshness model must mirror the compiler: a source the
|
|
17
|
+
* build intentionally skips (e.g. tests compiled by `tsconfig.tests.json`) has
|
|
18
|
+
* no dist counterpart, and treating it as one makes the updater refuse a
|
|
19
|
+
* perfectly fresh bundle. Only plain directory paths are treated as prefixes;
|
|
20
|
+
* glob/negated patterns are ignored so this stays conservative and never
|
|
21
|
+
* over-excludes.
|
|
22
|
+
*
|
|
23
|
+
* @param root - Project root containing `tsconfig.json`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function readBuildExcludePrefixes(root: string): string[];
|
|
14
26
|
/**
|
|
15
27
|
* Collect every `.ts` file the root `tsconfig.json` compiles to `dist/<rel>.js`,
|
|
16
28
|
* skipping declaration-only files and nested `node_modules`. The mapping is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_dist_freshness.d.ts","sourceRoot":"","sources":["../../scripts/update_dist_freshness.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,UAQjC,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,UAAuD,CAAC;AAE1F;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"update_dist_freshness.d.ts","sourceRoot":"","sources":["../../scripts/update_dist_freshness.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,UAQjC,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,UAAuD,CAAC;AAE1F;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAa/D;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAgC3G;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAE/E;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAiB3G"}
|
|
@@ -21,6 +21,31 @@ export const REQUIRED_DIST_ENTRIES = [
|
|
|
21
21
|
];
|
|
22
22
|
/** Roots compiled by the root tsconfig.json (`include`), used to map sources to dist. */
|
|
23
23
|
export const COMPILED_SOURCE_ROOTS = ['modules', 'market_adapter', 'scripts', 'analysis'];
|
|
24
|
+
/**
|
|
25
|
+
* Relative directory prefixes the root `tsconfig.json` excludes from the
|
|
26
|
+
* production build. The freshness model must mirror the compiler: a source the
|
|
27
|
+
* build intentionally skips (e.g. tests compiled by `tsconfig.tests.json`) has
|
|
28
|
+
* no dist counterpart, and treating it as one makes the updater refuse a
|
|
29
|
+
* perfectly fresh bundle. Only plain directory paths are treated as prefixes;
|
|
30
|
+
* glob/negated patterns are ignored so this stays conservative and never
|
|
31
|
+
* over-excludes.
|
|
32
|
+
*
|
|
33
|
+
* @param root - Project root containing `tsconfig.json`.
|
|
34
|
+
*/
|
|
35
|
+
export function readBuildExcludePrefixes(root) {
|
|
36
|
+
try {
|
|
37
|
+
const raw = fs.readFileSync(path.join(root, 'tsconfig.json'), 'utf8');
|
|
38
|
+
const parsed = JSON.parse(raw);
|
|
39
|
+
const exclude = Array.isArray(parsed?.exclude) ? parsed.exclude : [];
|
|
40
|
+
return exclude
|
|
41
|
+
.filter((entry) => typeof entry === 'string' && !entry.includes('*') && !entry.startsWith('!'))
|
|
42
|
+
.map((entry) => entry.replace(/\\/g, '/').replace(/\/+$/, ''))
|
|
43
|
+
.filter(Boolean);
|
|
44
|
+
}
|
|
45
|
+
catch (_) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
24
49
|
/**
|
|
25
50
|
* Collect every `.ts` file the root `tsconfig.json` compiles to `dist/<rel>.js`,
|
|
26
51
|
* skipping declaration-only files and nested `node_modules`. The mapping is
|
|
@@ -31,7 +56,11 @@ export const COMPILED_SOURCE_ROOTS = ['modules', 'market_adapter', 'scripts', 'a
|
|
|
31
56
|
*/
|
|
32
57
|
export function collectCompiledSources(root, buildDir) {
|
|
33
58
|
const out = [];
|
|
59
|
+
const excluded = readBuildExcludePrefixes(root);
|
|
60
|
+
const isExcluded = (rel) => excluded.some((prefix) => rel === prefix || rel.startsWith(`${prefix}/`));
|
|
34
61
|
const add = (src, rel) => {
|
|
62
|
+
if (isExcluded(rel))
|
|
63
|
+
return;
|
|
35
64
|
out.push({ src, dist: path.join(root, buildDir, rel.replace(/\.ts$/, '.js')) });
|
|
36
65
|
};
|
|
37
66
|
const walk = (dir, rel) => {
|
|
@@ -45,7 +74,7 @@ export function collectCompiledSources(root, buildDir) {
|
|
|
45
74
|
for (const entry of entries) {
|
|
46
75
|
const childRel = rel ? `${rel}/${entry.name}` : entry.name;
|
|
47
76
|
if (entry.isDirectory()) {
|
|
48
|
-
if (entry.name !== 'node_modules')
|
|
77
|
+
if (entry.name !== 'node_modules' && !isExcluded(childRel))
|
|
49
78
|
walk(path.join(dir, entry.name), childRel);
|
|
50
79
|
}
|
|
51
80
|
else if (entry.isFile() && entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_dist_freshness.js","sourceRoot":"","sources":["../../scripts/update_dist_freshness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;GAQG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,WAAW;IACX,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,sBAAsB;IACtB,yBAAyB;IACzB,mBAAmB;CACtB,CAAC;AAEF,yFAAyF;AACzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAE1F;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY,EAAE,QAAgB;IACjE,MAAM,GAAG,GAAyC,EAAE,CAAC;IACrD,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;QACrC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACpF,CAAC,CAAC;IACF,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;QACtC,IAAI,OAAO,GAA+B,EAAE,CAAC;QAC7C,IAAI,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC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QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YACzC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;QACrF,CAAC;QACD,IAAI,OAAgC,CAAC;QACrC,IAAI,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,SAAS;QAAC,CAAC;QACvD,IAAI,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;YACrC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;QACvF,CAAC;IACL,CAAC;IACD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -287,9 +287,6 @@ The only things worth tuning later:
|
|
|
287
287
|
`{ "sell": 1.0, "buy": 1.0 }` for your first bot.
|
|
288
288
|
- `minPrice` / `maxPrice` — grid bounds. Once AMA is active, tighten them
|
|
289
289
|
around the market's maximum expected volatility instead of a wide range.
|
|
290
|
-
- `gridPrice` — set it to `"ama"` so the market adapter centers the grid on the
|
|
291
|
-
AMA signal (`"ama"` uses the pair's default preset; `"ama1"`–`"ama4"` pin a
|
|
292
|
-
specific one, fastest to slowest).
|
|
293
290
|
|
|
294
291
|
See the "Recommended Bot Setup" section of the
|
|
295
292
|
[README](../README.md#recommended-bot-setup).
|
|
@@ -310,9 +307,15 @@ saves, so you always know whether anything else is needed.
|
|
|
310
307
|
|
|
311
308
|
### Activate the market adapter
|
|
312
309
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
New bots anchor on `gridPrice: "ama3"`, but AMA pricing only goes live once
|
|
311
|
+
the per-bot adapter `Price` flag is on: run `dexbot bot`, choose
|
|
312
|
+
`2) Modify bot`, pick the bot, then `6) Adapter` and set **Price** to yes
|
|
313
|
+
(`y` / `yes` / `true` all count; Enter keeps the current value). Without it
|
|
314
|
+
the adapter still computes state but live output stays in dry-run.
|
|
315
|
+
|
|
316
|
+
To change how closely the grid center tracks the market, set `gridPrice` in
|
|
317
|
+
`3) Price`: `"ama1"` reacts fastest, `"ama4"` is the slowest and steadiest
|
|
318
|
+
(higher numbers smooth more), and `"ama"` uses the pair's default preset.
|
|
316
319
|
|
|
317
320
|
The three flags are stored per bot in `profiles/market_adapter_whitelist.json`:
|
|
318
321
|
|
package/docs/COW_INVARIANTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# DEXBot vs DEXBot2 — Detailed Comparison Report
|
|
2
2
|
|
|
3
3
|
> **Date:** 2026-09-02 *(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.6.
|
|
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.6.6).
|
|
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.6.
|
|
39
|
+
| **Release Track** | 1.0.0 | v1.6.6 |
|
|
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-09-02 |
|
|
@@ -140,7 +140,7 @@ DEXBot brings a full Python desktop GUI and a strategy plugin model. DEXBot2 is
|
|
|
140
140
|
|
|
141
141
|
- **Four specialized engines** (Accountant, StrategyEngine, Grid, SyncEngine) coordinate through OrderManager
|
|
142
142
|
- **Copy-on-Write** grid: planning happens on isolated `WorkingGrid`; committed atomically or discarded on failure
|
|
143
|
-
- **Targeted fill subscription** via `set_subscribe_callback` → `get_account_history_operations` filtered for `OP_FILL_ORDER` fill operations; push-triggered
|
|
143
|
+
- **Targeted fill subscription** via `set_subscribe_callback` → `get_account_history_operations` filtered for `OP_FILL_ORDER` fill operations; push-triggered gap-slot batching (a unified batch contains at most `gapSlots + 1` fills)
|
|
144
144
|
- **Market Adapter**: AMA-based price tracking, dynamic buy/sell weighting, Kalman confirmation, ATR/regime dampening, asymmetric grid bounds, and configurable delta triggers
|
|
145
145
|
- **`fund_registry.ts`**: shared-account fund registry — tracks per-account, per-bot fund and collateral allocations; pre-registered atomically at startup so all bots sharing an account see a consistent proportional split before any bot starts; cross-bot invariant enforcement
|
|
146
146
|
- **Bot keys**: deterministic name-derived key (`sanitizeKey(name)`) with uniqueness enforced at all write paths — eliminates name-collision risk across restarts and config reorders
|
|
@@ -208,8 +208,8 @@ DEXBot brings a full Python desktop GUI and a strategy plugin model. DEXBot2 is
|
|
|
208
208
|
- **Fixed reference boundary** divides BUY zone (below) from SELL zone (above)
|
|
209
209
|
- **Dynamic spread gap** around market price (configurable `targetSpreadPercent`)
|
|
210
210
|
- On fill: grid **crawls** — boundary shifts, slots reassign roles, new orders placed
|
|
211
|
-
- **Partial fill
|
|
212
|
-
- **
|
|
211
|
+
- **Partial fill handling**: immediate on-chain dust cancellation plus fund-driven correction of surviving non-dust partials
|
|
212
|
+
- **Gap-slot fill batching**: `1..gapSlots+1` fills per unified batch; deeper queues are chunked at `gapSlots+1`
|
|
213
213
|
- **Replay-safe fill dedupe**: processed-fill persistence prevents duplicate accounting after restarts or resyncs
|
|
214
214
|
- **Dynamic weighting**: AMA slope, Kalman confirmation, ATR volatility, and regime gates can bias buy/sell allocation without changing the core grid model
|
|
215
215
|
- **Asymmetric range scaling**: trend diagnostics can tilt grid bounds during recalculation, giving the grid more room in the direction of movement
|
|
@@ -326,7 +326,7 @@ workers:
|
|
|
326
326
|
### DEXBot2
|
|
327
327
|
|
|
328
328
|
- **Format:** JSON (`profiles/bots.json`, `profiles/general.settings.json`)
|
|
329
|
-
- **No GUI wizard** —
|
|
329
|
+
- **No GUI wizard** — interactive `dexbot bot` menu editor for main settings; advanced keys edited directly in JSON
|
|
330
330
|
- **~27 configuration objects** in `modules/constants.ts`, frozen via `Object.freeze` (loaded at startup)
|
|
331
331
|
- Runtime parameters via environment variables (`RUN_LOOP_MS`, `BOT_NAME`, launcher/daemon settings, etc.)
|
|
332
332
|
- `profiles/general.settings.json` for global timing/limits/node settings
|
|
@@ -357,7 +357,7 @@ workers:
|
|
|
357
357
|
| Feature | DEXBot | DEXBot2 |
|
|
358
358
|
|---|---|---|
|
|
359
359
|
| **Format** | YAML | JSON |
|
|
360
|
-
| **Interactive Setup** | Yes (whiptail + PyQt5 GUI) |
|
|
360
|
+
| **Interactive Setup** | Yes (whiptail + PyQt5 GUI) | Yes (`dexbot bot` menu editor) |
|
|
361
361
|
| **Key Encryption** | No (file-system only) | Yes (AES-256-GCM) |
|
|
362
362
|
| **Multi-bot in one config** | Yes (YAML array) | Yes (JSON array) |
|
|
363
363
|
| **Runtime overrides** | Env vars (limited) | Env vars (full) |
|
|
@@ -508,7 +508,7 @@ Where:
|
|
|
508
508
|
| Feature | DEXBot | DEXBot2 |
|
|
509
509
|
|---|---|---|
|
|
510
510
|
| **Desktop GUI** | Yes (PyQt5) | No |
|
|
511
|
-
| **Interactive Config Wizard** | Yes (GUI + whiptail) | No |
|
|
511
|
+
| **Interactive Config Wizard** | Yes (GUI + whiptail) | No (menu-driven editor, not a guided wizard) |
|
|
512
512
|
| **CLI** | Yes (Click) | Yes (custom) |
|
|
513
513
|
| **Real-time Status** | GUI view | `unlock status` / `dexbot stat` + log tailing |
|
|
514
514
|
| **Automation Surface** | Plugin/strategy hooks | Claw modules, scripts, and runtime helpers |
|
|
@@ -754,7 +754,7 @@ Where:
|
|
|
754
754
|
- Single hardcoded core strategy (boundary-crawl grid)
|
|
755
755
|
- Extending core trading behavior requires modifying runtime modules
|
|
756
756
|
- Market adapter (`market_adapter/`) provides real-time signal-driven parameter tuning: AMA center, dynamic weights, Kalman confirmation, ATR/regime dampening, and asymmetric bounds
|
|
757
|
-
- `analysis/` tools provide AMA fitting, dynamic-weight research,
|
|
757
|
+
- `analysis/` tools provide AMA fitting, dynamic-weight research, Kalman signal research, volatility/regime analysis, bot-parameter sweeps, bot-activity queries (`bot_usage/`), and FIFO-based trade PnL analysis (`trade_profitability.ts`)
|
|
758
758
|
- `claw/` exposes a separate automation and AI-consumption layer: profile reading, chain queries/actions, short MPA workflows, position health, runtime manifests, and skill/plugin artifacts
|
|
759
759
|
|
|
760
760
|
### Extensibility Comparison
|
|
@@ -776,7 +776,7 @@ Where:
|
|
|
776
776
|
|
|
777
777
|
| Metric | DEXBot | DEXBot2 |
|
|
778
778
|
|---|---|---|
|
|
779
|
-
| **Release Track** | 1.0.0 | v1.6.
|
|
779
|
+
| **Release Track** | 1.0.0 | v1.6.6 |
|
|
780
780
|
| **Active Since** | ~2018 | December 2025 |
|
|
781
781
|
| **Last Commit** | May 23, 2020 | 2026-09-02 |
|
|
782
782
|
| **Total Commits** | 2281 | 2,125 (v1.4.25) |
|
|
@@ -863,7 +863,7 @@ The 500× figure is not theoretical: it materializes in production when higher o
|
|
|
863
863
|
- **Single core strategy** — no runtime-swappable plugin system, but the boundary-crawl grid is deeply engineered with AMA/Kalman/ATR/regime adaptive signals, making it far more capable and configurable than DEXBot's individual strategies
|
|
864
864
|
- No GUI — requires CLI proficiency
|
|
865
865
|
- No DEXBot-style external CEX price-feed strategy support
|
|
866
|
-
-
|
|
866
|
+
- Advanced bot keys (`debtPolicy`, `creditOnly`, `min_BTS_value`) require manual JSON editing; main settings are interactive via `dexbot bot`
|
|
867
867
|
- Backtesting/research exists under `analysis/`, but it is not a polished end-user backtesting product
|
|
868
868
|
- No community/plugin ecosystem
|
|
869
869
|
- Heavy documentation suggests significant learning curve for contributors
|
package/docs/EVOLUTION.md
CHANGED
|
@@ -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.6.
|
|
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.6.6 stable release.
|
|
6
6
|
|
|
7
7
|
### Key Milestones
|
|
8
8
|
- **Project Inception**: December 2, 2025
|
|
9
|
-
- **Growth Phase**: 2,
|
|
9
|
+
- **Growth Phase**: 2,277 commits over ~9 active months
|
|
10
10
|
- **Code Maturity**: Evolution from basic utilities to a ~100,000+ LoC intelligent TypeScript system
|
|
11
|
-
- **Stability**: Progression from manual testing to a suite of
|
|
12
|
-
- **Releases**:
|
|
11
|
+
- **Stability**: Progression from manual testing to a suite of 297 automated test files
|
|
12
|
+
- **Releases**: 138 version entries in the changelog (v0.1.0 to v1.6.6)
|
|
13
13
|
|
|
14
14
|
> **Post-1.0.0 "why":** the thematic story behind the hardening releases — root cause, recurring
|
|
15
15
|
> bug families, and lessons — lives in
|
|
@@ -163,11 +163,12 @@ Compact, era-level view. Per-release detail lives in [CHANGELOG.md](../CHANGELOG
|
|
|
163
163
|
| v1.6.0 → v1.6.3 | 12 | Never-run-stale hardening, whitelist range-scaling opt-in, grid-price invariant, shard candle cache, correction-queue staleness, final pre-broadcast pivot gate |
|
|
164
164
|
| v1.6.3 → v1.6.4 | 18 | Fund-driven spread correction, gapSlots+1 batch cap, VIRTUAL RMS divergence, sync-lock log fix, invariant-doc contract, analysis shared modules, window-aware profitability annualisation, portable chart exports, range-threshold restore, dead-code purge, doc consolidation |
|
|
165
165
|
| v1.6.4 → v1.6.5 | 15 | Editor-managed whitelist flags + legacy generator removal, centralized bot defaults/settings docs, log-symmetric range-scaling tilt, AMA gridPrice default + unset → startPrice normalization, Pool default/warn-color cues, Grid Health AMA-slope Δ knob, dynamic-weight chart CLI, update dist-freshness self-heal, launcher worker rename, RMS log tagging |
|
|
166
|
+
| v1.6.5 → v1.6.6 | 13 | Stale-cancellation guard hardening (live ownership, per-plan startup revalidation, COW orphan protection, settlement safety), editor label/menu realignment + colored bot list, grouped CLI help, poolRef aliases + startPrice priority, legacy SMA/MACD/RSI analyzer archived, run-relative candle-cache migration dropped, update dist-freshness tsconfig-exclude fix |
|
|
166
167
|
|
|
167
168
|
---
|
|
168
169
|
|
|
169
170
|
**Report Originally Generated**: February 19, 2026
|
|
170
|
-
**Last Updated**: September
|
|
171
|
-
**Total Commits**: 2,
|
|
172
|
-
**Date Range**: December 2, 2025 – September
|
|
171
|
+
**Last Updated**: September 25, 2026
|
|
172
|
+
**Total Commits**: 2,277
|
|
173
|
+
**Date Range**: December 2, 2025 – September 25, 2026
|
|
173
174
|
**Repository**: DEXBot2 (BitShares DEX Trading Bot)
|
|
@@ -801,4 +801,4 @@ To prevent "Time-of-Check to Time-of-Use" errors:
|
|
|
801
801
|
**TOCTOU protection in `processFillAccounting`.** `_buildBtsDeferredRefundAdjustment` reads `btsFeeState` from `mgr.orders` while the order lock is held — the lock is acquired before accounting runs, and the POST-RESET and BOOTSTRAP tracked-fill accounting paths follow the same locking pattern.
|
|
802
802
|
|
|
803
803
|
---
|
|
804
|
-
*Technical Reference for DEXBot2 v1.6.
|
|
804
|
+
*Technical Reference for DEXBot2 v1.6.6 release*
|