Description
The function getPoolTokensToDepositBasedOnWeth
should call the function getOutputAmountBasedOnInput
to calculate the correct amount including the fees.
The current implementation does not take fees into account when it does the calculation as can be seen below.
The implementation should be changed as shown below:
Please note: the code above is untested and should not be assumed to be the most effective solution or production ready code
Impact
The return value is not accurate as it does not include the protocol fees.
Tools Used
Manual Review
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.