Trading
Milliseconds Matter
During the live window, users swap among the curated token list. Here’s the choreography:
Quote Request
User selects “Swap SOL → MOONSHOT, 50 % of balance.”
Starry queries Jupiter’s quote endpoint, enforcing:
Slippage ≤ 1 %.
Route length ≤ 3 hops.
Quote returned in ~120 ms.
Transaction Build & Sign
The swap is constructed client-side using the quoted route.
User signs with Privy wallet; tx is broadcast to RPC cluster.
Settlement Monitoring
Starry listens for
signatureSubscribe.Once confirmed, holdings are recalculated in IndexedDB for immediate UI snap.
Leaderboard Push
A WebSocket message
{user_id, new_PnL}is diff-broadcast to all clients in the same event.Average end-to-end: 650–900 ms, fast enough to feel live but fair to global latency.
Throttling & Anti-Abuse
Max 5 tx/minute to avoid spam.
Sudden 100 % portfolio flips within 10 seconds trigger a “confirm twice” modal to prevent fat-finger errors.
Trades after the snapshot cut-off are accepted by the network but ignored for scoring — a visible grey banner warns users during the last 120 seconds.
Last updated

