Core systems that ensure the platform's stability, reliability, and automated integrity.
The Circuit Breaker is the "Emergency Stop" for the platform's economy, protecting against infinite-money glitches or coordinated bot attacks.
The system monitors the Total Faucet Payout over rolling windows:
- 1 Minute: Max 5,000 Tokens.
- 5 Minutes: Max 20,000 Tokens.
- 15 Minutes: Max 50,000 Tokens.
- If a limit is exceeded:
- Lockdown: System enters
EMERGENCY_LOCKDOWNmode. - Deny: All Faucet claims are rejected immediately.
- Alert: Admins are notified (Console/Database Flag).
- Broadcast: Real-time Socket.io event
system:lockdownsent to all clients to disable UI.
- Lockdown: System enters
Admins can manually trigger or reset the lockdown via the Admin Panel Settings.
Centralized oracle for cryptocurrency prices.
- Sources: CoinGecko, Binance API (Failover).
- Caching: Prices are cached (e.g., for 5-10 minutes) to prevent rate-limit bans and improve performance.
- Usage: Used by Swap, Withdrawal Estimations, and Deposit Valuations.
Aggregates global metrics for the landing page and admin dashboard.
- Metrics: Total Users, Total Claims, Total Earned, Online Users.
- Optimization: Uses cached aggregates or approximate counts (Postgres
reltuples) for large tables to ensure instant page loads.