Skip to content

Fix security and fairness issues - #708

Merged
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
ReinaMaze:fix/security-and-fairness-improvements
Oct 20, 2026
Merged

nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
ReinaMaze:fix/security-and-fairness-improvements

Conversation

@ReinaMaze

Copy link
Copy Markdown
Contributor

close #592
close #593
close #594
close #595

- ClaimsProcessor.escalate_claim: Add time window verification from claim submission
- PolicyEngine.buy_policy: Premium validation already in place (calculates required premium)
- OracleVerifier.submit_data: Add per-data_type range validation with configurable limits
- ClaimsProcessor: Enforce FIFO claim processing order in batch_auto_process

Security improvements:
1. Escalation is now only allowed within the policy end_time + claim_deadline window
2. Oracle data submissions validated against data-type-specific ranges (weather, flight, onchain, etc.)
3. Admin can configure custom ranges via set_data_type_range()
4. Claims processed in strict FIFO order based on submitted_at timestamp

Fairness improvements:
- batch_auto_process now sorts claims by submission time before processing
- Ensures older claims are always settled before newer ones
- Prevents unfair advantage to recently submitted claims
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@ReinaMaze 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 31f12db into Parashield-Protocol:main Oct 20, 2026
1 of 2 checks passed
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