Collateral Liquidation question

Hello guys,

I am a total DeFi noob working my way around learning about yield farming and now I’ve moved into lending platforms. I have a question about liquidations,

Let’s say I deposit 5k of DAI as collateral into cream and I withdraw 10 link. In the unfortunate situation that I encounter a rug pull what would happen to my 5k collateral? I believe that I would not lose all of my collateral, just want to make sure before I do anything. Thanks.