Guardian's review of Liquidity Delivery Updates for M0, published June 2026. The report records 4 findings across 2 review rounds, including 1 low and 3 informational.
- Published
- Review window
- May 19 to 30, 2026
- Rounds
- Main Review, Remediation Review
- Language
- Solidity, Rust
- Chains
- Ethereum, Arbitrum, Optimism, Linea, Unichain, Solana
- Sector
- Stablecoins
- 0 Critical
- 0 High
- 0 Medium
- 1 Low
- 3 Informational
Scope
Findings 4
Main Review
3 findings · May 19 to 26, 2026-
I-01 Informational NatSpec comments are stale Documentation Resolved
Description
Some
IOrderBookNatSpec comments are stale after recent order-opening changes.Order.senderandOrderData.senderare documented as the address that provided funds, butsenderis now the order owner while thefunder/msg.senderprovides tokens. ThecancelOrder()fee comments also refer to same-chain and cross-chain fills even though the section documents cancellations. Finally,OrderCompletedis documented as destination-chain-only, but it can also be emitted byreportFill()on the origin chain.Recommendation
Update the NatSpec comments to describe
senderas the order owner, distinguish it fromfunder, replace fill wording with cancel wording incancelOrder()documentation, and clarify whereOrderCompletedmay be emitted. -
I-02 Informational Gasless cancel cannot be wrapped Informational Resolved
Description
The removed
cancelOrderFor()functionality cannot be replicated by a generic wrapper in the same way as gaslessopenOrder()flows. Before the deadline,cancelOrder()authorizes cancellation by checking thatmsg.senderis the orderrecipientor, for same-chain orders, the ordersender. If a wrapper verifies a user signature and callscancelOrder(),OrderBooksees the wrapper asmsg.sender, so the call fails unless the wrapper itself is the authorized address.Setting the wrapper as
recipientis not equivalent because fills transfertokenOutdirectly torecipientwithout executing a callback. The wrapper would become a custody/accounting layer and would need additional forwarding, claiming, or off-chain keeper logic to route filled funds to the actual user.Recommendation
Make sure this is intentional. If it's not - consider having the gasless cancel feature back in the
OrderBook. -
I-03 Informational Filling native orders may fail Warning Acknowledged
Description
After compiling the orderbook, the
FillNativeOrdertests should be checked for success.Currently, the plan is to compile the program using Solana v2.1.0 and Anchor v0.31.1. However, for different versions of the toolchain, the following issue may materialize:
The SVM
FillNativeOrderaccount context is too large for SBF stack limits. Duringanchor build, the compiler reports that the generatedFillNativeOrder::try_accounts()frame uses a stack offset of4112, exceeding the4096byte maximum. The generated parser then traps at runtime beforehandler()can execute successfully. Any native same-chainfill_native_order()call fails withProgramFailedToCompleteand an access violation.As a result, SVM same-chain orders cannot be filled. Solvers cannot deliver the recipient's
token_outand receive the escrowedtoken_in; users are forced into cancellation/refund paths, and same-chain liquidity delivery is unavailable on SVM.Recommendation
Make sure the right toolchain was used and the tests are passing before deploying the program.
Remediation Review
1 finding · May 30, 2026-
L-01 Low Cancel
TYPEHASHdiverges fromEIP-712Compatibility ResolvedDescription
The preimage of the
CANCEL_ORDER_TYPEHASHincludes whitespaces after the commas that separate each struct element./// @dev keccak256("CancelOrder(bytes32 orderId, address bridgeAdapter, bytes bridgeAdapterArgs)") bytes32 public constant CANCEL_ORDER_TYPEHASH = 0x6919f4958bcd1b5b4e13b800c6d41c4792cfc2a12d0bd9ad19da6e0bfe8ac04f;This implementation is not true to the EIP-712 specification, where the whitespaces are omitted.
Recommendation
Consider using
EIP-712compliant digest if it won't break already existing integrators.
No findings match.
More from M0
All 10 reports-
PYUSDX
21 findings 21 findings: 8 low, 13 informational -
Liquidity Delivery
59 findings3 critical · 5 high 59 findings: 3 critical, 5 high, 10 medium, 14 low, 27 informational -
M Extensions Updates
16 findings 16 findings: 1 medium, 5 low, 10 informational -
USD8
10 findings1 high 10 findings: 1 high, 1 low, 8 informational
Put your code through the same review.
This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.
