The LibWellBdv::bdv
function performs an external call to IInstantaneousPump(pumps[0].target).readInstantaneousReserves(well, pumps[0].data)
without employing a try/catch
block for error handling. This implementation leaves the function — and by extension, any other function relying on bdv
— vulnerable to unhandled exceptions. When an external call fails (e.g., due to the called contract reverting for any reason), the failure cascades and causes the entire transaction stack to revert. The function as written leaves all the transactions to revert without managing the failure. This implementation seems not in line with the project design where the call to the IInstantaneousPump(pumps[0].target).readInstantaneousReserves(well, pumps[0].data)
in other functions across the project is managed using a try/catch
block (for example: LibWell:getTwaReservesFromBeanstalkPump
, LibWell::getTwaLiquidityFromBeanstalkPump
and others).
The bdv
function is central to the Beanstalk project's operations, as it calculates the bdv of a given Well LP Token. This calculation is crucial for determining the value of liquidity provided to the Beanstalk ecosystem.
The revert of bdv
leads the functionalities that depend on the successful execution of bdv
to fail unexpectedly. This includes any logic that relies on the BDV calculation for further processing or decision-making within the contract. The abrupt reversion of transactions can halt these operations, affecting the contract's and the protocol.
Manual review
Modify the bdv
function to wrap the external call in a try/catch
block (as is in the other functions).
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.