Parties entering into a Contract may at the outset, agree to a certain amount of damages. This is usually referred to as 'Liquidated & Ascertained Damages' (LAD).
In laymen language, before you agree to a contract and before you sign that contract, you can agree with the other party, how much money you will pay or receive as compensation, if one party did not respect the terms of the contract. When talking in legal language, this kind of compensation is called 'damages'.
A common place to find LAD is in Sale & Purchase Contracts of Properties. LAD is a useful and quick method to ascertain the quantum of damages to pay.
The Courts have however decided in some cases, that the LAD ought to be a reasonable amount and not punitive in nature. As stated above, LAD is meant to compensate, not to enrich or punish the party who breached the contract.
Next time you enter into a contract, you may consider discussing the insertion of a clause to quantify the LAD, in that contract. Your lawyer would be able to advise you whether that said contract can include an LAD clause (as not all contracts can have LAD).