A doctrine of contract law which allows recovery of breach of contract damages by a party that has substantially performed his side of the contract. Such recovery is subject to an offset for any nominal, trifling, or technical departures from the letter of the contract.