Skip to content

Commit 402900b

Browse files
committed
chore: update dependencies and improve documentation
- implementation of Mileston 0 - Updated '@types/node' version from 22.15.0 to 22.15.2 across multiple packages in pnpm-lock.yaml. - Enhanced architecture diagram in architecture.md for better clarity and visual representation. - Added a new trade_log table in migrations/001_init.sql to track trade transactions. - Minor formatting changes in README.md and public/dev-journey/M0.mdx for improved readability.
1 parent 8a75118 commit 402900b

File tree

17 files changed

+146
-78
lines changed

17 files changed

+146
-78
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AlphaDrift
1+
****# AlphaDrift
22

33
HyperDrift‑grade, AI‑powered crypto‑trading bot
44

docs/architecture.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,34 @@
1010
---
1111
## 2 Macro Diagram
1212
```mermaid
13+
---
14+
config:
15+
look: classic
16+
layout: dagre
17+
theme: neo
18+
---
1319
flowchart TD
14-
subgraph Node_Core
15-
PP(ProviderPool) --> FS((FeatureStore))
16-
FS --> Sel(Selector)
17-
Sel --> St{{Strategy Lib}}
18-
St --> Exe(Execution Router)
19-
Exe --> RG(RiskGuard)
20-
St -.-> Idle(Idle Restake)
20+
subgraph Node_Core["Node_Core"]
21+
FS(("FeatureStore"))
22+
PP("ProviderPool")
23+
Sel("Selector")
24+
St{{"Strategy Lib"}}
25+
Exe("Execution Router")
26+
RG("RiskGuard")
27+
Idle("Idle Restake")
2128
end
22-
subgraph DriftBrain [Python ML side‑car]
23-
FS ==> Brn[/ /predict\n/train /]
29+
subgraph DriftBrain["Python ML side‑car"]
30+
Brn[/"/predict\n/train"/]
2431
end
25-
Exe --> ChainDEX((On‑chain))
26-
Exe --> RFQ((CEX RFQ))
27-
Brn ..> FS
32+
PP --> FS
33+
FS --> Sel
34+
Sel --> St
35+
St --> Exe
36+
Exe --> RG & ChainDEX(("On‑chain")) & RFQ(("CEX RFQ"))
37+
St -.-> Idle
38+
FS ==> Brn
39+
Brn --> FS
40+
2841
```
2942
*Solid lines* = synchronous calls. *Dashed* = event/idle hooks.
3043

migrations/001_init.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ SELECT time_bucket('5 minutes', ts) AS bucket,
1515
avg(funding8h) AS funding8h_ma_5m
1616
FROM feature_raw
1717
GROUP BY bucket;
18+
19+
CREATE TABLE IF NOT EXISTS trade_log (
20+
id SERIAL PRIMARY KEY,
21+
ts timestamptz NOT NULL,
22+
pair TEXT NOT NULL,
23+
side TEXT NOT NULL,
24+
notionalUSD NUMERIC NOT NULL,
25+
hash TEXT UNIQUE NOT NULL,
26+
tx_hash TEXT,
27+
status TEXT DEFAULT 'pending',
28+
created_at timestamptz DEFAULT now()
29+
);

0 commit comments

Comments
 (0)