feat(vault): Add oracle/price feed validation and stale-data handling#217
Merged
Junirezz merged 1 commit intoJunirezz:mainfrom Mar 30, 2026
Merged
Conversation
- Add oracle module with PriceData type and validation functions - Add PriceOracleValidator for validating price data freshness, bounds, and deviation - Add oracle configuration functions (set_price_oracle, set_oracle_enabled, set_oracle_heartbeat) - Add vault error variants for oracle validation failures - Add comprehensive tests for oracle validation scenarios - Add mock oracle contract for testing - Add stale-data policy documentation Closes Junirezz#123
|
@thefifthdev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #123
Pull Request Template
📋 Description
🔗 Type of Change
🔒 SECURITY REVIEW (⭐ MANDATORY FOR SMART CONTRACT CHANGES)
For all smart contract code changes, complete the following checklist.
See
docs/SECURITY_CHECKLIST.mdfor detailed guidance.Required: Security Checklist Sign-Off
I have reviewed this PR against the Internal Security Checklist (
docs/SECURITY_CHECKLIST.md)onlyOwner,onlyRole(), etc.)require(success, ...))If any checkbox cannot be verified, explain below:
Slither Static Analysis Results
Ran Slither locally:
slither . --config-file slither.config.jsonGitHub Actions Slither workflow passed:
If this PR has security findings, document them below:
Handling Security Findings
Option A: Fixed in This PR ✅
Option B: False Positive 🟡
contracts/.false-positives.mdwith:Option C: Accepted Risk⚠️
📝 Testing
Functional Testing
Security Testing
For state-changing functions:
For external integrations:
Test Coverage
[Link or reference]🚀 Deployment Notes
Mainnet Readiness
Breaking Changes
If this PR introduces breaking changes:
[timeframe]📊 Automated Scan Results
Slither Analysis
Related Documentation
✅ Reviewer Checklist
For code reviewers (use this to guide your security-focused review):
📞 Questions or Issues?
docs/SECURITY_CHECKLIST.mddocs/FALSE_POSITIVE_HANDLING.md@security-teamin comments📋 Pre-Submit Checklist
Before marking PR as ready for review:
npm testnpm run lintslither . --config-file slither.config.json✅ Ready for Review? Ensure all items above are checked before requesting review.