NADP-dependent dehydrogenase with broad substrate specificity acting on 3-hydroxy acids. Catalyzes the NADP-dependent oxidation of L-allo-threonine to L-2-amino-3-keto-butyrate, which is spontaneously decarboxylated into aminoacetone. Also acts on D-threonine, L-serine, D-serine, D-3-hydroxyisobutyrate, L-3-hydroxyisobutyrate, D-glycerate and L-glycerate (PubMed:12535615). Able to catalyze the reduction of the malonic semialdehyde to 3-hydroxypropionic acid. YdfG is apparently supplementing RutE, the presumed malonic semialdehyde reductase involved in pyrimidine degradation since both are able to detoxify malonic semialdehyde (PubMed:20400551). 3-hydroxypropanoate + NADP(+) = 3-oxopropanoate + H(+) + NADPH L-allo-threonine + NADP(+) = aminoacetone + CO2 + NADPH The highest catalytic efficiency was observed with L-allo-threonine. Optimum pH is about 8.5 for the oxidation of L-serine. Stable from pH 6.5 to 10.0. Still active after heating at 55 degrees Celsius for 80 minutes. Homotetramer. Cells lacking this gene grow poorly on pyrimidine nucleosides and bases as the sole source of nitrogen at room temperature indicating a probably accumulation of a toxic intermediate, the malonic semialdehyde. L-threonine, D-allo-threonine, DL-threo-3-phenyl-serine, malonate, DL-malate, citrate, isocitrate, DL-lactate, DL-tartrate, gluconate, glycerol and glycolate are inert as substrates. Belongs to the short-chain dehydrogenases/reductases (SDR) family.