The contract does not attach the using LibMath for uint256
statement, preventing access to the functionality provided by the LibMath
library unlike has been intended
The contract relies on the LibMath
library for certain mathematical operations. However, it does not include the necessary using LibMath for uint256
statement to enable direct access to the library's functions.
See https://github.com/Cyfrin/2024-04-Beanstalk-DIB/blob/038609d8adf1bf941f8abd12820bc92ecd998375/src/functions/ConstantProduct2.sol#L10-L26
The absence of the using LibMath for uint256
statement results in an error. Without access to the LibMath
functionality, the contract is unable to perform certain calculations, leading to a failure of executions.
Manual Review
Add the using LibMath for uint256
statement to the contract to enable access to the LibMath
library's functionality. Change https://github.com/Cyfrin/2024-04-Beanstalk-DIB/blob/038609d8adf1bf941f8abd12820bc92ecd998375/src/functions/ConstantProduct2.sol#L10-L26 to
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.