HYPE
An event-driven trading system that reacts in real time — and refuses to lose control.
Performance
EquityLeaders○ Paper● LiveWin rate
88%
Closed trades
289
Pre-trade checks
8
Config keys
72
Drag to pan · scroll to zoom the time range
A single-user, real-time copy-trading system for Solana. It streams trader activity over WebSockets, screens every token with parallel risk checks, executes and manages its own exits, and runs behind a secured PyQt6 dashboard and Telegram bot.
- lines of Python
- 13,927
79 files, built against a written spec
- pre-trade checks
- 8
run concurrently before any money moves
- live services
- 6
Birdeye · Helius · Jupiter · DexScreener · RugCheck · Telegram
- win rate
- 88%
289 closed trades in one live session
The problem
On-chain markets move in seconds and are full of traps. The hard part isn’t placing a trade — it’s reacting instantly, saying no to the dangerous ones, and never losing control of the money.
01Overview
Personal project · trades only its owner’s funds · not financial advice
One engine. Six live services. Zero manual steps.
HYPE ranks the most profitable trader wallets on Solana, subscribes to all of them over one WebSocket, and parses every transaction as it lands. When a followed trader buys, HYPE screens the token, sizes a position under hard risk limits, executes the swap itself, and manages the exit on its own — take-profit, stop-loss and trailing stop.
It was built paper-trading-first from a written design spec: the simulator and the live executor share the same engine, sizing and position manager. Only the executor is swapped.
02Architecture
An event pipeline, from signal to exit.
Every stage is a separate module behind a small interface, so the paper and live paths differ by exactly one component.
REST
Ranker
Birdeye · top wallets by realized PnL
SQLite
Followed wallets
eligibility + activity prune
Helius WS
Live monitor
one WebSocket, logsSubscribe
asyncio
Parse worker
queue · de-dup · buy detection
thread pool
Risk engine
8 checks in parallel
Sizing
10% equity · caps · gas reserve
one interface
Executor
paper | live → Jupiter
every 5 s
Position manager
TP · SL · trailing stop
persistence
SQLite
WAL · 7 tables
Dashboard
PyQt6 · 6 tabs
Telegram
owner-only control
Investigation
trader state machine
03Results
88% of trades closed green.
One live session, as recorded by HYPE’s own Performance tab: 289 closed trades, realized equity climbing as a staircase that only moves when a position closes. Small balance, real execution.
88%
Win rate
289 closed trades · one live session
Recreated from the Performance tab. Past results say nothing about future ones.
04Risk engine
Eight checks before any money moves.
Read-only checks run concurrently in a thread pool — one shared report fetch feeds several of them. Every rejection is logged with a human-readable reason.
- 01
Mint authority revoked
Nobody can print more of the token. On-chain, via Helius.
- 02
Freeze authority revoked
Nobody can freeze your balance. On-chain, via Helius.
- 03
Minimum liquidity
At least $30k in the pool, from DexScreener.
- 04
Holder concentration
Top-10 holders under 65% — and it scales size, TP and SL.
- 05
Sellability
A reverse $100 quote must exit with ≤ 30% price impact. Catches honeypots.
- 06
Token age
Optional minimum age from the pair’s creation time.
- 07
RugCheck verdict
No risk flagged at “danger” level.
- 08
LP locked
Liquidity must not be flagged unlocked, and the token not already rugged.
05Concurrency
A UI thread, an engine thread, and an event loop that never blocks.
The engine runs on its own thread with a dedicated asyncio loop and three tasks. Blocking work goes to threads; exits are sold concurrently; cross-thread UI updates travel only as queued Qt signals.
Qt main thread
UI · queued signals only
asyncio · monitor
WebSocket read loop → queue
asyncio · manage
TP / SL / trailing, every 5 s
asyncio · heartbeat
liveness beat, every 5 s
worker threads
to_thread · gather(exits)
watchdog · QTimer
every 20 s: alive? beat < 90 s? loop < 240 s?
Schematic of the concurrency model — lanes and cadences from the source; block positions illustrative.
06Reliability
Designed for the failure at 3 a.m.
Reconnect with backoff
WebSocket drops reconnect at 1 s, doubling to a 30 s cap — and reset after a clean session.
Stale-feed detection
No message for 90 s means the feed is silently dead: reconnect and re-subscribe.
Bounded de-duplication
A 5,000-signature ordered set drops repeats across commitment levels without growing forever.
Watchdog
Every 20 s: restart the engine if it died, its heartbeat is 90 s stale, or the manage loop hung for 240 s.
Pre-signed exits
Exit transactions for open positions are pre-built and signed, saving ~300–500 ms when a stop fires.
Honest accounting
Fills are read back from the confirmed transaction — never assumed — and real fees are back-filled.
07Security
Keys that never touch disk. Funds with one way out.
Keychain + Touch ID
Every secret lives in the macOS Keychain; the wallet key needs Touch ID or the account password to read.
One outbound path
A single transfer function, to a single allowlisted home wallet. There is no code path to send funds anywhere else.
Three-factor changes
Changing the home wallet takes password, Touch ID and a secret nickname — config writes that skip this path raise an error.
Salted scrypt
Owner credentials are scrypt verifiers compared in constant time.
Panic drain
One gated action sells every position and sweeps SOL home, with the transfer simulated before broadcast.
Owner-only Telegram
The bot answers exactly one linked chat. Everyone else is refused.
08In numbers
- typed config keys
- 72
Pydantic-validated, live-editable
- SQLite tables
- 7
WAL mode, concurrent readers
- dashboard tabs
- 6
plus Telegram remote control
- asyncio tasks
- 3
monitor · manage · heartbeat
09Interface
A desktop cockpit for a system that runs itself.
Positions with live P&L, a realized-equity chart with a marker for every buy and exit, trader leaderboards, every threshold live-editable, a filterable activity log, and a system panel with service health lights.
Performance
EquityLeaders○ Paper● LiveWin rate
88%
Closed trades
289
Pre-trade checks
8
Config keys
72
Drag to pan · scroll to zoom the time range
10From the source
Resilience you can read.
backoff = 1
try:
while not self._stop.is_set():
try:
await self._session()
backoff = 1 # clean exit -> reset backoff
except Exception as e: # noqa: BLE001 - reconnect on any WS error
if self._stop.is_set():
break
if self._intentional_reconnect:
self._intentional_reconnect = False
backoff = 1
continue
self.log.warning("Monitor WS error: %s — reconnecting in %ds", e, backoff)
await asyncio.wait([asyncio.create_task(self._stop.wait())], timeout=backoff)
backoff = min(backoff * 2, 30)# Manage exits CONCURRENTLY: plan (fast) → sell each in parallel
# so many TP/SL/trailing exits fire at once, never one-at-a-time.
try:
plan = await asyncio.to_thread(engine.plan_closes)
if plan:
await asyncio.gather(
*[asyncio.to_thread(engine.execute_close, pos, reason)
for pos, reason in plan],
return_exceptions=True)
reclaim_now = True # an exit emptied an account → reclaim soon
except Exception: # noqa: BLE001
passHYPE is a personal project that trades only its owner’s funds. It is not a product, a service or financial advice, and past results do not predict future ones.
Next project
MiniGPT Studio