Imagine that I entered short into futures contract for asset "A" at the price 100 USD. Lets say that on the other side John went long. Contract expires in one year. I don't use leverage and I put as collateral 100 USD. In one month price goes to 200 USD, my position is liquidated. What happens at this moment? Does clearing house go long into futures contract at price 200 USD to provide the payments for John? Then the other question arises, if there are many people like me whose position got liquidated and there is not enough futures contracts for clearing house to go long will it go bankrupt?
Lets say that on the other side John went long.
This is not what happened. The "other side" is ALWAYS the exchange. The exchange has a contract vs. John "on the other side", but YOUR contract is with the exchange. Thus it does not matter who you buy a contract from to offset your position.
What happens at this moment?
The FCM will issue a market order to buy an offsetting position. This is not "against John" - the offsetting position will go to the exchange as counterpart. it also will happen BEFORE - if you issue 1000 USD collateral, the liquidation will happen so soon that you are MOST likely to be left with a profit. Legally depending on jurisdiction you may have an underwater account AND BE LIABLE FOR THE DIFFERENCE, or your broker may be. But John is NOT IN THE EQUATION AT THIS POINT.
If there are many people like me whose position got liquidated and there is not enough futures contracts for clearing house to go long will it go bankrupt?
There is a reserve fund for that case, and ultimately - yes, if that case would ever come up, a lot of funny things would happen, but ultimately, if the size is bad enough, the system would break. THAT SAID: remember that you have market makers in the game. Just because futures go bonkers price wise does not mean the real market goes. Prise goes up like crazy - market makers have an incentive to buy spot, keep till delivery, deliver. This DOES Happen - it is called arbitrage. So, in order for this to be a real problem, you would have to have a VERY one sided market. WHich happened i.e. in Silver or Lumber at some point. People seriously underwater (100k+ USD on a margin less than 1000) because (Lumber) Canada changed some environmental laws limiting the supplies, market went limit up without trade for a week and some, IIRC. 30 years ago or so. Yes, people will have to pay, and a lot, and ultimately the system will break.
But again, your contract in that example is not with John. It is with the exchange and your offset may be with anyone else. If you get liquidated, the market order to offset your position can come from ANY market participant.
With futures contracts, the exchange clearing house acts as the counterparty to both parties.
To open a position, you must provide sufficient margin. To reduce credit risk, all positions are marked-to-market daily and maintenance margin must be met daily. If you don't, you'll receive a margin call and you'll have to provide additional margin, reduce, or close your position otherwise your broker will do for you.
If your broker liquidates your position to meet your margin call, they are not replacing you as the holder of the short position. They will buy to close your position at market price, most likely at an unfavorable price, and you will bear any slippage from the liquidation of the trade.
In the initial position, you are short and John is long. If you are liquidated, no one goes "long into futures contract at price 200 USD to provide the payments for John". You buy to close a contract to close your position while a third party goes short (say Tom) and the end result is that you are out, Tom is now short and John remains long.