numotrade / numo2

🤖 Leverage on long-tail tokens.
Other
0 stars 0 forks source link

Lack of validation on token decimals #12

Open robertleifke opened 1 week ago

robertleifke commented 1 week ago

Description:

Users can create pools with decimals that do not reflect the actual decimals the tokens have. This results in the arithmetic being calculated incorrectly.

The Factory contract allows users to set the decimal values for both token0 and token1 tokens in the resulting Lendgine contract when the users call the createLendgine function. The contract does not validate whether these decimal values match the actual number of decimals the token has, allowing an attacker to specify any number between zero and 18.

Action Items:

robertleifke commented 1 week ago

Ensure that all data from user-provided inputs is validated. Write unit tests specifically targeting these inputs to confirm that appropriate protections are in place within the system. This will prevent unexpected behavior from unexpected inputs.