Skip to content

feat(bot-oo): add guarded OOv2 settlement lists#4952

Merged
md0x merged 6 commits into
masterfrom
pablo/oo-settle-include-exclude
Jul 24, 2026
Merged

feat(bot-oo): add guarded OOv2 settlement lists#4952
md0x merged 6 commits into
masterfrom
pablo/oo-settle-include-exclude

Conversation

@md0x

@md0x md0x commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional include/exclude proposal lists to the unified OOv2 settlement bot and introduces an explicit ManagedOptimisticOracleV2 oracle type.

  • OptimisticOracleV2 keeps the existing behavior when both lists are unset: settle every eligible proposal.
  • ManagedOptimisticOracleV2 fails closed when both lists are unset by defaulting to an empty include list.
  • SETTLE_INCLUDE_LIST settles only listed proposals and takes precedence over the exclude list.
  • SETTLE_EXCLUDE_LIST skips listed proposals; an explicit [] opts in to settling every eligible proposal.

Proposal IDs use the transaction hash and log index of the ProposePrice event: "<txHash>:<logIndex>".

Changes

  • Route ManagedOptimisticOracleV2 through the OOv2 settlement implementation.
  • Parse and validate settlement lists for OOv2 contract types.
  • Fail fast if Managed OOv2 reaches settlement without a configured filter.
  • Document the standard and Managed defaults.
  • Cover include, exclude, default, explicit settle-all, and unsupported-oracle behavior.

The coordinated deployment config is UMAprotocol/bot-configs#4222. Deploy this protocol change before enabling that config.

Test plan

  • yarn hardhat test ./test/OptimisticOracleV2Bot.ts
  • ESLint and Prettier pre-commit hooks

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85fc0e047a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/monitor-v2/src/bot-oo/common.ts Outdated
Comment thread packages/monitor-v2/src/bot-oo/common.ts Outdated
chrismaree
chrismaree previously approved these changes Jun 3, 2026

@chrismaree chrismaree left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No blocking findings from my pass. I checked the current head against the include/exclude semantics, empty-array handling, non-OOv2 fail-fast behavior, docs/tests coverage, and patch hygiene. The implementation looks scoped and the existing Codex comments have been addressed. I did not run local tests; GitHub checks are passing, including test-monitor-v2.

@chrismaree

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 980c45d204

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/monitor-v2/src/bot-oo/common.ts Outdated
@chrismaree

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 422e5685e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@md0x
md0x force-pushed the pablo/oo-settle-include-exclude branch from 08299af to 12df236 Compare July 24, 2026 11:16
@md0x md0x changed the title feat(bot-oo): add include/exclude proposal lists to OOv2 settler feat(bot-oo): add guarded OOv2 settlement lists Jul 24, 2026
md0x added 5 commits July 24, 2026 12:17
Adds SETTLE_INCLUDE_LIST and SETTLE_EXCLUDE_LIST env vars to the unified
OO settlement bot, scoped to OptimisticOracleV2. Proposals are matched by
their ProposePrice event identifier (<txHash>:<logIndex>). When an include
list is set the bot settles only those proposals (takes precedence over the
exclude list); otherwise proposals in the exclude list are skipped.

Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
An explicit [] no longer throws at startup: an empty exclude list
behaves like unset, and an empty include list settles nothing (the
include list is exclusive). Matches the OG_WHITELIST/ASSERTION_BLACKLIST
convention of accepting empty arrays.

Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Only the OOv2 settler applies SETTLE_INCLUDE_LIST/SETTLE_EXCLUDE_LIST;
silently ignoring them on OptimisticOracle/SkinnyOptimisticOracle would
settle proposals the operator intended to skip, so startup now fails
fast instead.

Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
An empty exclude list skips nothing and behaves the same as unset, so it
no longer trips the non-OOv2 startup throw. An empty include list still
throws there since "settle nothing" cannot be honored outside OOv2.

Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
@md0x
md0x force-pushed the pablo/oo-settle-include-exclude branch from 12df236 to 5de2aef Compare July 24, 2026 11:52

@Reinis-FRP Reinis-FRP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review — guarded OOv2 settlement lists

Overall this is well-designed, well-documented, and well-tested. The fail-closed defaults (ManagedOptimisticOracleV2 defaulting to an empty include list, plus the redundant guard in settleOOv2Requests) are the right safety posture for a bot that settles on-chain, and the "empty exclude = explicit opt-in to settle-all" semantics are handled precisely and covered by tests.

Strengths

  • Defense in depth: a misconfigured Managed bot can't accidentally settle everything, even when params are built directly.
  • Consistent tx-hash normalization in proposalEventId on both the parse and match sides.
  • Precedence logic (configuredIncludeList || settleExcludeList?.size) correctly distinguishes empty-include ("settle nothing", rejected for non-OOv2) from empty-exclude ("no-op, allowed anywhere"), with tests for each branch.
  • OracleType union, env validation, error messages, and the dispatcher switch all updated in lockstep.

Findings (3 inline comments):

  1. skippedIds debug log is unbounded in include mode — the default path for Managed OOv2. (minor, worth addressing)
  2. README could clarify how operators obtain the block-scoped <logIndex>. (minor doc improvement)
  3. Number() logIndex normalization. (nit, no action needed)

None are blocking. Recommend addressing (1) before merge; (2) is a nice-to-have.

One process note: only the DCO check is attached to the head commit — worth confirming the full test/lint CI ran. And per the description, the fail-closed default makes the deploy-before-config sequencing with UMAprotocol/bot-configs#4222 important; call that out in the deploy runbook.


Submitted by 🤖 Reinis Claude coding agent


Generated by Claude Code

Comment thread packages/monitor-v2/src/bot-oo/SettleOOv2Requests.ts Outdated
Comment thread packages/monitor-v2/src/bot-oo/README.md Outdated
Comment thread packages/monitor-v2/src/bot-oo/common.ts
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
@md0x
md0x requested review from Reinis-FRP and chrismaree July 24, 2026 13:51

@Reinis-FRP Reinis-FRP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looking good, thanks!

@md0x
md0x merged commit c6ac81a into master Jul 24, 2026
7 checks passed
@md0x
md0x deleted the pablo/oo-settle-include-exclude branch July 24, 2026 14:38
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.

3 participants