Liquidity Pool Crypto

Hi, I have a question regarding the safety of Liquidity pool.

Let say I create a token called Y.

Then I create a pool where I put 1 000 000 000 Y and 1 000 000 USDC.
(1 Y = 0.001 USDC)

How can I protect my token from an attacker that would buy all Y tokens worth 1 000 000 USDC and then sell all Y tokens for 2 000 000 USDC the next minute?
Anybody with 1 000 000 USDC could empty the pool.

Liquidity Pool Crypto