Skip to content

feat(hybrid): prove market settlement conservation with proptests (fixes #1375) - #1437

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Predictify-org:masterfrom
s6pa1rta3n-lab:fix-issue-1375
Draft

feat(hybrid): prove market settlement conservation with proptests (fixes #1375)#1437
s6pa1rta3n-lab wants to merge 1 commit into
Predictify-org:masterfrom
s6pa1rta3n-lab:fix-issue-1375

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

Fixes #1375. Proves market settlement conservation across winning, losing, void, and partial-liquidity outcomes with property-based tests and enforces single settlement idempotency.

  • Conservation of Funds: Formally proves that all debits equal credits plus platform fees and remainders ($D = \sum p_i + \sum f_i + R, R \ge 0$).
  • Single Settlement Idempotency: Prevents repeated resolution calls (Error::MarketResolved) and guarantees subsequent payout distribution passes safely return 0.
  • Void & Partial Outcome Conservation: Validates 100% exact refund restoration upon market cancellation with zero contract residue or lockup.
  • Property-Based Testing: 4 comprehensive proptest suites (500 cases each) covering min, max, highly skewed outcome ratios, ties, and edge-case stroop dust bounds.

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GrantFox][High] Prove market settlement conservation

1 participant