fix: stop skipping Hyperp markets from liquidation scanning (H3)#86
fix: stop skipping Hyperp markets from liquidation scanning (H3)#860x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
Conversation
The liquidation scanner checked authorityPriceE6 === 0n in the Hyperp branch and returned early, skipping the entire market. But for Hyperp markets, the price comes from lastEffectivePriceE6 (DEX pool mark price), not authorityPriceE6. The authority field is legitimately zero when no oracle authority has pushed a price. The preceding check (price === 0n) already correctly guards against unbootstrapped markets since resolveMarketPrice() returns lastEffectivePriceE6 for Hyperp mode. Remove the redundant authorityPriceE6 check that was silently excluding all Hyperp markets with zero authority price from liquidation scanning. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRemoved the mark price sanity check from Hyperp oracle mode in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
authorityPriceE6 === 0ninside the Hyperp branch and returned[], skipping the entire marketlastEffectivePriceE6(DEX pool mark price), NOTauthorityPriceE6authorityPriceE6is legitimately zero for Hyperp markets — no authority pushes pricesFix
Remove the redundant
authorityPriceE6 === 0ncheck (lines 207-213). The existingprice === 0nguard on line 205 already correctly handles unbootstrapped markets sinceresolveMarketPrice()returnslastEffectivePriceE6for Hyperp mode.Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit