Submitted by oakcobalt, also found by Egis_Security
When a user single-side deposit into a pool, a swap is performed first before liquidity provision.
The vulnerability is belief_price is always set to NONE which causes slippage protection to be invalid in some cases.
/contracts/pool-manager/src/liquidity/commands.rs#L164
During a swap (perform_swap::assert_max_spread), belief_price and max_spread are both user input and can be combined for slippage protection.
/contracts/pool-manager/src/swap/perform_swap.rs#L166
belief_price is especially important in constant product swap case where the pool spot price can shift wildly between tx submission and tx execution. 
Even in stableswap pool, belief_price is also important because pool spot price can still shift away from the ideal 1:1 price in the case where amp is set to a low value (e.g., less than 2000000) or assets are more imbalanced. 
When belief_price is set to NONE, max_spreads implementation between constant product swap and stable swap become inconsistent. Both constant product pool and stableswap pools slippage protection can be invalid.
Note: ask_pool/offer_pool is the current spot price of the pool, which is not foreseeable by the user.
Check: spread_amount/(spread_amount + return_amount)  max_spread
Note: spread_amount is based on a fixed 1:1 price. However, when assets are imbalanced or amp is low, the deltaX:deltaY will differ from 1:1.
We see in both cases, swap slippage protection is voided because its not able to account for the pool price slipping before tx execution. 
Consider revising provide_liquidity to allow user to pass a belief_price for single-sided swap flow.
jvr0x (MANTRA) confirmed and commented:
a_kalout (warden) commented:
carrotsmuggler (warden) commented:
oakcobalt (warden) commented:
oakcobalt (warden) commented:
