  The appearance of a generalized (or Borcherds-) Kac-Moody algebra in the
spectrum of BPS dyons in N=4, d=4 string theory is elucidated. From the
low-energy supergravity analysis, we identify its root lattice as the lattice
of the T-duality invariants of the dyonic charges, the symmetry group of the
root system as the extended S-duality group PGL(2,Z) of the theory, and the
walls of Weyl chambers as the walls of marginal stability for the relevant
two-centered solutions. This leads to an interpretation for the Weyl group as
the group of wall-crossing, or the group of discrete attractor flows.
Furthermore we propose an equivalence between a "second-quantized multiplicity"
of a charge- and moduli-dependent highest weight vector and the dyon
degeneracy, and show that the wall-crossing formula following from our proposal
agrees with the wall-crossing formula obtained from the supergravity analysis.
This can be thought of as providing a microscopic derivation of the
wall-crossing formula of this theory.
