Submitted by 0xAlix2, also found by 0x1982us, Abdessamed, carrotsmuggler, and oakcobalt
Stable swap pools in Mantra implement Curves stable swap logic, this is mentioned in the docs. Curve normalizes the tokens in a stable swap pool, by having something called rate multipliers where theyre used to normalize the tokens decimals. This is critical as it is used in D computation here.
The reflection of this in Mantra is compute_d, where it does something similar, here:
However, the issue is that amounts are not normalized from the caller, where this is called from compute_lp_mint_amount_for_stableswap_deposit:
This messes up the whole shares calculation logic, as D would be way greater for LPs depositing tokens of higher decimals than other tokens in the same stable swap pool.
NB: This is handled for swaps, here.
Add the following in contracts/pool-manager/src/tests/integration_tests.rs:
The following test creates a stable swap pool with 3 assets, 2 of them have 6 decimals, while the 3rd has 18 decimals. Initially, the same amount * asset decimals of each asset is deposited, depositing the same amount of the 18 decimal token results in an exaggerated amount of shares minted to the LP. 
To double check this, you can try changing uweths decimals to 6, and confirm that both test cases result in equal number of shares, unlike the current implementation, where the difference is huge.
Whenever computing D, make sure all the deposits/amounts are in the non-decimal value, i.e., without decimals. For example, 100e6 should just be sent as 100, just like how its done in compute_swap. This should be added in compute_d.
jvr0x (MANTRA) confirmed
