Skip to content

Conversation

@hivtushok
Copy link
Contributor

@hivtushok hivtushok commented Oct 30, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved slippage validation error messaging to more accurately indicate when share inflation is detected during deposit operations.
  • Tests

    • Updated test cases to validate corrected error message for inflated share detection.

@hivtushok hivtushok self-assigned this Oct 30, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Walkthrough

Error message in ERC4626 slippage validation updated from "ForeignController/slippage-too-high" to "ForeignController/inflated-shares" across implementation and test files. No logic or control-flow modifications.

Changes

Cohort / File(s) Summary
Error message harmonization
src/ForeignController.sol, test/base-fork/Morpho.t.sol
Updated slippage check error message from "ForeignController/slippage-too-high" to "ForeignController/inflated-shares" in both contract and corresponding test assertion

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

This is a straightforward error message string update with no logic changes. Verification involves confirming the message is consistently updated across the contract and test file.

Suggested labels

Priority: Medium

Suggested reviewers

  • lucas-manuel
  • supercontracts

Poem

🐰 A message refined, more clear and precise,
"Inflated shares" rings truer than spice,
The logic stays steady, the test agrees,
Error strings polished with formal-proof ease! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Linked Issues Check ❓ Inconclusive The linked issue SC-1220 (Certora: Issue I-03) is provided but contains no description or specific requirements to validate against. Without the actual content of the issue describing what needs to be implemented, it is impossible to conclusively determine whether the code changes satisfy all primary objectives and requirements. The PR updates an error message and its corresponding test expectation, but without seeing the issue's detailed requirements, the compliance cannot be fully verified. To resolve this, please provide the complete description and requirements from the linked issue SC-1220 so that the code changes can be validated against the specific objectives outlined in the Certora Issue I-03.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes Check ✅ Passed The changes in this PR are narrowly focused and appear directly related to the stated objective of fixing a Certora issue. The modifications include an error message update in ForeignController.sol and a corresponding test expectation update in test/base-fork/Morpho.t.sol. Both changes are tightly scoped to the error message fix indicated by the PR title, with no alterations to exported or public entity declarations. No extraneous modifications or unrelated changes are evident in the provided summary.
Title Check ✅ Passed The pull request title "fix: Certora [I-02] Error message (SC-1220)" meets the specified requirements. It starts with "fix:" which follows the required format of one word followed by a colon. The title is concise and descriptive, clearly indicating this is a fix related to a Certora finding addressing an error message issue. The title is directly related to the changeset, which updates error messages in ForeignController.sol from "slippage-too-high" to "inflated-shares" and updates corresponding tests to match.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/sc-1220-i03

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.

@hivtushok hivtushok changed the title fix: Certora [I-02] Error message (SC-1220) fix: Certora [I-03] Error message (SC-1220) Oct 30, 2025
@github-actions
Copy link

Coverage after merging fix/sc-1220-i03 into dev will be

99.85%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
deploy
   ControllerDeploy.sol100%100%100%100%
   ForeignControllerInit.sol100%100%100%100%
   MainnetControllerInit.sol97.37%93.33%100%100%152, 90
src
   ALMProxy.sol100%100%100%100%
   ALMProxyFreezable.sol100%100%100%100%
   ForeignController.sol98.75%95.45%100%99.12%296–297
   MainnetController.sol100%100%100%100%
   OTCBuffer.sol100%100%100%100%
   RateLimitHelpers.sol100%100%100%100%
   RateLimits.sol100%100%100%100%
src/libraries
   CCTPLib.sol100%100%100%100%
   CurveLib.sol100%100%100%100%
   PSMLib.sol100%100%100%100%

@lucas-manuel lucas-manuel merged commit dbbe9c8 into dev Oct 30, 2025
4 checks passed
@lucas-manuel lucas-manuel deleted the fix/sc-1220-i03 branch October 30, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants