Threat model
| Class | Entry point | Technique | Impact |
|---|---|---|---|
| Connection flood | TCP, WebSocket | Rapid connects, slowloris, handshake stalls | fd and thread exhaustion |
| Request flood | REST, JSON-RPC | High-frequency calls, batch abuse | CPU and memory pressure, p99 spike |
| Method exhaustion | Expensive endpoints | Scripted heavy queries | Single method takes down a service |
| Retry storm | Any | Clients retry infinitely after errors | Attacker and legitimate traffic amplify each other |
| Address farming | Multiple addresses | Split load across many addresses to dodge per-address limits | Bypass address budget |
| Role infiltration | Validator or proxy | Cheap identity registration | Consensus instability |
- Availability at attack peak:
- Core trade path (place, cancel, modify) success:
- Legitimate-user false-positive rate:
- Policy rollout after detection: seconds
Architecture
Traffic flows through a deliberately layered stack so an attacker has to burn through each layer in turn:Connection-layer defense
The edge enforces:| Control | Default |
|---|---|
| New connections / sec / IP | 20 |
| Concurrent connections / IP | 120 |
| New WS connections / minute / IP | 40 |
| Total WS connections / IP | 12 |
| TLS handshake timeout | 3,000 ms |
| Ban duration on severe abuse | 600 s |
429 with Retry-After. Moderate breaches drop the IP into a graylist at 20% throttle for 10 minutes. Severe breaches blacklist the IP and fire a security alert.
Request-layer defense
Every request passes four token buckets at once: global, per-IP, per-address, and per-method. Endpoint weights reflect actual cost — trade actions are 1, account reads are 5, heavy history scans are 20, full snapshots are 40.Congestion fair-share
When the engine is genuinely saturated, scheduling flips from first-come to maker-share-weighted. Each address is allowed up toblock_capacity * 2 * maker_share orders per block, so the participants who supply liquidity get the room to manage risk during a crisis. The rule explicitly reverses the “who has the fastest server wins” arms race.
Sybil controls (V1)
Economic floors
High-privilege roles (validator, signer, some bot profiles) require a minimum stake and a cooldown. The goal is not to stop Sybils but to make them expensive enough to be uninteresting.
Relationship analysis
A rules engine flags addresses that share funding origin, operate in tight temporal lockstep, or exhibit wash-trade patterns. Flagged addresses are tagged for enhanced monitoring.
Chain-side signals that feed this layer are in monitoring.