legal ground
Article 584 of the Civil Code
If one party fails to perform its contractual obligations or fails to perform its contractual obligations in conformity with the agreement, thus causing losses to the other party, the amount of damages shall be equivalent to the losses caused by the breach of contract, including the benefits that can be obtained after the performance of the contract; However, it shall not exceed the losses that the breaching party foresaw or should have foreseen when concluding the contract.
Article 585
The parties may agree that when one party breaches the contract, it shall pay a certain amount of liquidated damages to the other party according to the situation of breach of contract, and may also agree on the calculation method of the amount of compensation for 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.