Skip to content

Update auction#95

Open
Siddharth2207 wants to merge 6 commits intomainfrom
2026-03-16-update-auction
Open

Update auction#95
Siddharth2207 wants to merge 6 commits intomainfrom
2026-03-16-update-auction

Conversation

@Siddharth2207
Copy link
Copy Markdown
Contributor

@Siddharth2207 Siddharth2207 commented Mar 16, 2026

Motivation

Update auction

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 PRE/POST equity price feed variants across multiple oracle sources.
    • Introduced a configurable oracle price timeout with presets (5m, 1h, 8h, 3d) and applied it to baseline price calculations.
  • Chores

    • Updated registry entries to use a new base path for strategy resource links.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

Walkthrough

Registry entries moved from one raw.githubusercontent base path to a new commit-based base path in settings.yaml. src/auction-dca.rain adds a new public binding oracle-price-timeout with UI presets and replaces fixed baseline timeout usages; PRE/POST price-feed variants added for many equities.

Changes

Cohort / File(s) Summary
Registry Configuration
settings.yaml
Updated registry entry base paths to point to the new raw.githubusercontent commit hash (all registry URLs moved from the old base path to the new base path).
Auction DCA Price Feeds & Bindings
src/auction-dca.rain
Added oracle-price-timeout public binding with UI description and presets (5 min, 1 hr, 8 hrs, 3 days). Replaced hard-coded 86400s baseline with oracle-price-timeout across pyth baseline computations (including inverted variants). Added PRE/POST price-feed entries for numerous equities and updated subparser target addresses where applicable.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update auction' is vague and generic, lacking specific detail about what aspect of the auction system was updated. Consider using a more descriptive title that specifies the main change, such as 'Update auction-dca oracle price timeout configuration' or 'Add oracle-price-timeout binding to auction-dca'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-03-16-update-auction
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link
Copy Markdown

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/auction-dca.rain`:
- Around line 565-566: Update the user-facing preset label string "name: 8 hour
(28800)" to correct grammar by changing it to "name: 8 hours (28800)" and make
the same change for the duplicate preset occurrence later in the file (the other
"name: 8 hour (28800)" instance); ensure only the label text is changed and the
corresponding "value: 28800" remains unchanged so behavior is not affected.
- Around line 554-560: The default for the configuration key
oracle-price-timeout was reduced to 300 (5 minutes), which is a breaking change;
revert this default back to the prior/legacy value used before this change
(restore the former numeric default), apply the same revert to the other
occurrence of oracle-price-timeout, and ensure any related presets/docs/tests
are updated to reflect the restored default so deployments keep the original
staleness tolerance by default.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a3d7d532-6f30-4a6a-a1a8-0b4d1c832ef0

📥 Commits

Reviewing files that changed from the base of the PR and between 9dd6490 and 461672c.

📒 Files selected for processing (2)
  • registry
  • src/auction-dca.rain

Comment thread src/auction-dca.rain
Comment on lines +554 to +560
- binding: oracle-price-timeout
name: Oracle Price Timeout
description: |
How fresh (recent) the price is.
show-custom-field: true
default: 300
presets:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Default timeout drops from prior behavior to 5 minutes and can break expected auction execution windows.

Setting oracle-price-timeout default to 300 materially tightens staleness tolerance. If the prior behavior relied on a much longer timeout, this is a breaking default change for new deployments unless users override it.

Suggested fix (preserve legacy behavior by default)
         - binding: oracle-price-timeout
           name: Oracle Price Timeout
           description: |
             How fresh (recent) the price is.
           show-custom-field: true
-          default: 300
+          default: 86400
           presets:
             - name: 5 minutes (300)
               value: 300
             - name: 1 hour (3600)
               value: 3600
             - name: 8 hour (28800)
               value: 28800
+            - name: 24 hours (86400)
+              value: 86400
             - name: 3 days (259200)
               value: 259200

Also applies to: 727-733

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/auction-dca.rain` around lines 554 - 560, The default for the
configuration key oracle-price-timeout was reduced to 300 (5 minutes), which is
a breaking change; revert this default back to the prior/legacy value used
before this change (restore the former numeric default), apply the same revert
to the other occurrence of oracle-price-timeout, and ensure any related
presets/docs/tests are updated to reflect the restored default so deployments
keep the original staleness tolerance by default.

Comment thread src/auction-dca.rain
Comment on lines +565 to +566
- name: 8 hour (28800)
value: 28800
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix preset label grammar (8 hour8 hours).

This is user-facing text in both deployment forms.

Suggested fix
-            - name: 8 hour (28800)
+            - name: 8 hours (28800)
               value: 28800

Also applies to: 738-739

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/auction-dca.rain` around lines 565 - 566, Update the user-facing preset
label string "name: 8 hour (28800)" to correct grammar by changing it to "name:
8 hours (28800)" and make the same change for the duplicate preset occurrence
later in the file (the other "name: 8 hour (28800)" instance); ensure only the
label text is changed and the corresponding "value: 28800" remains unchanged so
behavior is not affected.

Copy link
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@registry`:
- Around line 1-9: The registry currently pins resources to commit
46b9e1e34aac97555831f0f466ef548d3a599987 which isn't on main yet; revert the
commit-specific URLs in the registry (the lines referencing settings.yaml and
the strategy .rain URLs) to either unpinned/main branch URLs or remove the pins,
and leave a TODO comment to update these URLs to the final main commit hash
after this PR is merged so the registry only references commit hashes that exist
on main.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fb13416b-544e-4e84-987c-e913185dd451

📥 Commits

Reviewing files that changed from the base of the PR and between 461672c and bb6d92f.

📒 Files selected for processing (2)
  • registry
  • src/auction-dca.rain

Comment thread registry
Comment on lines +1 to +9
https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/settings.yaml
fixed-limit https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/fixed-limit.rain
auction-dca https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/auction-dca.rain
grid https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/grid.rain
dynamic-spread https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/dynamic-spread.rain
canary https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/canary.rain
claims https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/claims.rain
fixed-spread https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/fixed-spread.rain
folio https://raw.githubusercontent.com/rainlanguage/rain.strategies/46b9e1e34aac97555831f0f466ef548d3a599987/src/folio.rain
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify if the commit hash exists on main branch
git fetch origin main
git branch --contains 46b9e1e34aac97555831f0f466ef548d3a599987 | grep -E '^\*?\s*main$' || echo "Commit not found on main branch"

Repository: rainlanguage/rain.strategies

Length of output: 219


Update registry after merging to main.

The commit hash 46b9e1e34aac97555831f0f466ef548d3a599987 does not exist on the main branch yet. Registry URLs must be pinned only after changes are merged to main, per coding guidelines. Update the registry file once this PR is merged and the commit is available on main.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@registry` around lines 1 - 9, The registry currently pins resources to commit
46b9e1e34aac97555831f0f466ef548d3a599987 which isn't on main yet; revert the
commit-specific URLs in the registry (the lines referencing settings.yaml and
the strategy .rain URLs) to either unpinned/main branch URLs or remove the pins,
and leave a TODO comment to update these URLs to the final main commit hash
after this PR is merged so the registry only references commit hashes that exist
on main.

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