Event types
Each row is one SSEevent: name.| Event | Priority | Fires on |
|---|---|---|
HP_UPDATED | LOW | A token’s HP changed (per scoring tick or per-event recompute) |
HP_REORG | MED | Rank order changed (any token swapped positions) |
RESERVATION_CREATED | MED | A creator reserved a slot during the launch window |
SEASON_ACTIVATED | HIGH | The 4th reservation landed; tokens deploy together |
TOKEN_LAUNCHED | MED | A reserved token deployed (post-activation, slots 5–12) |
SWAP_HIGH | HIGH | Swap above the high-volume threshold |
SWAP_MED | MED | Swap above the medium threshold |
SWAP_LOW | LOW | Routine swap |
FILTER_MOMENT | HIGH | Token crossed the cut line (in/out of safe) within the final 4 hours pre-cut |
WINNER_DECLARED | HIGH | Settlement complete; winner’s address published |
SEASON_ABORTED | HIGH | Launch window closed with < 4 reservations; refunds initiated |
Priority pipeline
Events flow through a bounded queue with three lanes. Under backpressure, LOW-priority events are dropped first and HIGH events always make it through. Inside each lane:- Per-token throttle — at most 1 event per token per 250ms. Burst swaps on the same token are coalesced; the most recent one wins.
- Dedupe — identical event payloads within a 1s window collapse to one.
- LOW suppression — when MED or HIGH events queue, LOW events are dropped until the higher lanes drain.
Connection management
| Behavior | Detail |
|---|---|
| Reconnect | Auto-reconnect with exponential backoff (cap 30s) |
| Resume | Last-Event-ID header on reconnect resumes from the last delivered event |
| Per-IP cap | 4 concurrent connections per IP; 5th is rejected with 429 |
| Heartbeat | :keepalive comment every 15s |
| Idle timeout | 5 minutes with no events → server closes; client reconnects |
JS subscription example
Event payload shape
Every event is JSON in the SSEdata: field with this base envelope: