getBeanAmountOut()
incorrectly uses C.UNRIPE_BEAN.totalSupply()
instead of C.UNRIPE_LP.totalSupply()
to calculate the BEAN amount, resulting in an incorrect calculation.
getBeanAmountOut()
calculates the amount of BEAN tokens a user would receive per BEAN:3CRV LP provided.
As observed, the calculation in getBeanAmountOut()
mistakenly utilizes IBean(C.UNRIPE_BEAN).totalSupply()
to determine the LP. However, this line calculates the LP not the BEAN token amount. The correct implementation is using IBean(C.UNRIPE_LP).totalSupply()
to next calcualte correctly the desired BEAN token quantity.
The BEAN token amount obtained is incorrect.
Manual review.
Change IBean(C.UNRIPE_BEAN).totalSupply()
for IBean(C.UNRIPE_LP).totalSupply()
.
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.