Audit fixes for #430 - #498
Merged
duncancmt merged 358 commits intoApr 7, 2026
Merged
Conversation
Remove verbose sections that duplicate standard knowledge: - Condense Error Handling to focus on assembly revert optimization - Simplify Reentrancy Protection to project-specific transient storage guard - Streamline "Test the Real Contract" section while keeping key guidance - Remove generic "Running Tests" section (commands are in CI workflow files) - Condense Commit Hygiene to essential rules - Replace generic Cast/Forge section with Settler-specific commands only - Add reference to forge-std library Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove Testing Best Practices and Testing Checklist (redundant) - Remove Environment Variables section (duplicate of Test Commands) - Condense CI Workflow to reference workflow files directly - Condense Prerequisites to single line - Remove Continuous Learning section (generic advice) - Condense Types of Tests while keeping project-specific examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
re: #528 (comment) The first arg for `revertTooMuchSlippage` should be the buy token https://github.com/0xProject/0x-settler/blob/97c2531d7d8a54e6079543973ceb8901c41fbd1f/src/core/SettlerErrors.sol#L34 Notes: - Used the Bug! commit style since I noticed it elsewhere - Let me know if you'd like me to add some sort of test on top of this PR
Re-adding limited "full" (Maker-deprecated) PSM support for USDD. Previous implementation: 1b345c27
Renegade's `sponsorMalleableAtomicMatchSettle` has fixed calldata positions: word 0 = `quoteAmount (USDC)`, word 1 = `baseAmount` ([source](https://github.com/renegade-fi/renegade-contracts/blob/main/src/darkpool/v1/contracts/GasSponsor.sol#L236-L238)). The previous code assumed word 0 was always the sell amount, which was only true for sell-quote (USDC → WETH) `sellToRenegade` now takes `bool isSellingBase` to handle both trade directions The original implementation ([PR #426](#426)) was built assuming sell quote (USDC) only. Some [context I found](https://0xproject.slack.com/archives/C05PX7R2K18/p1763044983061489?thread_ts=1760212095.935569&cid=C05PX7R2K18) (@e1Ru1o lmk if i'm interpreting correctly) Verified against: - Renegade contract source - Live API responses for both directions on Base and Arbitrum - On-chain txs ([`0xbfcb0bcd`](https://basescan.org/tx/0xbfcb0bcd28de600cbca36a3be9630aeed3b0d44be2e78a21e46f0abc64414085), [`0x937b0111`](https://arbiscan.io/tx/0x937b0111b64ce852f1202c324753f6e1066d1137e5aee5d2a076997b3c873dec))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.