Skip to content

fix: validation bounds for coverage_max, deposit transfer, escalation threshold - #701

Merged
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
ogundelevictory:fix/validation-bounds-616-617-618-619
Oct 19, 2026
Merged

nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
ogundelevictory:fix/validation-bounds-616-617-618-619

Conversation

@ogundelevictory

Copy link
Copy Markdown

Closes #616
Closes #617
Closes #618
Closes #619

What changed

Why

  • Unbounded coverage_max lets a single policy lock unbounded pool capital
  • Unchecked deposit transfers could mint shares against funds that never arrived
  • Escalation thresholds without an upper bound leave claims stuck Pending indefinitely
  • Zero/negative trigger thresholds make every policy unconditionally payable

How to test

  • create_product with coverage_max > 1_000_000_000_000 should panic with CoverageOutOfRange
  • set_escalation_threshold with value > 90 days should panic with InvalidThresholdValue
  • set_escalation_threshold with value < 1 hour should panic with InvalidThresholdValue
  • deposit with a failing token transfer should panic with InvalidToken

…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)
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@nonsobethel0-dev
nonsobethel0-dev merged commit bbd526f into Parashield-Protocol:main Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants