The calcLPToSupplyRatio() function in the contract lacks a check for a zero return from the getWellTwaUsdLiquidityFromReserves() function. This can lead to potential incorrect calculations of liquidity-to-supply ratios if the token USD price is 0 or if the oracle fails to compute a valid price.
Without a check for a zero return from getWellTwaUsdLiquidityFromReserves(), the calcLPToSupplyRatio() function may proceed with calculations using an invalid or zero liquidity value, resulting in incorrect liquidity-to-supply ratios. This could impact decisions based on these ratios, such as fund allocations or rewards distributions, leading to unexpected behaviour in the protocol.
Manual review
Consider Adding a check in calcLPToSupplyRatio() to verify the return value of getWellTwaUsdLiquidityFromReserves() and handle the case where it returns 0 or an invalid value appropriately to prevent incorrect calculations.
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.