400.2-718. (1) Damages for breach by either party may beliquidated in the agreement but only at an amount which isreasonable in the light of the anticipated or actual harm causedby the breach, the difficulties of proof of loss, and theinconvenience or nonfeasibility of otherwise obtaining anadequate remedy. A term fixing unreasonably large liquidateddamages is void as a penalty.
(2) Where the seller justifiably withholds delivery of goodsbecause of the buyer's breach, the buyer is entitled torestitution of any amount by which the sum of his paymentsexceeds
(a) the amount to which the seller is entitled by virtue ofterms liquidating the seller's damages in accordance withsubsection (1), or
(b) in the absence of such terms, twenty percent of thevalue of the total performance for which the buyer is obligatedunder the contract or five hundred dollars, whichever is smaller.
(3) The buyer's right to restitution under subsection (2)is subject to offset to the extent that the seller establishes
(a) a right to recover damages under the provisions of thisarticle other than subsection (1), and
(b) the amount or value of any benefits received by thebuyer directly or indirectly by reason of the contract.
(4) Where a seller has received payment in goods theirreasonable value or the proceeds of their resale shall be treatedas payments for the purposes of subsection (2); but if the sellerhas notice of the buyer's breach before reselling goods receivedin part performance, his resale is subject to the conditions laiddown in this article on resale by an aggrieved seller (section400.2-706).
(L. 1963 p. 503 ยง 2-718)