A process for producing an antibacterial coating composition for implants. The process includes the steps i) reaction of a monomer A which is based on (meth)acrylic acid and contains at least one epoxide with a polyguanidine by reaction of an amino group of the polyguanidine with the epoxide to give a (meth)acrylic acid-polyguanidine macromolecule and ii) polymerization of the (meth)acrylic acid-polyguanidine macromolecule with a monomer B which contains at least one polymerizable double bond and at least one phosphonate group by free-radical polymerization of the (meth)acrylic acid unit and the double bond.