The liquidity_calculation
function calculates the LP tokens to mint as the square root of the product of the raw token amounts. However, it does not account for differences in token decimals, which leads to incorrect LP token amounts when tokens have different decimal precisions.
Incorrect LP token minting causing unfair liquidity representation.
Potential economic exploits due to miscalculated LP shares.
Pool imbalance and user losses.
Normalize token amounts by their decimals before performing the liquidity calculation to ensure accurate LP token minting.
This function takes the decimals of each token and the LP token as input, normalizes the token amounts to a common precision, performs the square root calculation, and scales the LP token amount accordingly.
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.