Skip to content

Fix stale comments on FixLib.mul, castSpell, and tradingDelay - #1316

Merged
tbrent merged 5 commits into
4.3.0-audit-torange-roundingfrom
4.3.0-audit-comments
Dec 1, 2026
Merged

tbrent merged 5 commits into
4.3.0-audit-torange-roundingfrom
4.3.0-audit-comments

Conversation

@tbrent

@tbrent tbrent commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes three stale comments. No code changes.

Stacked on #1315.

Why

Trust audit finding "Incorrect Comments" (QA).

  • FixLib.mul(x, y) was documented as rounding to nearest. It rounds down since Certora Formal Verification #1283.
  • The 4.3.0 spell's doc comment named the entrypoint spell(). It is castSpell().
  • tradingDelay was described as a "delay for automatic trading after default". The delay runs from the basket switch, not the default, and it applies to any basket switch not made by governance. For example, governance can disable the basket through swapRegistered() or unregister(), and the permissionless refresh that follows is delayed.

Changes

  • contracts/libraries/Fixed.sol
  • contracts/spells/4_3_0.sol
  • contracts/interfaces/IDeployer.sol, contracts/p1/BackingManager.sol, contracts/p0/BackingManager.sol

Verification

  • Compiles. Solhint reports no errors on the changed files.

🤖 Generated with Claude Code

- FixLib.mul(x, y) rounds down since #1283
- the 4.3.0 spell entrypoint is castSpell(), not spell()
- tradingDelay runs from any basket switch not made by governance, not
  only after a default

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f538a40-d5cf-4d52-98b0-114e3efc5855
Commits

Reviewing files that changed from the base of the PR and between 567b964 and 3fae77e.

Files selected for processing: 5

  • contracts/interfaces/IDeployer.sol
  • contracts/libraries/Fixed.sol
  • contracts/p0/BackingManager.sol
  • contracts/p1/BackingManager.sol
  • contracts/spells/4_3_0.sol
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@akshatmittal
akshatmittal added this pull request to stack #1318 November 27, 2026 19:44
akshatmittal
akshatmittal previously approved these changes Nov 30, 2026
@tbrent
tbrent merged commit bd01378 into master Dec 1, 2026
17 checks passed
@tbrent
tbrent deleted the 4.3.0-audit-comments branch December 1, 2026 17:31
tbrent added a commit that referenced this pull request Dec 1, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tbrent added a commit that referenced this pull request Dec 1, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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