All unripe tokens have been mint and distributed after the hack. They are spread between Unripe Beans and Unripe LP. However only the unripeLP supply is used to determine the total dollars needed for recapitalization. Since it is possible to convert Unripe LP to Unripe Beans, this total supply will change (tokens are burned and minted during this process), without updating the s.recapitalized
variable, breaking the logic of all function using this variable and getTotalRecapDollarsNeeded
or the Unripe LP supply:
LibFertilizer::remainingRecapitalization
LibUnripe::percentLPRecapped
LibUnripe::getPenalizedUnderlying
LibUnripe::getTotalRecapitalizedPercent
An interesting scenario for a large Unripe LP holder is to convert all their tokens into Unripe Beans to manipulate totalUsdNeeded
in LibUnripe::getPenalizedUnderlying
:
This would allow this holder to have many more tokens to chop or even steal tokens when recapitalization will be close to or equal to 100%.
Likelyhood: High
At the first conversio between unripe assets.
Impact: High
Will break critical functions in Beanstalk.
Use both the Unripe Beans supply and the Unripe LP supply to determine the total amount needed for recapitalization.
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.