Remedies
Agreed sums
A clause fixing the amount payable if a contract is broken is called liquidated damages. It is enforceable if it is a genuine attempt to estimate the loss from breach.
If the sum is out of all proportion to the legitimate interests it protects, it is a penalty instead. Penalties are unenforceable. Australian law sometimes applies this penalty doctrine even when the trigger is not a breach.
Deposits and forfeiture clauses raise similar issues. Equity may grant relief in these situations.
Restitution
If a contract is discharged, void, or never formed, a restitutionary claim may still be available. This lets a party recover the value of benefits they gave the other side.
One example is a quantum meruit claim, for work actually done. This means being paid a reasonable sum for services provided.
Another is recovering money paid where there was a total failure of consideration. This means the other side gave nothing at all in return for the payment.
This restitutionary claim is not a contractual remedy. It is measured differently from contract damages.
A valid contract normally stays central to this analysis, for reasons explained in the article on restitutionary remedies.
A Quick Read uses simpler language and may leave out detail, including whole topics, to stay short. The full article is the complete statement.