Refactor: Add treasury claim throttling, governance reason codes, oracle validation, and dust handling - #1
Open
adeniran19-maker wants to merge 1 commit into
Open
Conversation
…cle validation, and dust handling
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.
This PR addresses several critical issues to improve the security, reliability, and functionality of the YieldVault-RWA contract.
Changes
Integrated
OracleValidatorintototal_assetsstrategy reads to ensure that strategy valuations are audited against fresh price feeds when the oracle is enabled.Added epoch-based quotas for treasury claims to prevent sudden liquidity drainage during fee claims, with the ability for admins to set claim quotas.
Replaced generic panics with explicit on-chain reason codes for rejected governance operations (
GovernanceSignersNotConfigured,GovernanceThresholdNotMet,GovernanceMigrationPastDeadline,GovernancePreviousSignersMissing).Implemented a deterministic dust-handling policy for residual asset balances, allowing minor fractional discrepancies to be cleanly swept into the Treasury to maintain full collateralization.
Fixes Junirezz#751
Fixes Junirezz#747
Fixes Junirezz#742
Fixes Junirezz#800