The Loop in Three Dimensions
Pulses are social signals flowing around the pipeline. Green pulses survive each gate; pink ones get rejected. Drag to rotate. Tighten the confidence threshold and watch throughput — and the simulated stats — change.
rejected signal
Five Stations, One Cycle
Signal ingestion
Streams of posts, prices and volume arrive via webhooks and scheduled fetches. Serverless cron triggers replace the "laptop that must never sleep."
Sentiment scoring
An LLM classifies each batch: bullish/bearish, confidence, novelty. Crucially, it also detects sarcasm, bots and recycled rumors — the noise that keyword systems swallow whole.
Strategy decision
Scores meet rules: only act above a confidence threshold, only on liquid assets, only within budget. This is where the slider above lives in real systems.
Risk gate
Hard-coded, non-LLM checks: max position size, max daily loss, cooldowns, kill switch. The one stage that should never be "intelligent" — it must be boringly deterministic.
Execution & ledger
Orders go to an exchange API; every decision and outcome is logged. The ledger feeds evaluation: without it you cannot tell luck from skill.
Why Serverless Instead of Your Laptop
Uptime is alpha
Sentiment moves at 3 a.m. A Workers cron fires every minute globally; a laptop loses Wi-Fi, sleeps, or updates itself at the worst moment.
Cost scales with events, not hours
Serverless bills per invocation. A bot that evaluates 400 signals/day uses seconds of compute — pennies, versus a $20+/month idle VPS.
State needs care
Workers are stateless; positions and cooldowns must live in durable storage (KV, D1, Durable Objects). Designing that state model is 80% of the real engineering.
Worked example
400 signals/day at a 70% confidence bar with a base 15% pass rate ≈ 18 trades. At $250/trade and 0.1% taker fees, that is $4.50/day in fees — your strategy must clear ~1.8% monthly just to pay the exchange. Fees quietly decide which strategies can exist.
The Part the Threads Skip
Most sentiment bots lose money. Social signals are crowded, latency-sensitive and adversarial — accounts exist specifically to bait bots into pumps. LLMs add judgment but also new failure modes: prompt drift, hallucinated tickers, stale context.
Treat projects like this as what the builders say they are: a learning harness for the full loop — paper-trade it, log everything, and study your own decision quality. Never connect real funds you cannot afford to lose, and remember nothing here is financial advice.