The phosphatase RosC from Streptomyces davaonensis is used for roseoflavin biosynthesis and has evolved to largely prevent dephosphorylation of the important cofactor riboflavin-5'-phosphate.