Skip to content

Audit fixes for #430 - #498

Merged
duncancmt merged 358 commits into
dcmt/crosschainreceiver2from
dcmt/crosschainreceiver2-fixes
Apr 7, 2026
Merged

Audit fixes for #430#498
duncancmt merged 358 commits into
dcmt/crosschainreceiver2from
dcmt/crosschainreceiver2-fixes

Conversation

@duncancmt

Copy link
Copy Markdown
Collaborator

No description provided.

e1Ru1o and others added 30 commits January 15, 2026 11:12
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>
jparklev and others added 27 commits March 24, 2026 12:02
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))
@duncancmt
duncancmt requested a review from dekz as a code owner April 7, 2026 17:34
@duncancmt
duncancmt merged commit 91eb65b into dcmt/crosschainreceiver2 Apr 7, 2026
2 of 3 checks passed
@duncancmt
duncancmt deleted the dcmt/crosschainreceiver2-fixes branch April 7, 2026 17:35
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.

6 participants