Electrolyte bath for electrodeposition of a zinc or zinc alloy layer, wherein the electrolyte bath contains a polymer of the following formula I A-[-L-A-] n -L-A wherein A represents a unit derived from a diamino compound of one of the following formulae II to VII wherein X and Y each can be the same or different and represent O or NR, wherein R stands for H or C 1 -C 6 -alkyl, Z each may be the same or different and represents O or S, R1, R2, R5, and R6 each may be the same or different and represent a substituted or unsubstituted hydrocarbon residue with 1 to 10 carbon atoms, and R3, R4, R8 each may be the same or different and represent (CH 2) p, wherein p stands for an integer of 2 to 12 or for a -[CH 2 CH 2 O] n -CH 2 CH 2 - group, wherein n is between 1 and 40, wherein L stands for a divalent residue, which is selected from the group consisting of -(CH 2) p -, wherein p is between 1 and 12, -CH 2 -CH -CH 2 - and -[CH 2 CH 2 O] q -CH 2 CH 2 -, wherein q is between 1 and 40; wherein the single units A may be the same or different, wherein the single residues L may be the same or different, wherein n represents an integer and n > 0, wherein the polymer chain has units A at both ends, and wherein the polymer is obtainable by reacting one or more diamino compound(s) of formulae II to VII with one or more compounds of the following formula VIII, P-L-Q (VIII) wherein L has the same meaning as in formula I and wherein P and Q each may be the same or different and represent halogens such as Cl, Br and I or OMs (mesylate), OTf (triflate), ONf (nonaflate), or OTs (tosylate), and wherein the ratio (n A: n B) of the total amount of substance used of the compound(s) of formulae II to VII (n A) to the total amount of substance of the compound(s) of formula VIII (n B) is at least 1.1: 1. wherein A represents a unit derived from a diamino compound of one of the following formulae II to VII wherein X and Y each can be the same or different and represent O or NR, wherein R stands for H or C 1 -C 6 -alkyl, Z each may be the same or different and represents O or S, R1, R2, R5, and R6 each may be the same or different and represent a substituted or unsubstituted hydrocarbon residue with 1 to 10 carbon atoms, and R3, R4, R8 each may be the same or different and represent (CH 2) p, wherein p stands for an integer of 2 to 12 or for a -[CH 2 CH 2 O] n -CH 2 CH 2 - group, wherein n is between 1 and 40, X and Y each can be the same or different and represent O or NR, wherein R stands for H or C 1 -C 6 -alkyl, Z each may be the same or different and represents O or S, R1, R2, R5, and R6 each may be the same or different and represent a substituted or unsubstituted hydrocarbon residue with 1 to 10 carbon atoms, and R3, R4, R8 each may be the same or different and represent (CH 2) p, wherein p stands for an integer of 2 to 12 or for a -[CH 2 CH 2 O] n -CH 2 CH 2 - group, wherein n is between 1 and 40, wherein L stands for a divalent residue, which is selected from the group consisting of -(CH 2) p -, wherein p is between 1 and 12, -CH 2 -CH -CH 2 - and -[CH 2 CH 2 O] q -CH 2 CH 2 -, wherein q is between 1 and 40; -(CH 2) p -, wherein p is between 1 and 12, -CH 2 -CH -CH 2 - and -[CH 2 CH 2 O] q -CH 2 CH 2 -, wherein q is between 1 and 40; wherein the single units A may be the same or different, wherein the single residues L may be the same or different, wherein n represents an integer and n > 0, wherein the polymer chain has units A at both ends, and wherein the polymer is obtainable by reacting one or more diamino compound(s) of formulae II to VII with one or more compounds of the following formula VIII, P-L-Q (VIII) wherein L has the same meaning as in formula I and wherein P and Q each may be the same or different and represent halogens such as Cl, Br and I or OMs (mesylate), OTf (triflate), ONf (nonaflate), or OTs (tosylate), and wherein the ratio (n A: n B) of the total amount of substance used of the compound(s) of formulae II to VII (n A) to the total amount of substance of the compound(s) of formula VIII (n B) is at least 1.1: 1. wherein L has the same meaning as in formula I and wherein P and Q each may be the same or different and represent halogens such as Cl, Br and I or OMs (mesylate), OTf (triflate), ONf (nonaflate), or OTs (tosylate), and wherein the ratio (n A: n B) of the total amount of substance used of the compound(s) of formulae II to VII (n A) to the total amount of substance of the compound(s) of formula VIII (n B) is at least 1.1: 1.