The StargateEthPoolStrategy._deallocate() function only wraps freshly redeemed ETH into WETH, ignoring pre-existing ETH dust in the contract. When users attempt withdrawals, the function correctly verifies that total available ETH (redeemed + pre-existing) meets requirements, but then only wraps the newly redeemed portion before asserting WETH balance sufficiency. This causes transactions to revert with "Strategy balance is less than the amount needed" despite having adequate total liquidity, creating a DoS condition that temporarily freezes user funds until manual intervention.
Vulnerability Details
The bug exists in StargateEthPoolStrategy._deallocate() at the ETH wrapping logic:
uint256 ethBalanceBefore =address(this).balance;// Captures pre-existing ETH dustpool.redeem(lpNeeded,address(this));uint256 ethBalanceAfter =address(this).balance;uint256 ethRedeemed = ethBalanceAfter - ethBalanceBefore;if(ethRedeemed + ethBalanceBefore >= amount){// ✅ Correctly checks total ETH weth.deposit{value: ethRedeemed}();// ❌ Only wraps ethRedeemed, not total needed}require(TokenUtils.safeBalanceOf(address(weth),address(this))>= amount);// ❌ Reverts
ETH Dust Accumulation Source:
Allocations round down to 1e12 multiples, leaving up to 999,999,999,999 wei of unwrapped ETH per allocation:
Impact Details
This causes temporary freezing of funds for at least 1 hour through DoS on withdrawals:
Frequency: Triggers on virtually every withdrawal when dust exists. Dust accumulates naturally from all non-1e12-multiple allocations (nearly 100% of allocations). The fuzz test confirms this occurs reliably across 256 random scenarios.