Legal basis: Civil Code of People's Republic of China (PRC).
Article 587 Where the debtor performs the debt, the deposit shall be set off as the price or recovered. If the party paying the deposit fails to perform the debt or the performance of the debt is not in conformity with the agreement, thus the purpose of the contract cannot be achieved, it has no right to request the return of the deposit; If the party receiving the deposit fails to perform the debt or the performance of the debt does not conform to the agreement, so that the purpose of the contract cannot be achieved, the deposit shall be returned twice.
Article 585 The parties may agree that one party shall pay a certain amount of liquidated damages to the other party for breach of contract, or may agree on the calculation method of the amount of compensation for losses caused by breach of contract. If the agreed liquidated damages are lower than the losses caused, the people's court or arbitration institution may increase the liquidated damages at the request of the parties; If the agreed liquidated damages are excessively higher than the losses caused, the people's court or arbitration institution may appropriately reduce them at the request of the parties. If the parties concerned pay liquidated damages for delayed performance, the breaching party shall also perform the debt after paying the liquidated damages.