Repository navigation
fix: validation bounds for coverage_max, deposit transfer, escalation threshold - #701
Merged
nonsobethel0-dev merged 1 commit intoOct 19, 2026
Conversation
…tion threshold - PolicyEngine: cap coverage_max at MAX_COVERAGE_LIMIT (issue Parashield-Protocol#616) - PolicyEngine: confirm trigger_threshold is strictly positive (issue Parashield-Protocol#619) - RiskPool: use try_transfer and verify deposit token transfer succeeded (issue Parashield-Protocol#617) - ClaimsProcessor: enforce MIN/MAX escalation threshold bounds (issue Parashield-Protocol#618)
|
@ogundelevictory 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! 🚀 |
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 #616
Closes #617
Closes #618
Closes #619
What changed
coverage_maxatMAX_COVERAGE_LIMIT(1 trillion) to prevent unrealistic policy exposure (issue [security] PolicyEngine does not validate coverage_max is reasonable #616)trigger_thresholdis strictly positive — zero/negative thresholds would make every policy unconditionally payable (issue [bug] PolicyEngine does not validate product trigger_threshold is positive #619)try_transferand explicitly verify the deposit token transfer succeeded before crediting shares (issue [bug] RiskPool does not validate deposit token transfer succeeds #617)set_escalation_thresholdandset_category_escalation_threshold(issue [security] ClaimsProcessor does not validate escalation threshold is within bounds #618)Why
coverage_maxlets a single policy lock unbounded pool capitalHow to test
create_productwithcoverage_max > 1_000_000_000_000should panic withCoverageOutOfRangeset_escalation_thresholdwith value > 90 days should panic withInvalidThresholdValueset_escalation_thresholdwith value < 1 hour should panic withInvalidThresholdValuedepositwith a failing token transfer should panic withInvalidToken