57272 sc medium silent failures on moonwell deposit are not catched by strategy

Submitted on Oct 24th 2025 at 21:08:52 UTC by @Paludo0x for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57272

  • Report Type: Smart Contract

  • Report severity: Medium

  • Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/strategies/optimism/MoonwellWETHStrategy.sol

  • Impacts:

    • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield

    • Loss of funds for the protocol and users

Description

Brief/Intro

MoonwellWETHStrategy:_allocate() calls mWETH.mint(amount) without checking the returned status code.

When Moonwell’s mint fails without reverting, the underlying never leaves the strategy and remains idle.

Vulnerability Details

In MoonwellWETHStrategy:_allocate() there's no check of returned value from mWETH.mint(amount).

By looking into mWETH.mint() traces is evident that this call can fail silently without reverting for vaious reasons.

This is a snippet as non exhaustive example:

Where failOpaque is as follows:

Therefore it can happen that Moonwell call fails without reverting and underlying strategy funds remain inside strategy itself and Moonwell tokens are not minted.

This is the relevant snippet:

Impact Details

VaultV2 uses VaultV2::accrueInterestView() to calculate shares or assets amounts in critical functions: previewDeposit(), previewMint(), previewWithdraw(), previewRedeem().

VaultV2::accrueInterestView() sums realAssets in VaultV2 and in strategies adapters.

But IAdapter(adapters[i]).realAssets() omits strategy underlying balance, i.e. wETH in MoonwellWETHStrategy and USDC in MoonwellUSDCStrategy.

VaultV2.totalAssets() the price per share is too low, and newcomers can mint more shares then expected creating irreversible value extraction from existing LPs and potentially from the treasury via mischarged fees.

Funds are later recoverable during redeem for this failure mode, but the economic loss remains. This is the reason why I tagged this issue as critical.

The same issue applies to MoonwellUSDCStrategy.

Proof of Concept

Proof of Concept

The aim of this PoC is to demonstrate that if Moonwell minting function fails silently, the strategy call doesn't fail and the mTokens are not deposited

Was this helpful?