Skip to content

fix(resolution): make resolution one-way and gate payouts on dispute window - #1471

Merged
greatest0fallt1me merged 2 commits into
Predictify-org:masterfrom
Brymo14:fix/issue-1456
Oct 24, 2026
Merged

greatest0fallt1me merged 2 commits into
Predictify-org:masterfrom
Brymo14:fix/issue-1456

Conversation

@Brymo14

@Brymo14 Brymo14 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1456

Makes manual/tie/force resolution one-way, records resolution time via the existing claim-window key, gates payouts on the post-resolution dispute window and open disputes, removes automatic distribution from resolution, and stops swallowing resolution errors. Adds the 10-row payout-gating suite and updates PAYOUT_SPECIFICATION.md. Timeline: end -> resolve (resolved_at) -> dispute window -> distribute/claim.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Brymo14 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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	contracts/predictify-hybrid/PAYOUT_SPECIFICATION.md
#	contracts/predictify-hybrid/src/lib.rs
@greatest0fallt1me
greatest0fallt1me merged commit 3565c1f into Predictify-org:master Oct 24, 2026
1 check failed
greatest0fallt1me added a commit that referenced this pull request Oct 24, 2026
…indow

#1471 removed the automatic distribution from resolve_market_manual, so
the conservation test must wait out the post-resolution dispute window
and call distribute_payouts before checking credited balances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greatest0fallt1me added a commit that referenced this pull request Oct 24, 2026
* fix(ci): restore green master build after #1471/#1476/#1478

- rate_limit_enforcement_tests (from #1476) never compiled: it imported a
  non-existent crate::test_utils, called CircuitBreaker::set_state and
  CircuitBreakerState::Open which do not exist, and lacked the testutils
  Ledger trait import. Its tests also registered a second, uninitialised
  contract after setup, so they could not pass. Drop the module; the
  rate-limiter enforcement changes from #1476 are kept.
- BudgetGuard::check compared *consumed* instructions against the
  "minimum remaining" threshold, so distribute_payouts aborted with
  OperationWouldExceedBudget after 100k instructions. This was hidden
  while resolution auto-distributed with `let _ =`; #1471 made
  distribution an explicit call and its payout gating tests exposed it.
  Compute remaining headroom against a per-transaction ceiling instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(rate-limiter): align test_different_markets with per-user voting limit

#1476 changed the voting bucket key from (user, market) to user, making
the voting limit global per user. The old test still expected a fresh
budget on a second market.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(conservation): distribute payouts explicitly after the dispute window

#1471 removed the automatic distribution from resolve_market_manual, so
the conservation test must wait out the post-resolution dispute window
and call distribute_payouts before checking credited balances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: greatest0fallt1me <greatest0fallt1me@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

resolve_market_manual pays out instantly and can re-resolve settled markets, bypassing the dispute window

2 participants