Formal contracts and informal arrangements are always jointly used in business.The relationship between formal contract and informal contract is a new topic in contract theory.This paper builds a random matching game model to analyze the influence of formal contract on informal contract when formal contract is available,and therefore extend the research on interaction of informal contract and formal contract from two-sided repeated game to random matched game.The conclusion is that contracting cost affects contract choice and the interaction between formal contract and informal contract.When contracting cost is low,the introduction of formal contract substitutes informal contract;when contracting cost is medium,formal contract complements informal contract;when contract cost is high,the introduction of formal contract does not affect informal contract.Finally,the model is used to analyze the effect of the introduction of the third intermediaries on informal contract in online auction trade.