Skip to content

Conversation

@Siddharth2207
Copy link
Contributor

@Siddharth2207 Siddharth2207 commented Jun 12, 2025

Motivation

Add arbitrum2 to dsf, dca, limit, canary

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • New Features

    • Added support for new network variants "arbitrum2" and "base2" across modules, enabling parallel deployments alongside existing networks.
    • Added GUI deployment entries for "arbitrum2" and "base2" with updated names, descriptions and matching deployment fields.
  • Chores

    • Updated configuration entries (networks, subgraphs, metaboards, orderbooks, deployers, orders, scenarios, deployments) to include and wire up "arbitrum2" and "base2".

@Siddharth2207 Siddharth2207 self-assigned this Jun 12, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 12, 2025

Walkthrough

The changes introduce new network aliases arbitrum2 and base2 across multiple configuration files. This includes duplicating existing arbitrum and base settings for networks, subgraphs, metaboards, orderbooks (with new contract addresses), deployers, orders, scenarios, deployments, and GUI deployment options. No logic or control flow is altered; only declarative configuration is added or updated.

Changes

Cohort / File(s) Change Summary
Auction DCA / Canary / Dynamic Spread / Fixed Limit configs
src/auction-dca.rain, src/canary.rain, src/dynamic-spread.rain, src/fixed-limit.rain
Added arbitrum2 and base2 entries: networks, subgraphs, metaboards, orderbooks (new addresses), deployers, orders, scenarios, deployments, and GUI deployment definitions mirroring existing arbitrum/base configs.
Settings
settings.yaml
Added base2 entries under subgraphs, metaboards, and orderbooks; updated orderbooks.arbitrum2.network from arbitrum to arbitrum2 and added/adjusted orderbook addresses and subgraph links.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant GUI
    participant ConfigStore
    participant Orderbook
    participant ScenarioRunner

    User->>GUI: choose deployment (arbitrum2 / base2)
    GUI->>ConfigStore: load network, orderbook, scenario, GUI fields
    GUI->>Orderbook: interact using selected orderbook address
    GUI->>ScenarioRunner: trigger scenario run with bindings
    Note right of ScenarioRunner: runs use same control flow as existing networks
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

webapp

Suggested reviewers

  • hardyjosh
  • findolor
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2025-06-12-update-arb2-strats

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c7e62f and 604d57c.

📒 Files selected for processing (4)
  • src/auction-dca.rain (9 hunks)
  • src/canary.rain (8 hunks)
  • src/dynamic-spread.rain (9 hunks)
  • src/fixed-limit.rain (9 hunks)
🔇 Additional comments (3)
src/fixed-limit.rain (1)

71-74: Looks good – new orderbook address is 40-byte checksum, no obvious typos

Address format and checksum pass a quick visual inspection. 👍

src/auction-dca.rain (1)

166-174: Good catch on sub-parser address – previous review comment resolved

arbitrum2 now uses 0x762ad…a7b3 as suggested in earlier CI feedback.
No further action needed.

src/dynamic-spread.rain (1)

148-156: Address looks correct – remember to update allow-lists if any

Just a heads-up: if downstream tooling maintains an allow-list of valid orderbooks, add
0x59401C9302E79Eb8AC6aea659B8B3ae475715e86 there as well, otherwise deployments will be rejected.

@coderabbitai coderabbitai bot mentioned this pull request Jul 3, 2025
4 tasks
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/auction-dca.rain (1)

77-78: Deployer duplication already flagged

The deployer address duplication between arbitrum and arbitrum2 has already been noted in previous review comments as a maintenance concern.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ac2d28 and 1d5c503.

📒 Files selected for processing (6)
  • settings.json (2 hunks)
  • settings.yaml (2 hunks)
  • src/auction-dca.rain (9 hunks)
  • src/canary.rain (8 hunks)
  • src/dynamic-spread.rain (9 hunks)
  • src/fixed-limit.rain (9 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
settings.yaml (1)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
settings.json (1)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
src/fixed-limit.rain (4)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:2-6
Timestamp: 2025-04-30T06:32:43.860Z
Learning: The `network-id` field is intentionally omitted for the flare network in the `settings.yaml` configuration file, unlike other networks which include both `chain-id` and `network-id` fields.
Learnt from: thedavidmeister
PR: rainlanguage/rain.strategies#28
File: src/folio.rain:28-42
Timestamp: 2025-07-03T09:47:48.019Z
Learning: In Rain language strategy files, thedavidmeister prefers intentionally oversimplified setups over complex validation logic, especially in initial implementations like the folio strategy configuration.
src/dynamic-spread.rain (2)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
src/canary.rain (3)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:2-6
Timestamp: 2025-04-30T06:32:43.860Z
Learning: The `network-id` field is intentionally omitted for the flare network in the `settings.yaml` configuration file, unlike other networks which include both `chain-id` and `network-id` fields.
src/auction-dca.rain (2)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
🔇 Additional comments (8)
settings.json (1)

57-57: Configuration updates look good for arbitrum2 network.

The subgraph URL and orderbook address updates align with the purpose of arbitrum2 as a deployment target for newer contract versions. The July 3, 2025 subgraph version and new orderbook address 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc are consistent across the configuration.

Also applies to: 94-94

settings.yaml (1)

47-47: Consistent configuration updates between JSON and YAML formats.

The arbitrum2 subgraph URL and orderbook address changes match those in settings.json, ensuring consistency across configuration file formats.

Also applies to: 78-78

src/fixed-limit.rain (1)

19-23: Comprehensive arbitrum2 integration looks excellent.

The implementation correctly adds arbitrum2 support across all configuration sections:

  • Network configuration properly aliases Arbitrum with updated contracts
  • Orderbook address 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc matches the settings files
  • Scenario uses distinct raindex-subparser address for arbitrum2 (0xde38AD4b13D5258a5653E530EcDF0cA71B4E8a51)
  • GUI clearly describes the purpose as "Arbitrum with the updated orderbook"

The configuration is consistent and well-documented for the transition period.

Also applies to: 72-73, 158-163, 328-343

src/canary.rain (1)

14-18: Consistent arbitrum2 implementation for canary strategy.

The arbitrum2 integration follows the established pattern:

  • Network and orderbook configurations match other strategy files
  • Scenario uses the same updated raindex-subparser address (0xde38AD4b13D5258a5653E530EcDF0cA71B4E8a51)
  • GUI clearly describes this as "Canary on Arbitrum with the updated orderbook"

The implementation maintains consistency across the codebase while adapting appropriately for the canary strategy.

Also applies to: 56-57, 140-144, 263-300

src/dynamic-spread.rain (1)

14-23: Well-implemented arbitrum2 support for dynamic spread strategy.

The arbitrum2 integration is comprehensive and consistent:

  • Scenario configuration uses the appropriate updated raindex-subparser address
  • Network and orderbook configurations align with other strategy files
  • Extensive GUI configuration maintains all the dynamic spread parameters while clearly indicating use of the "updated orderbook"

The implementation demonstrates good consistency across the entire codebase for the arbitrum2 transition.

Also applies to: 101-105, 154-155, 361-441

src/auction-dca.rain (3)

9-13: Network configuration looks correct

The arbitrum2 network configuration appropriately duplicates the arbitrum settings with the same chain-id 42161, which aligns with the retrieved learning that arbitrum2 is an intentional alias for the Arbitrum network with updated contract addresses.


61-62: Verify the orderbook address is correct

The orderbook address 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc differs from a past review comment suggesting it should be 0x762adD85a30A83722feF2e029087C9D110B6a7b3. Please confirm this is the correct updated orderbook address for arbitrum2.


166-174: Scenario bindings use updated subparser addresses

The arbitrum2 scenario correctly uses updated subparser addresses (0xde38AD4b13D5258a5653E530EcDF0cA71B4E8a51) different from the original arbitrum configuration, which is appropriate for the newer contract deployment.

Comment on lines +404 to +529
arbitrum2:
name: Arbitrum with the updated orderbook
description: Deploy an auction-based cost averaging strategy on Arbitrum with the updated orderbook.
deposits:
- token: output
fields:
- binding: time-per-amount-epoch
name: Budget period (in seconds)
description: |
The budget is spent over this time period.

For example, if the budget is daily then this is 86400 seconds (24 * 60 * 60).
show-custom-field: true
presets:
- name: Per minute (60)
value: 60
- name: Per hour (3600)
value: 3600
- name: Per day (86400)
value: 86400
- name: Per week (604800)
value: 604800
- name: Per 30 days (2592000)
value: 2592000
- name: Per 365 days (31536000)
value: 31536000
- binding: amount-per-epoch
name: Budget (${order.outputs.0.token.symbol} per period)
description: |
The amount of ${order.outputs.0.token.symbol} to spend each budget period.

For example, if the budget is daily and this is 10 then 10 ${order.outputs.0.token.symbol} will be sold for ${order.inputs.0.token.symbol} each day.
- binding: max-trade-amount
name: Maximum trade size (${order.outputs.0.token.symbol})
description: |
The maximum amount of ${order.outputs.0.token.symbol} to sell in a single auction.
- binding: min-trade-amount
name: Minimum trade size (${order.outputs.0.token.symbol})
description: |
The minimum amount of ${order.outputs.0.token.symbol} to sell in a single auction.
- binding: time-per-trade-epoch
name: Auction period (in seconds)
description: |
The auction period is the time between each auction price halvening.
show-custom-field: true
default: 3600
presets:
- name: Every 20 minutes (1200)
value: 1200
- name: Every 30 minutes (1800)
value: 1800
- name: Every hour (3600)
value: 3600
- name: Every 2 hours (7200)
value: 7200
- name: Every 3 hours (10800)
value: 10800
- name: Every 6 hours (21600)
value: 21600
- name: Every 12 hours (43200)
value: 43200
- name: Every 24 hours (86400)
value: 86400
- binding: baseline
name: Baseline ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol}
description: |
The absolute minimum amount of ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol} that the auction will trade at.

I.e. for each 1 ${order.outputs.0.token.symbol} sold you will receive at least this many ${order.inputs.0.token.symbol}.

I.e. this is calculated as the ${order.outputs.0.token.symbol} $ price divided by the ${order.inputs.0.token.symbol} $ price.
You can find $ prices for most tokens on dex tools, dex screener and gecko terminal.

For more information about IO ratios and how to calculate them see [Understanding IO Ratios](https://youtu.be/NdPOi1ZDnDk).
- binding: initial-io
name: Kickoff ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol}
description: |
The initial ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol} to kickoff the first auction.

This ratio is calculated in the same way as the baseline ratio.

It must be greater than the baseline ratio, regardless of what you are selling or buying.
This is because getting more input per output is always better for you.
The initial auction will start high (at the value you set here) and then drop to the baseline ratio over time.
Subsequent auctions will start at some % above the last auction price and drop to the baseline ratio over time.
- binding: next-trade-multiplier
name: Auction start multiplier
description: |
The multiplier to apply to the last trade to kick off the next auction.
show-custom-field: true
default: 1.01
presets:
- name: 1.01x
value: 1.01
- name: 1.02x
value: 1.02
- name: 1.05x
value: 1.05
- name: 1.1x
value: 1.1
- binding: next-trade-baseline-multiplier
name: Auction end multiplier
description: |
The multiplier to apply to the last trade to set the baseline for the next auction.
show-custom-field: true
default: 0
presets:
- name: Disabled (0)
value: 0
- name: 0.7x
value: 0.7
- name: 0.8x
value: 0.8
- name: 0.9x
value: 0.9
- name: 0.95x
value: 0.95
- name: 0.99x
value: 0.99
select-tokens:
- key: output
name: Token to Sell
description: Select the token you want to sell
- key: input
name: Token to Buy
description: Select the token you want to purchase
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Eliminate massive GUI configuration duplication

The arbitrum2 GUI configuration duplicates 125+ lines from the arbitrum configuration with only minor name/description changes. This duplication creates a significant maintenance burden and drift risk.

Consider refactoring to use YAML anchors and aliases to share common GUI configuration:

    arbitrum: &arbitrum_gui
      name: Arbitrum
      description: Deploy an auction-based cost averaging strategy on Arbitrum.
      deposits:
        - token: output
      fields:
        # ... existing fields ...
      select-tokens:
        # ... existing tokens ...
    
    arbitrum2:
      <<: *arbitrum_gui
      name: Arbitrum with the updated orderbook
      description: Deploy an auction-based cost averaging strategy on Arbitrum with the updated orderbook.

This approach eliminates duplication while preserving the necessary differences between the two configurations.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/auction-dca.rain between lines 404 and 529, the arbitrum2 GUI
configuration duplicates over 125 lines from the arbitrum configuration with
only minor changes in name and description. To fix this, refactor the YAML to
use anchors and aliases by defining the common configuration once with an anchor
and then referencing it in arbitrum2 with an alias, overriding only the
differing fields like name and description. This will eliminate duplication,
reduce maintenance effort, and prevent drift between configurations.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🔭 Outside diff range comments (1)
settings.yaml (1)

26-31: Add an inline comment explaining the arbitrum2 alias
Duplicated chain-id / network-id fields are intentional here, but future maintainers won’t know why unless it’s documented.

   arbitrum2:
+    # NOTE: Alias for Arbitrum (same chain-id/network-id) that points to the
+    # new orderbook + subgraph while we migrate away from the original
+    # `arbitrum` deployment. Do **not** dedupe.
     rpcs:
       - https://arbitrum-one-rpc.publicnode.com
     chain-id: 42161
     network-id: 42161
     currency: ETH
♻️ Duplicate comments (4)
src/fixed-limit.rain (1)

22-27: Comment missing for duplicated IDs
Same feedback as the previous review: add a brief comment so the alias isn’t “cleaned up” later.

src/dynamic-spread.rain (1)

104-109: Missing explanatory comment for arbitrum2 alias
Exactly the same concern already raised for the other strategy files.

src/auction-dca.rain (2)

84-85: Duplicate deployer address – same concern already raised earlier
This repeats the arbitrum deployer value; consider an alias or anchor to avoid drift.


411-537: Massive GUI duplication – please use YAML anchors / aliases

The arbitrum2 GUI block copies >120 lines from arbitrum with only name/description tweaks.
Same duplication issue called out in previous reviews; refactor as:

    arbitrum: &arbitrum_gui
      # … existing full block …

    arbitrum2:
      <<: *arbitrum_gui
      name: Arbitrum with the updated orderbook
      description: Deploy an auction-based cost averaging strategy on Arbitrum with the updated orderbook.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d5c503 and f51267e.

📒 Files selected for processing (5)
  • settings.yaml (2 hunks)
  • src/auction-dca.rain (9 hunks)
  • src/canary.rain (8 hunks)
  • src/dynamic-spread.rain (9 hunks)
  • src/fixed-limit.rain (9 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
settings.yaml (1)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
src/fixed-limit.rain (4)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:2-6
Timestamp: 2025-04-30T06:32:43.860Z
Learning: The `network-id` field is intentionally omitted for the flare network in the `settings.yaml` configuration file, unlike other networks which include both `chain-id` and `network-id` fields.
Learnt from: thedavidmeister
PR: rainlanguage/rain.strategies#28
File: src/folio.rain:28-42
Timestamp: 2025-07-03T09:47:48.019Z
Learning: In Rain language strategy files, thedavidmeister prefers intentionally oversimplified setups over complex validation logic, especially in initial implementations like the folio strategy configuration.
src/canary.rain (3)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:2-6
Timestamp: 2025-04-30T06:32:43.860Z
Learning: The `network-id` field is intentionally omitted for the flare network in the `settings.yaml` configuration file, unlike other networks which include both `chain-id` and `network-id` fields.
src/auction-dca.rain (2)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
src/dynamic-spread.rain (2)
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
🔇 Additional comments (2)
settings.yaml (1)

85-88: Confirmed: checksum-formatted address is consistent in code
Verified that the address 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc appears unchanged in all strategy files and settings.yaml. Please ensure any CI environment variables or secrets are also updated to this exact value.

• settings.yaml: line 86
• src/fixed-limit.rain: line 81
• src/dynamic-spread.rain: line 163
• src/canary.rain: line 63
• src/auction-dca.rain: line 69

src/auction-dca.rain (1)

68-70: Confirm the new orderbook address is correct

The address 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc differs from the canonical value flagged in earlier CI logs
(0x762adD85a30A83722feF2e029087C9D110B6a7b3). Please verify which contract is the intended target.

Comment on lines +16 to +21
arbitrum2:
rpcs:
- https://arbitrum-one-rpc.publicnode.com
chain-id: 42161
network-id: 42161
currency: ETH
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Document the arbitrum2 alias just like in settings.yaml

A one-liner comment beside this block will save someone from “deduplicating” it later.

🤖 Prompt for AI Agents
In src/canary.rain around lines 16 to 21, add a one-line comment describing the
purpose or meaning of the `arbitrum2` alias similar to the documentation style
used in settings.yaml. This comment should briefly explain what `arbitrum2`
represents to prevent future duplication or confusion.

Comment on lines +10 to +15
arbitrum2:
rpcs:
- https://arbitrum-one-rpc.publicnode.com
chain-id: 42161
network-id: 42161
currency: ETH
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Prefer YAML alias instead of full copy for arbitrum2 network block

arbitrum2 repeats the entire arbitrum stanza (RPC, ids, currency).
Long-term this drifts easily – a single anchor+alias is safer and shorter.

-  arbitrum:            # anchor the canonical block
-    &arbitrum_net
+  arbitrum: &arbitrum_net
     rpcs:
       - https://arbitrum-one-rpc.publicnode.com
     chain-id: 42161
     network-id: 42161
     currency: ETH
-  arbitrum2:
-    rpcs:
-      - https://arbitrum-one-rpc.publicnode.com
-    chain-id: 42161
-    network-id: 42161
-    currency: ETH
+  arbitrum2: *arbitrum_net

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/auction-dca.rain around lines 10 to 15, the arbitrum2 network block
duplicates the entire arbitrum configuration. Refactor this by defining the
arbitrum block once with an anchor, then use a YAML alias to reference it for
arbitrum2. This avoids duplication and keeps the config DRY and easier to
maintain.

@coderabbitai coderabbitai bot mentioned this pull request Jul 8, 2025
4 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jul 23, 2025
4 tasks
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
settings.yaml (1)

101-123: Add missing deployer configurations for base2 and arbitrum2

The deployers section is missing entries for the new network aliases base2 and arbitrum2. Based on the pattern in other configuration files, these should be added to maintain consistency.

Add the missing deployer entries:

  ethereum:
    address: 0xd19581a021f4704ad4eBfF68258e7A0a9DB1CD77
    network: ethereum
+  base2:
+    address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
+    network: base2
+  arbitrum2:
+    address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
+    network: arbitrum2
♻️ Duplicate comments (5)
src/fixed-limit.rain (1)

16-33: Network alias configurations are consistent with established pattern

The base2 and arbitrum2 network configurations correctly duplicate their original counterparts, maintaining the same chain IDs and RPC endpoints. Based on previous discussions, this duplication is intentional for the alias approach to support updated contract deployments.

src/auction-dca.rain (3)

10-33: Network alias configurations follow established pattern

The arbitrum2 and base2 network configurations correctly duplicate their original counterparts. While YAML anchors could reduce duplication as noted in previous reviews, the current approach maintains the established pattern for network aliases.


76-101: Orderbook and deployer configurations properly set up

The orderbook addresses for arbitrum2 and base2 use distinct contract addresses as expected for updated deployments. The deployer configurations appropriately reuse the same addresses as their original counterparts.


441-1077: GUI configurations provide necessary functionality despite duplication

The GUI configurations for arbitrum2 and base2 provide complete functionality with appropriate descriptive names. While the duplication creates maintenance overhead as noted in previous reviews, the configurations correctly support the new network aliases.

src/dynamic-spread.rain (1)

108-125: Same alias comment as in previous review

The network aliases base2 and arbitrum2 have identical chain/network IDs to their original counterparts. As noted in previous reviews, consider documenting why these aliases with identical configurations are necessary to prevent future confusion or accidental removal.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9b2c5b and 357e2de.

📒 Files selected for processing (4)
  • settings.yaml (4 hunks)
  • src/auction-dca.rain (12 hunks)
  • src/dynamic-spread.rain (12 hunks)
  • src/fixed-limit.rain (12 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
Learnt from: findolor
PR: rainlanguage/rain.strategies#29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the `matchain` network referenced in `orderbooks` and `deployers` sections of the configuration YAML doesn't require an explicit definition in the `networks` section.
settings.yaml (1)

Learnt from: Siddharth2207
PR: #42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, arbitrum2 is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing arbitrum configuration during transition periods.

src/fixed-limit.rain (4)

Learnt from: Siddharth2207
PR: #42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, arbitrum2 is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing arbitrum configuration during transition periods.

Learnt from: findolor
PR: #29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the matchain network referenced in orderbooks and deployers sections of the configuration YAML doesn't require an explicit definition in the networks section.

Learnt from: findolor
PR: #29
File: settings.yaml:2-6
Timestamp: 2025-04-30T06:32:43.860Z
Learning: The network-id field is intentionally omitted for the flare network in the settings.yaml configuration file, unlike other networks which include both chain-id and network-id fields.

Learnt from: thedavidmeister
PR: #28
File: src/folio.rain:28-42
Timestamp: 2025-07-03T09:47:48.019Z
Learning: In Rain language strategy files, thedavidmeister prefers intentionally oversimplified setups over complex validation logic, especially in initial implementations like the folio strategy configuration.

src/dynamic-spread.rain (2)

Learnt from: Siddharth2207
PR: #42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, arbitrum2 is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing arbitrum configuration during transition periods.

Learnt from: findolor
PR: #29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the matchain network referenced in orderbooks and deployers sections of the configuration YAML doesn't require an explicit definition in the networks section.

src/auction-dca.rain (5)

Learnt from: Siddharth2207
PR: #42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, arbitrum2 is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing arbitrum configuration during transition periods.

Learnt from: findolor
PR: #29
File: settings.yaml:1-35
Timestamp: 2025-04-30T06:32:49.466Z
Learning: In the Rain Strategies project, the matchain network referenced in orderbooks and deployers sections of the configuration YAML doesn't require an explicit definition in the networks section.

Learnt from: Siddharth2207
PR: #56
File: settings.yaml:74-74
Timestamp: 2025-07-25T04:36:42.928Z
Learning: In the Rain Strategies project settings.yaml file, Ethereum addresses should use checksum format (EIP-55 with mixed case) rather than all lowercase, as the checksum format provides error detection benefits that outweigh visual consistency concerns.

Learnt from: findolor
PR: #29
File: settings.yaml:36-44
Timestamp: 2025-04-30T06:33:10.474Z
Learning: URLs in YAML files for the rain.strategies repository don't need to be quoted according to the project maintainer's preference, even though they contain characters like "://" that might be misinterpreted by some YAML parsers.

Learnt from: thedavidmeister
PR: #28
File: src/folio.rain:119-119
Timestamp: 2025-07-03T09:46:28.864Z
Learning: In Rain language configuration files, binding values like threshold are compile-time constants, so validation errors (such as division by zero) are caught during compilation rather than requiring runtime checks.

🔇 Additional comments (15)
settings.yaml (3)

47-50: LGTM - Updated subgraph URLs for new network aliases

The subgraph URLs for base2 and arbitrum2 correctly use newer deployment dates (2025-07-03) compared to their original counterparts, which aligns with these being aliases for updated contract deployments.


57-60: LGTM - Metaboard URLs appropriately shared

The metaboard URLs for base2 and arbitrum2 correctly reference the same endpoints as their original counterparts, which is appropriate since metaboards operate at the network level rather than contract level.


73-88: LGTM - Orderbook configurations properly set up

The orderbook configurations for base2 and arbitrum2 correctly specify:

  • Distinct contract addresses for the updated deployments
  • Proper network field references (base for base2, arbitrum2 for arbitrum2)
  • Appropriate subgraph mappings

The correction of the arbitrum2 network field ensures consistency across the configuration.

src/fixed-limit.rain (3)

202-207: Verify orderbook reference in base2 scenario

The base2 scenario references orderbook: base instead of orderbook: base2. This seems inconsistent with the pattern where scenarios typically reference their corresponding orderbook aliases.

Please verify if this is intentional or if it should be:

  base2:
-   orderbook: base
+   orderbook: base2
    runs: 1

106-248: Deployers, orders, and deployments sections properly configured

The deployer addresses correctly reuse the same addresses as their original counterparts, and the orders and deployments sections maintain proper referential consistency between their respective components.


283-394: GUI configurations appropriately distinguish updated variants

The GUI configurations for base2 and arbitrum2 maintain identical functionality while clearly labeling the arbitrum2 variant as "Arbitrum with the updated orderbook" to help users distinguish between the original and updated deployments.

src/auction-dca.rain (1)

126-295: Orders, scenarios, and deployments maintain proper structure

The order configurations correctly reference their respective orderbooks, and the deployment configurations properly link orders with scenarios. The structural relationships are maintained consistently across the new network aliases.

src/dynamic-spread.rain (8)

14-23: LGTM! Arbitrum2 scenario configuration is consistent.

The new arbitrum2 scenario follows the established pattern with updated raindex-subparser address while maintaining identical bindings for other parameters.


34-43: LGTM! Base2 scenario configuration is consistent.

The new base2 scenario maintains consistency with the established pattern, using an updated raindex-subparser address while preserving identical bindings for other parameters.


154-156: LGTM! Metaboards and subgraphs configurations are consistent.

The arbitrum2 and base2 entries correctly reference the same URLs as their original counterparts, maintaining consistency with the alias pattern.

Also applies to: 165-167


178-179: LGTM! Updated orderbook addresses for the new aliases.

The arbitrum2 and base2 entries correctly use new orderbook contract addresses, which aligns with the purpose of these aliases for deploying with updated contract versions.

Also applies to: 182-183


198-199: LGTM! Deployer addresses correctly maintained.

The arbitrum2 and base2 deployer addresses are identical to their original counterparts, which is appropriate since the deployer infrastructure remains unchanged while only orderbook contracts are updated.

Also applies to: 202-203


222-229: LGTM! Orders configuration is consistent with the alias pattern.

The arbitrum2 and base2 orders correctly reference their respective new orderbooks while maintaining identical token input/output structures for compatibility.

Also applies to: 238-245


291-293: LGTM! Deployments correctly link new orders and scenarios.

The arbitrum2 and base2 deployments properly connect the corresponding orders and scenarios, creating complete deployment configurations for the new network aliases.

Also applies to: 297-299


402-482: LGTM! GUI configurations appropriately adapted for updated orderbooks.

The arbitrum2 and base2 GUI configurations correctly duplicate their original counterparts with updated names and descriptions that clearly indicate usage of updated orderbooks. All field configurations, deposits, and token selection remain consistent for user experience continuity.

Also applies to: 564-644

@coderabbitai coderabbitai bot mentioned this pull request Jul 26, 2025
4 tasks
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/dynamic-spread.rain (1)

194-203: Duplicate deployers – prefer YAML anchors to avoid drift

Same deployer values for alias networks; use anchors for maintainability.

 deployers:
-  arbitrum:
-    address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
+  arbitrum: &arb_deployer
+    address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
   ...
-  arbitrum2:
-    address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
+  arbitrum2: *arb_deployer

Also applies to: 198-199

♻️ Duplicate comments (5)
src/fixed-limit.rain (1)

16-21: Alias networks added correctly; document why to prevent future pruning
base2 and arbitrum2 duplicate IDs intentionally. Add a short note explaining the alias purpose (updated contracts on same chain).

   base2:
+    # NOTE: alias of base (same IDs); routes to updated orderbook/contracts.
     rpcs:
       - https://base-rpc.publicnode.com
...
   arbitrum2:
+    # NOTE: alias of arbitrum (same IDs); routes to updated orderbook/contracts.
     rpcs:
       - https://arbitrum-one-rpc.publicnode.com

Also applies to: 28-33

src/auction-dca.rain (3)

10-15: Alias networks are fine; prefer anchors to avoid duplication

-  arbitrum:
-    rpcs:
+  arbitrum: &arb_net
+    rpcs:
       - https://arbitrum-one-rpc.publicnode.com
     chain-id: 42161
     network-id: 42161
     currency: ETH
-  arbitrum2:
-    rpcs:
-      - https://arbitrum-one-rpc.publicnode.com
-    chain-id: 42161
-    network-id: 42161
-    currency: ETH
+  arbitrum2: *arb_net

Also applies to: 28-33


191-199: YAML parse error: triple single-quotes

baseline-fn and initial-io-fn use '''... which is invalid YAML. File will fail to load.

       baseline-fn: '''constant-baseline'
       initial-io-fn: '''constant-initial-io'
+      # fix:
-      baseline-fn: '''constant-baseline'
-      initial-io-fn: '''constant-initial-io'
+      baseline-fn: 'constant-baseline'
+      initial-io-fn: 'constant-initial-io'

Please fix the same pattern in other scenarios in this file too.

Also applies to: 218-226


441-567: Massive GUI duplication for arbitrum2/base2 – DRY with anchors

Define the base GUI once and reuse with <<: merges; override only name/description.

     arbitrum: &arb_gui
       name: Arbitrum
       description: Deploy an auction-based cost averaging strategy on Arbitrum.
       deposits:
         - token: output
       fields:
         # ... unchanged ...
       select-tokens:
         # ... unchanged ...
-    arbitrum2:
-      name: Arbitrum with the updated orderbook
-      description: Deploy an auction-based cost averaging strategy on Arbitrum with the updated orderbook.
-      deposits:
-        - token: output
-      fields:
-        ...
-      select-tokens:
-        ...
+    arbitrum2:
+      <<: *arb_gui
+      name: Arbitrum with updated orderbook
+      description: Deploy an auction-based cost averaging strategy on Arbitrum with the updated orderbook.

Also applies to: 951-1076

src/dynamic-spread.rain (1)

108-125: Alias networks OK; add a short comment to document intent

Duplicated IDs for base2/arbitrum2 are intentional aliases. Add a one-liner to prevent future “cleanup.”

   base2:
+    # alias of base (same IDs), routes to updated orderbook
     rpcs:
       - https://base-rpc.publicnode.com
...
   arbitrum2:
+    # alias of arbitrum (same IDs), routes to updated orderbook
     rpcs:
       - https://arbitrum-one-rpc.publicnode.com
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fddae45 and 6f052d3.

📒 Files selected for processing (4)
  • settings.yaml (4 hunks)
  • src/auction-dca.rain (12 hunks)
  • src/dynamic-spread.rain (12 hunks)
  • src/fixed-limit.rain (12 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.
📚 Learning: 2025-06-19T03:59:46.063Z
Learnt from: Siddharth2207
PR: rainlanguage/rain.strategies#42
File: src/fixed-limit.rain:19-23
Timestamp: 2025-06-19T03:59:46.063Z
Learning: In rain.strategies configuration files, `arbitrum2` is an intentional alias for the Arbitrum network (same chain-id 42161) but with updated contract addresses. It serves as a deployment target for newer contract versions while maintaining the existing `arbitrum` configuration during transition periods.

Applied to files:

  • src/fixed-limit.rain
  • settings.yaml
  • src/dynamic-spread.rain
  • src/auction-dca.rain
📚 Learning: 2025-09-01T12:19:42.343Z
Learnt from: findolor
PR: rainlanguage/rain.strategies#59
File: src/fixed-limit.rain:68-68
Timestamp: 2025-09-01T12:19:42.343Z
Learning: In the rain.strategies repository, the team plans to replace contract addresses in the configuration files, and deployment-block values will be updated as part of that broader effort, so placeholder values like 1 are intentionally temporary.

Applied to files:

  • src/fixed-limit.rain
  • src/auction-dca.rain
🔇 Additional comments (8)
settings.yaml (2)

73-76: Confirm intent: base2 orderbook uses network: base

If base2 is meant to be a full alias like arbitrum2, add networks.base2 for symmetry; otherwise keeping network: base is fine but please confirm this difference is intentional to avoid future drift.


64-76: Verify EIP-55 checksums and cross-file consistency for orderbook addresses

RG scan found no duplicate orderbooks.*.address entries, but the checksum validation step failed due to missing eth_utils. Please manually confirm that all orderbooks.*.address values in settings.yaml (and any references in .rain files) use the proper EIP-55 checksummed format and remain consistent across the codebase.

src/fixed-limit.rain (2)

70-76: Subgraph placeholders

https://example.com/subgraph looks like a stub. Ensure this is resolved before release or clearly documented as intentionally unused here (since settings.yaml carries real URLs).


86-91: Addresses align with settings; double-check against deploy artifacts

base2 and arbitrum2 orderbooks match settings.yaml. Please confirm against the latest deployment job to avoid stale addresses.

src/auction-dca.rain (2)

53-69: Subgraph placeholders

https://example.com/subgraph entries look placeholder. Confirm they are intentionally unused here and real endpoints come from settings.yaml; otherwise update before release.

Also applies to: 63-69


73-76: Orderbook addresses for arbitrum2 and base2 match settings.yaml; no action required.

src/dynamic-spread.rain (2)

173-183: Orderbook addresses – verify against deploys

arbitrum2/base2 addresses match other files; confirm they match the latest deployment artifacts (a previous comment suggested a different Base address).

If needed, update:

-    address: 0x881cf4c0764e733d9C387f3858eE87CcA04AFFe0
+    address: 0x762adD85a30A83722feF2e029087C9D110B6a7b3

151-160: Subgraph/metaboard URLs: placeholders vs real endpoints

Placeholders under subgraphs: contrast with real Goldsky URLs under metaboards:. Confirm runtime uses these correctly or align with settings.yaml.

Also applies to: 162-171

Comment on lines 85 to 88
arbitrum2:
address: 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc
network: arbitrum
network: arbitrum2
subgraph: arbitrum2
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: orderbooks.arbitrum2.network references undefined network in this file

network: arbitrum2 has no corresponding entry under networks: here, which will break resolution. Add the alias block or revert network to arbitrum.

Apply one of the following:

Option A — add alias (recommended, matches repo pattern):

 networks:
   arbitrum:
     rpcs:
       - https://arbitrum-one-rpc.publicnode.com
     chain-id: 42161
     network-id: 42161
     currency: ETH
+  arbitrum2:
+    # NOTE: alias of arbitrum; identical IDs, updated contracts.
+    rpcs:
+      - https://arbitrum-one-rpc.publicnode.com
+    chain-id: 42161
+    network-id: 42161
+    currency: ETH

Option B — keep pointing at canonical network:

   arbitrum2:
     address: 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc
-    network: arbitrum2
+    network: arbitrum
     subgraph: arbitrum2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
arbitrum2:
address: 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc
network: arbitrum
network: arbitrum2
subgraph: arbitrum2
arbitrum2:
address: 0xF6FdCB30FD027C73cBacD54E22f02987E3116eBc
network: arbitrum
subgraph: arbitrum2
🤖 Prompt for AI Agents
In settings.yaml around lines 85 to 88, the orderbooks.arbitrum2 entry sets
network: arbitrum2 but there is no corresponding alias under networks:, breaking
resolution; fix by either (recommended) adding a networks: alias entry mapping
arbitrum2 to the canonical arbitrum network (matching repo alias pattern), or
change network: arbitrum2 back to network: arbitrum so it references the
existing canonical network entry.

Comment on lines +951 to +954
base2:
name: Base
description: Deploy an auction-based cost averaging strategy on Base with updated orderbook
deposits:
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

GUI name for base2 should reflect updated orderbook

Use the same naming convention as arbitrum2.

-      name: Base
-      description: Deploy an auction-based cost averaging strategy on Base with updated orderbook
+      name: Base with updated orderbook
+      description: Deploy an auction-based cost averaging strategy on Base with updated orderbook.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
base2:
name: Base
description: Deploy an auction-based cost averaging strategy on Base with updated orderbook
deposits:
base2:
name: Base with updated orderbook
description: Deploy an auction-based cost averaging strategy on Base with updated orderbook.
deposits:
🤖 Prompt for AI Agents
In src/auction-dca.rain around lines 951-954, the GUI name for base2 currently
reads "Base" but must reflect the updated orderbook using the same naming
convention as arbitrum2; update the name field to match arbitrum2's pattern
(e.g., include "(updated orderbook)" or "(orderbook v2)" suffix) so the GUI
shows that base2 uses the revised orderbook.

Comment on lines +106 to +111
base2:
address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
arbitrum:
address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
arbitrum2:
address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Duplicate deployer addresses – consider YAML anchors to avoid drift

base2/arbitrum2 redeclare the same deployers. Use anchors/aliases to keep single source of truth.

 deployers:
-  base:
-    address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
+  base: &base_deployer
+    address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
   ...
-  base2:
-    address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
+  base2: *base_deployer

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/fixed-limit.rain around lines 106 to 111, the same deployer address is
duplicated for base2, arbitrum, and arbitrum2; replace the repeated literal with
a YAML anchor defined once (e.g., define &deployerAddress at the first
occurrence) and use aliases (*deployerAddress) for the other environments so
they reference a single source of truth and avoid drift.

Comment on lines +379 to +387
arbitrum2:
name: Arbitrum with the updated orderbook
description: Deploy a limit order on Arbitrum with the updated orderbook.
deposits:
- token: token2
fields:
- binding: fixed-io
name: ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol}
description: Fixed exchange rate (${order.inputs.0.token.symbol} received per 1 ${order.outputs.0.token.symbol} sold)
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Naming consistency

Prefer “with updated orderbook” (no “the”) to match base2 entry.

-      name: Arbitrum with the updated orderbook
+      name: Arbitrum with updated orderbook
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
arbitrum2:
name: Arbitrum with the updated orderbook
description: Deploy a limit order on Arbitrum with the updated orderbook.
deposits:
- token: token2
fields:
- binding: fixed-io
name: ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol}
description: Fixed exchange rate (${order.inputs.0.token.symbol} received per 1 ${order.outputs.0.token.symbol} sold)
arbitrum2:
name: Arbitrum with updated orderbook
description: Deploy a limit order on Arbitrum with the updated orderbook.
deposits:
- token: token2
fields:
- binding: fixed-io
name: ${order.inputs.0.token.symbol} per ${order.outputs.0.token.symbol}
description: Fixed exchange rate (${order.inputs.0.token.symbol} received per 1 ${order.outputs.0.token.symbol} sold)
🤖 Prompt for AI Agents
In src/fixed-limit.rain around lines 379 to 387, the description "Deploy a limit
order on Arbitrum with the updated orderbook." uses "the updated orderbook" but
should match the base2 entry's phrasing "with updated orderbook"; update the
description to remove the article "the" so it reads "Deploy a limit order on
Arbitrum with updated orderbook." to maintain naming consistency.

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