> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velumx.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Throttling

# Throttling & Quotas

To ensure the high availability of the VelumX Relayer Network and protect against infrastructure abuse, we implement a multi-tiered throttling strategy.

## Rate Limiting Architecture

VelumX employs a sliding-window rate limiting algorithm applied per API Key. This ensures that a surge in traffic from one project does not degrade the performance of the global network.

### Global Quotas

The following limits are enforced by default for all testnet API keys:

| Endpoint Resource         | Limit (Requests) | Window | Primary Purpose                           |
| :------------------------ | :--------------- | :----- | :---------------------------------------- |
| `/api/v1/estimate`        | 60               | 60s    | Fee estimation queries                    |
| `/api/v1/sponsor`         | 30               | 60s    | Transaction sponsorship                   |
| `/api/v1/broadcast`       | 20               | 60s    | Network broadcasting                      |
| `/api/v1/broadcast/batch` | 5                | 60s    | Batch sponsorship (up to 25 txs per call) |
| `/api/dashboard/*`        | 120              | 60s    | Analytics & Management                    |

## Response Semantics

When a quota is exceeded, the Relayer returns a `429 Too Many Requests` status code.

### Quota Headers

All API responses include standard headers to assist with client-side request pacing:

```http theme={null}
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1713182400
Retry-After: 45
```

### Strategic Handling

Developers are encouraged to implement **Jittered Exponential Backoff** when receiving a `429` response. The `Retry-After` header indicates the exact number of seconds to wait before the next allowed interaction.

## Pricing Oracle Integrity

VelumX infrastructure reliability relies on high-fidelity pricing. We implement a **Consensual Multi-Oracle** approach to mitigate the risk of price manipulation or single-point failures.

### Hierarchy of Sources

1. **CoinGecko (Primary)**: Standard USD rates for STX.
2. **CoinMarketCap (Secondary)**: Professional-tier fallback.
3. **Binance (Tertiary)**: Real-time exchange volume verification.
4. **Hardcoded Floor (Emergency)**: A conservative safety net to prevent protocol insolvency during total oracle blackout.

### Cache Duration

To optimize latency while maintaining price accuracy, indices are cached for **60 seconds** within the relayer environment (`CACHE_TTL = 60000`).
