Skip to content

feat(monitor-v2): add SETTLE_ONLY_DISPUTED option to settlement bot#4941

Merged
Reinis-FRP merged 4 commits intomasterfrom
feat/settle-only-disputed
Mar 30, 2026
Merged

feat(monitor-v2): add SETTLE_ONLY_DISPUTED option to settlement bot#4941
Reinis-FRP merged 4 commits intomasterfrom
feat/settle-only-disputed

Conversation

@mrice32
Copy link
Copy Markdown
Member

@mrice32 mrice32 commented Mar 29, 2026

Summary

  • Adds SETTLE_ONLY_DISPUTED env var (default false) to the OO settlement bot
  • When true, only settles requests that were disputed and resolved via the DVM, skipping undisputed expired proposals
  • Uses on-chain getState() to check dispute status per request — no extra event queries needed
  • Supported for OptimisticOracleV2 / ManagedOptimisticOracleV2 only

Test plan

  • New test: settleOnlyDisputed skips undisputed expired proposals
  • New test: settleOnlyDisputed settles disputed+DVM-resolved proposals
  • Existing tests pass unchanged

🤖 Generated with Claude Code

mrice32 and others added 4 commits March 29, 2026 21:00
When enabled, the bot only settles requests that were disputed and
resolved via the DVM, skipping undisputed proposals that expired
naturally. For OOv2/ManagedOOv2, uses on-chain getState() to check
dispute status. For SkinnyOO, filters using already-queried
DisputePrice events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the SkinnyOO filtering — the option now only applies to
OptimisticOracleV2 and ManagedOptimisticOracleV2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mrice32 mrice32 marked this pull request as ready for review March 29, 2026 23:28
Copy link
Copy Markdown
Contributor

@Reinis-FRP Reinis-FRP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work as short-term solution. If this was staying as longer-term code we could though refactor this to start from DisputePrice events entirely (instead of ProposePrice) as that avoids additional state check and would allow extending lookback period due to less events to begin with.

@Reinis-FRP Reinis-FRP merged commit b77e698 into master Mar 30, 2026
7 checks passed
@Reinis-FRP Reinis-FRP deleted the feat/settle-only-disputed branch March 30, 2026 06:48
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.

2 participants