Miscalculation of amounts leads to user paying more and loss of fees for protocol.
getInputAmountBasedOnInput
function is used to calculate the amount of tokens that a users must deposit to get amount of output tokens.
But if you check the highlight code, it scales the amount by 10000 rather 1000.
This mismatch will cost users spending much more tokens while protocol getting 1/10th fees than expected.
Users spending more funds than expected and loss of fees for the protocol
Manual Review
Update the affect function as shown below:
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.