56859 sc medium lp underlying mismatch in stargateethpoolstrategy deallocate causes withdrawal dos
Description
Brief/Intro
Vulnerability Details
// inside _deallocate(uint256 amount)
uint256 lpNeeded = amount; // !! treats underlying as LP shares
pool.redeem(lpNeeded, address(this)); // returns ETH based on current exchange rate
// ...wrap some ETH to WETH...
require(
TokenUtils.safeBalanceOf(address(weth), address(this)) >= amount,
"Strategy balance is less than the amount needed"
);
TokenUtils.safeApprove(address(weth), msg.sender, amount);
return amount;Impact Details
References
Proof of Concept
Proof of Concept
Previous58452 sc high mytstrategy allocation underflow in deallocate when allocation profits exceed old allocationNext56809 sc high vulnerable redemption survival ratio in sync allows theft of altokens
Was this helpful?