57725 sc high alchemistv liquidate is not updating the mytsharesdeposited which makes it inflated and can cause deposits dos and liquidations malfunction that may cause protocol insolvency

Submitted on Oct 28th 2025 at 13:43:58 UTC by @luc1jan for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57725

  • Report Type: Smart Contract

  • Report severity: High

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

  • Impacts:

    • Protocol insolvency

    • Users can't deposit funds (DoS)

    • Potential insolvency

Description

Brief/Intro

Liquidations freeze and transfer user's collateral from contract, but lack _mytSharesDeposited update which makes the state variable inflated and will cause deposit DoS along with potential malfunctions in liquidations that can lead to insolvency.

Vulnerability Details

Liquidations reduce liquidated collateral (yield tokens) and transfer it from the contract to Transmuter and fees recipients. However, the state variable _mytSharesDeposited which represents global deposited amount of yield tokens is not updated. With every liquidation, it becomes more and more inflated. This will effectively cause deposit DoS because inflated _mytSharesDeposited will reach depositCap and line 369arrow-up-right will revert. Additionally the protocol underlying value will be inflated because it uses _mytSharesDeposited as a source of truth. This will cause protocol to appear healthy even if it's globally undercollateralized, leading to eventual insolvency.

Impact Details

During the lifecycle of the protocol, it is almost certain we will reach depositCap because of inflated _mytSharesDeposited. The check on line 369arrow-up-right will revert causing deposit DoS:

Additionally, the _getTotalUnderlyingValue will return inflated amount because it's using _mytSharesDeposited. This will make alchemistCurrentCollateralization argument inside calculateLiquidation inflated as well, causing this check to always return false even in cases when protocol is unhealthy:

Global undercollateralization will go unnoticed leading to even deeper undercollateralization and eventually to insolvency.

References

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistV3.sol#L369

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistV3.sol#L862

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistV3.sol#L1244-L1262

Proof of Concept

Proof of Concept

The PoC demonstrated that _mytSharesDeposited is not reduced in liquidations which means inflation will accrue indefinitely with each liquidation.

Was this helpful?