A well is an ERC20 liquidity position (similar to the Uniswap V2 Token implementation) deriving from IWell.
This is designed to be called from the Gm
function flow and during the SOP process, only when the price of bean is
high and the debt of Beanstalk is low. When this happens, Beanstalk takes action and sells Beans into the pool.
This is where stakeholders can claim a pro rata share of the amount of sopToken(WETH)
gained.
However, the hardcoded minAmountOut
value assigned to 0 in the swapFrom
function, doesn't specify a minimum
amount of sopTokens(WETH)
to be received in exchange for the Beans. This configuration eliminates any
safeguard against slippage, exposing the stakeholders to unfavorable exchange rates
during the swap from BEANs to WETH. In volatile market conditions, the lack of a minimum acceptable amount
of WETH to be received means that the swap could proceed even if the resultant exchange rate
significantly undervalues the BEANs. Reclaiming the excess WETH is not possible currently, as there is no way
to withdraw and redistribute the remaining WETH to the stakeholders.
The impact of this vulnerability can be substantial, leading to a direct loss of funds for stakeholders.
Specifically, stakeholders are positioned to receive less WETH than they might under more favorable or
controlled swap conditions.
Manual Review
Considering sopTokens
are being distributed to stakeholders, it's crucial to implement a minAmountOut
value
perhaps defined by the users at a time when the price of Bean is above a certain value and the debt of Beanstalk is low.
at a certain point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.