General procedure for the synthesis of 2,4-diaminopyrimidine-5-carbonitrile from guanidine nitrate and ethoxymethylenemalonononitrile: 1.22 g (10 mmol) of guanidine nitrate was dissolved in 50 mL of sodium ethanolate ethanol solution, keeping the reaction temperature at 5°C, and 1.22 g (10 mmol) of ethoxymethylenemalononitrile was added slowly dropwise, the dropwise process lasted for 8 hours. Upon completion of the reaction, the reaction was quenched by the addition of an appropriate amount of water and extracted with ethyl acetate. The organic phases were combined and washed with saturated saline, followed by concentration of the organic phase by removing the solvent by distillation under reduced pressure. Finally, the residue was purified by silica gel column chromatography with an eluent ratio of dichloromethane:methanol=1:30 (v/v) to afford the white solid product 2,4-diaminopyrimidine-5-carbonitrile (compound of formula IV) in 71% yield.