diff --git a/docs/Bridgewiseratelimit.html b/docs/Bridgewiseratelimit.html
new file mode 100644
index 0000000..444969e
--- /dev/null
+++ b/docs/Bridgewiseratelimit.html
@@ -0,0 +1,584 @@
+
+
+
+
+
+
+
+ MDTechLabs / BridgeWise · Issue #64
+ Rate-Limited API Layer
& Retry Mechanism
+ Handles rate limits, transient failures, and API unreliability for bridge quotes, network fees, and liquidity data — without degrading UX.
+
+
+
+
+ Architecture Overview
+
+
+
→
+
+
→
+
+
→
+
+
→
+
+
→
+
+
+
+
+
+
+ Live Simulator INTERACTIVE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 00:00:00
+ [READY]
+ BridgeWise Rate-Limited API Layer initialised. Select a scenario above.
+
+
+
+
+
+
+ Usage
+ // 1. Import the shared client or domain helpers
+import { fetchBridgeQuote, fetchNetworkFees, fetchLiquidityData } from './rateLimitedApi.js';
+
+// 2. Use exactly like before — rate limiting & retry are transparent
+const quote = await fetchBridgeQuote({ fromChain: 'eth', toChain: 'arb', token: 'USDC', amount: '1000' });
+const fees = await fetchNetworkFees('ethereum');
+const liq = await fetchLiquidityData({ pair: 'USDC/ETH' });
+
+// 3. Or use the client directly for custom endpoints
+import { sharedClient } from './rateLimitedApi.js';
+
+const res = await sharedClient.get('/api/slippage', {}, { group: 'liquidity' });
+const data = await res.json();
+
+// 4. Inspect metrics anytime
+console.log(sharedClient.getMetrics());
+// { totalRequests: 42, successfulRequests: 40, retriedRequests: 5, rateLimitHits: 3, … }
+
+
+
+
+ Configuration Reference
+
+
+ | Option | Default | Description |
+ | maxRetries | 3 | Maximum retry attempts per request |
+ | baseDelay | 1000 ms | Base delay for exponential backoff |
+ | maxDelay | 30 000 ms | Cap on computed backoff delay |
+ | jitter | true | Full jitter to avoid thundering herd |
+ | rateLimitPerSecond | 5 | Token bucket capacity per group |
+ | timeout | 10 000 ms | AbortController timeout per request |
+ | retryStatusCodes | [429,500,502,503,504] | HTTP codes triggering a retry |
+ | concurrency | 10 | Max parallel in-flight requests (queue) |
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/libs/bridge-core/src/benchmark.ts b/libs/bridge-core/src/benchmark.ts
index eb10a11..2801adb 100644
--- a/libs/bridge-core/src/benchmark.ts
+++ b/libs/bridge-core/src/benchmark.ts
@@ -3,14 +3,19 @@
* Collects, stores, and provides access to historical fee and slippage data
*/
-import type { BridgeRoute, ChainId, BridgeProvider, FeeSlippageBenchmark } from './types';
+import type {
+ BridgeRoute,
+ ChainId,
+ BridgeProvider,
+ FeeSlippageBenchmark,
+} from './types';
export interface BenchmarkStorage {
/**
* Store a new benchmark record
*/
save(benchmark: FeeSlippageBenchmark): Promise