Skip to content
$1,000,000 in security audit grants are live now, Apply here →

Security review · August 2025

M Extensions, Round 2

for M0

M0 engaged Guardian to review the security of their M0 M-Extensions. From the 8th of August to the 11th of August, a team of 5 auditors reviewed the source code in scope.

Published
Review window
August 8 to 11, 2025
Language
Solidity
Chains
Ethereum, Arbitrum, Optimism
Sector
Stablecoins
  • 0 Critical
  • 0 High
  • 1 Medium
  • 0 Low
  • 1 Informational

2 resolved

Scope

Overview

M0 engaged Guardian to review the security of their M0 M-Extensions. From the 8th of August to the 11th of August, a team of 5 auditors reviewed the source code in scope.

Findings 2

  1. M-01 Medium Irreversible Permission Flags Access Control Resolved
    Location
    SwapFacility.sol: 193-194

    Description

    Once an extension is set as permissioned via setPermissionedExtension, it cannot be made permissionless again due to an early return in the function.

    Similarly, once an M swapper is allowed via setPermissionedMSwapper, they cannot be disallowed. This prevents role or permission revocation, which could lead to security and governance limitations.

    Recommendation

    Consider allowing permission flags to be toggled in both directions.

    Resolution

    M0 Team: The issue was resolved in PR#47.

  2. I-01 Informational Redundant Checks In swapWithPermit Superfluous Code Resolved
    Location
    SwapFacility.sol: 112-116

    Description

    One of the swapWithPermit functions in the SwapFacility contract checks if the given extensions are approved and not permissioned before calling the _swap function which does the same.

    Recommendation

    Consider removing the redundant checks.

    Resolution

    M0 Team: The issue was resolved in PR#48.

Invariants 11

The review's fuzzing suite asserted 11 invariants. 8 held and 3 did not.

Every invariant tested
IDInvariantResult
MYF-01MYieldFee extension mToken Balance must be greater or equal than projectedSupplyBroken
MYF-02MYieldFee extension mToken Balance must be greater or equal than projectedSupply +Broken
SWAP-01-00fee YTO-TO-YTO: MYieldToOne yield must not change after swapsHeld
SWAP-01-01YFEE-TO-YFEE: MYieldFee yield must not change after swapsHeld
SWAP-01-02MEARN-TO-MEARN: MEarnerManager yield must not change after swapsHeld
SWAP-02Swap facility M0 balance must be 0 after swap outHeld
SWAP-03Total M0 balance of all users must not change after swapHeld
SWAP-04Received amount of M0 must be greater or equal than slippageHeld
SWAP-05Received amount of USDC must be greater or equal than slippageHeld
MEARN-01MEarnerManager extension mToken Balance must be greater or equal thanBroken
ERR-01projectedTotalSupply Unexpected ErrorHeld

More from M0

All 10 reports
  1. Liquidity Delivery Updates

    4 findings 4 findings: 1 low, 3 informational
  2. PYUSDX

    21 findings 21 findings: 8 low, 13 informational
  3. Liquidity Delivery

    59 findings3 critical · 5 high 59 findings: 3 critical, 5 high, 10 medium, 14 low, 27 informational
  4. M Extensions Updates

    16 findings 16 findings: 1 medium, 5 low, 10 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.

Get a quote