fix: prevent oracle deviation check from permanently bricking markets (H1)#84
fix: prevent oracle deviation check from permanently bricking markets (H1)#840x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
Conversation
… (H1) The 30% historical deviation check rejected prices that moved too fast but never recorded the rejected price in history. This meant the old anchor price persisted forever, and every subsequent fetch at the new (legitimate) price was also rejected — permanently bricking the oracle for that market until the keeper process was restarted. Add a consecutive rejection counter per market. After 5 consecutive cross-validated prices are rejected by the deviation check, accept the price as a legitimate move and update the anchor. This: - Still filters single bad data points (1 out of 5 won't pass) - Recovers automatically in ~25s (5 cycles at ~5s each) - Resets the counter whenever a normal price is accepted - Requires no process restart for recovery Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 45 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
priceHistory)Fix
Add a consecutive rejection counter per market (
deviationRejectionsMap):Why this is safe
Test plan
H1: accepts deviated price after 5 consecutive rejections (no permanent brick)H1: resets rejection counter when a normal price is accepted🤖 Generated with Claude Code