Description: The AMM doesn't validate token decimals, potentially allowing incompatible tokens or tokens with extreme decimal values. The AMM doesn't validate the decimal places of tokens when creating a new pool. This could allow the creation of pools with tokens that have extreme decimal values (e.g., 0 or >18) or incompatible decimal combinations, leading to calculation issues.
Impact:
Pools with tokens having extreme decimal values could experience calculation errors
Incompatible decimal combinations could lead to unfair pricing
Potential for precision loss in calculations
Proof of Concept: A user could create a pool with a custom token having 0 decimals and another with 30 decimals:
Recommended Mitigation: Add decimal validation in the initialize_pool
function:
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.