The LibWellBdv::bdv
function calculates the BDV for a given Well LP token. These value is calculated based on the inputedamount
and the deltaLPTokenSupply
. There is no check if the deltaLPTokenSupply
is zero which is used as division in the calculation.
If the deltaLPTokenSupply
is zero, the calculation of the bdv would result in a division by zero error. This is because of the denominator in the calculation. When the total deltaLPTokenSupply
is zero, dividing by zero is not defined in Solidity, and the contract would revert with an error.
These functions are used widely across the different contracts at crucial places. So they will effect a lot of functionalities.
Manual review.
Add an appropriate check that ensure that the deltaLPTokenSupply
is non-zero before performing the division operation.
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.