Skip to content

takeOrders4: run ZeroMaximumIO guard before the IO-index dereference (#2671)#2736

Open
thedavidmeister wants to merge 1 commit into
mainfrom
2026-06-13-issue-2671-zeromax-oob-ordering
Open

takeOrders4: run ZeroMaximumIO guard before the IO-index dereference (#2671)#2736
thedavidmeister wants to merge 1 commit into
mainfrom
2026-06-13-issue-2671-zeromax-oob-ordering

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

Split out of #2692 for independent review (issue #2671). Re-implemented on current main post-#2701. Note: testProdDeploy*/start-block/constant-suite tests are red pending the serial deploy at land time.

…2671)

In takeOrders4 the ZeroMaximumIO guard ran after the order
validInputs[inputIOIndex] dereference used to seed the batch IO tokens,
so a zero maximum IO with an out-of-range index reverted with an opaque
Panic(0x32) array-out-of-bounds instead of the typed ZeroMaximumIO.

Move the guard ahead of the first IO-index dereference, checking
config.maximumIO directly (the same value io.remainingTakerIO copies),
so a zero max always reverts with the explicit error regardless of the
index being in range.

Split out of #2692 for independent review (issue #2671 item 1).
Re-implemented on current main post-#2701.

Pointers regenerated to a stable md5 fixpoint; the bytecode cascade moves
RaindexV6 and the three dependent arb-taker deploy addresses, so the
testProdDeploy*/start-block/constant-suite tests are red pending the
serial deploy at land time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jun 13, 2026
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@thedavidmeister, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 40 minutes and 4 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2007bd11-51ab-4c09-a229-29aab46c4b50

📥 Commits

Reviewing files that changed from the base of the PR and between 31e7a49 and d93f9a3.

⛔ Files ignored due to path filters (4)
  • src/generated/GenericPoolRaindexV6ArbOrderTaker.pointers.sol is excluded by !**/generated/**
  • src/generated/GenericPoolRaindexV6FlashBorrower.pointers.sol is excluded by !**/generated/**
  • src/generated/RaindexV6.pointers.sol is excluded by !**/generated/**
  • src/generated/RouteProcessorRaindexV6ArbOrderTaker.pointers.sol is excluded by !**/generated/**
📒 Files selected for processing (3)
  • crates/test_fixtures/abis/RaindexV6.json
  • src/concrete/raindex/RaindexV6.sol
  • test/concrete/raindex/RaindexV6.takeOrder.zeroMaxOOBIndex.t.sol
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-06-13-issue-2671-zeromax-oob-ordering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant