Oracle Rate Limiting
1 min read
Pronunciation
[awr-uh-kl rayt lim-i-ting]
Analogy
Like a turnstile that only allows a certain number of people through per minute to avoid overcrowding.
Definition
Key Points Intro
Oracle rate limiting protects networks from overload and malicious flooding.
Key Points
Per‑consumer caps: Limits on calls per address or API key.
Global throttle: Maximum updates per time window.
Exponential backoff: Increasing delays on repeated requests.
Quota tracking: Monitors usage in on‑chain state or off‑chain.
Example
An oracle contract allows at most 100 price updates per hour; additional submissions revert.
Technical Deep Dive
Contract stores `lastWindow` and `count`. On `submit()`, if `block.timestamp – lastWindow > windowSize`, reset count; else increment and require `count = limit`.
Security Warning
Too strict limits can block legitimate spikes; set thresholds based on usage patterns.
Caveat
Oracle Rate Limiting - Related Articles
No related articles for this term.