The first structure of UDP-glucose dehydrogenase reveals the catalytic residues necessary for the two-fold oxidation.