For the complete documentation index, see llms.txt. This page is also available as Markdown.

56751 sc medium stargateethpoolstrategy deallocate function redeem less weth than expected

Submitted on Oct 20th 2025 at 11:44:00 UTC by @ox9527 for Audit Comp | Alchemix V3

  • Report ID: #56751

  • Report Type: Smart Contract

  • Report severity: Medium

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

  • Impacts:

    • Permanent freezing of funds

Description

Brief/Intro

StargateEthPoolStrategy deallocate function redeem weth using native token , however the amount of weth is less than expected , which can lead to Strategy balance is less than the amount needed revert.

Vulnerability Details

From the StargateEthPoolStrategy.sol::_deallocate()

        lp.approve(address(pool), lpNeeded);
        uint256 ethBalanceBefore = address(this).balance;
        pool.redeem(lpNeeded, address(this));
        uint256 ethBalanceAfter = address(this).balance;
        uint256 ethRedeemed = ethBalanceAfter - ethBalanceBefore;
        if (ethRedeemed < amount) {
            emit StrategyDeallocationLoss("Strategy deallocation loss which includes rounding loss.", amount, ethRedeemed);
        }
        if (ethRedeemed + ethBalanceBefore >= amount) { //@audit ?
            weth.deposit{value: ethRedeemed}();
        }
        require(TokenUtils.safeBalanceOf(address(weth), address(this)) >= amount, "Strategy balance is less than the amount needed");

The value ethRedeemed is used to redeem WETH. However, the pool.redeem() function returns a smaller amount of native tokens than the input value due to rounding down.

Impact Details

1.the _deallocate function revert lead to assets become stuck in the contract

References

Proof of Concept

Proof of Concept

out:

Was this helpful?