Disclosed is a quenching medium for treating a heated metal part, said medium comprising water and a polyacrylate terpolymer comprising acrylamide and/or methacrylamide monomer units, acrylic acid and/or methacrylic acid monomer units and alkyl alkoxylate allyl ether monomer units where the acid groups are in the form of an alkali metal salt and where the alkyl alkoxylate allyl ether monomers are of the formula