DeFiHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

Improvement Consideration in `LAMBDA_LAMBDA` Conversion Type in Beanstalk Protocol

The LAMBDA_LAMBDA conversion type in the LibConvertData.ConvertKind enum is designed to allow updates to the Bean Denominated Value (BDV) of a deposit without necessitating its withdrawal. This functionality is crucial for maintaining the value of deposits in line with market conditions without losing accrued benefits such as grown Stalk. Albeit, the current implementation does not facilitate the reduction of BDV, which can lead to scenarios where deposits are overvalued compared to the market. This overvaluation benefits the deposit holder by providing some sort of higher seigniorage than warranted, creating a disincentive for initiating a BDV update through a lambda convert.

Look at the LibLambdaConvert.sol snip that handles the LAMBDA_LAMBDA conversion:

https://github.com/Cyfrin/2024-05-Beanstalk-3/blob/662d26f12ee219ee92dc485c06e01a4cb5ee8dfb/protocol/contracts/libraries/Convert/LibLambdaConvert.sol#L19-L32

function convert(bytes memory convertData)
internal
pure
returns (
address tokenOut,
address tokenIn,
uint256 amountOut,
uint256 amountIn
)
{
(amountIn, tokenIn) = convertData.lambdaConvert();
tokenOut = tokenIn;
amountOut = amountIn;
}

This function shows that the amount of tokens remains unchanged during the conversion, which is intended to update the BDV without affecting the token balance.

This is more or less low/informational.

Consider addressing the issue of overvalued deposits. it would be beneficial to implement functionality that allows the BDV to decrease during a lambda convert if market conditions have deteriorated. This would ensure that the BDV remains aligned with the current market value of the tokens.
You may also consider introducing incentives that encourage users to update the BDV of their deposits, especially when they are overvalued. This could include penalties for stale BDVs or rewards for updating BDVs that reflect more accurate market conditions.

Updates

Lead Judging Commences

giovannidisiena Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.