LibConvert.convert()
function:
This function performs the conversions as stated in the ConvertKind
enum from LibConvertData
. However, one of these conversions, BEANS_TO_CURVE_LP
, is omitted in the convert()
function.
The ConvertKind enum from LibConvertData is initialized as kind in the LibConvert
contract:
https://github.com/Cyfrin/2024-04-beanstalk-2/blob/27ff8c87c9164c1fbff054be5f22e56f86cdf127/protocol/contracts/libraries/Convert/LibConvert.sol#L40
The enum specifies 8 conversions
as follows:
https://github.com/Cyfrin/2024-04-beanstalk-2/blob/27ff8c87c9164c1fbff054be5f22e56f86cdf127/protocol/contracts/libraries/Convert/LibConvertData.sol#L12-L21
However, in the LibConvert.convert()
function, the first conversion in the enum is commented out.
https://github.com/Cyfrin/2024-04-beanstalk-2/blob/27ff8c87c9164c1fbff054be5f22e56f86cdf127/protocol/contracts/libraries/Convert/LibConvert.sol#L31-L69
The BEANS_TO_CURVE_LP
conversion cannot be executed.
Manual Review
Uncomment the above code to allow it to be executed.
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.