Conversation
🦋 Changeset detectedLatest commit: 71f7df6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughAuditor adds configurable non-collateral markets. Collateral, liquidity, liquidation, bad-debt, and preview calculations exclude these markets while retaining debt accounting. Deployment scripts, periphery contracts, upgrade compatibility, and protocol tests support the expanded market metadata. ChangesNon-collateral market support
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Admin
participant Auditor
participant Previewer
participant Market
Admin->>Auditor: enableMarket(..., nonCollateral)
Auditor-->>Previewer: return market metadata and nonCollateral
Previewer->>Market: calculate collateral and debt effects
Market->>Auditor: execute liquidity or liquidation check
Auditor-->>Market: exclude non-collateral collateral and retain debt
Merge Risk: 🔵 Low · up to Non-collateral markets now affect collateral, borrowing, liquidation, and preview behavior. Merge readiness is low risk, but two regression tests still do not specifically verify the admin restriction and zero-collateral liquidation rejection. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/Protocol.t.sol (1)
630-641: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winLoad metadata for
collateralMarket.Line 636 loads metadata for
marketagain. Lines 637-641 valuecollateralMarket's balance. If the markets use different decimals or adjust factors, the bad-debt assertion calculates incorrect adjusted collateral.Proposed fix
- (b.adjustFactor, b.decimals, , , , ) = auditor.markets(market); + (b.adjustFactor, b.decimals, , , , ) = auditor.markets(collateralMarket);
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 782541f2-ee53-44a7-9913-bbf7b6db3376
📒 Files selected for processing (28)
.changeset/brave-otter-glides.md.gas-snapshotcontracts/Auditor.solcontracts/periphery/DebtManager.solcontracts/periphery/DebtPreviewer.solcontracts/periphery/DebtRoller.solcontracts/periphery/InstallmentsRouter.solcontracts/periphery/IntegrationPreviewer.solcontracts/periphery/Previewer.soldeploy/Markets.tshardhat.config.tstest/Auditor.t.soltest/AuditorUpgrade.t.soltest/DebtManager.t.soltest/DebtPreviewer.t.soltest/DebtRoller.t.soltest/InstallmentsRouter.t.soltest/IntegrationPreviewer.t.soltest/Market.t.soltest/Pauser.t.soltest/Previewer.t.soltest/Protocol.t.soltest/RewardsController.t.soltest/VerifiedMarket.t.soltest/hardhat/0_admin.tstest/hardhat/1_auditor.tstest/hardhat/defaultEnv.tstest/hardhat/marketEnv.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fd6a4276d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
9fd6a42 to
d4a2b81
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4a2b81e02
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #815 +/- ##
==========================================
- Coverage 94.82% 94.79% -0.04%
==========================================
Files 31 31
Lines 2724 2745 +21
Branches 457 368 -89
==========================================
+ Hits 2583 2602 +19
- Misses 140 142 +2
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d4a2b81 to
ce13b65
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce13b6524e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: aac7bf33-b255-4786-baff-9a3d60a7c825
📒 Files selected for processing (7)
.gas-snapshotcontracts/Auditor.solhardhat.config.tstest/Auditor.t.soltest/AuditorUpgrade.t.soltest/Market.t.soltest/Protocol.t.sol
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
ce13b65 to
d764c05
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d764c05998
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f0d8d592-30a5-41ce-9290-1fc80d7f7e13
📒 Files selected for processing (2)
.gas-snapshottest/Auditor.t.sol
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
d764c05 to
6c022f3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1337db45f6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary by CodeRabbit
New Features
Compatibility