  We determine the structure of the BPS algebra of $2$-Calabi-Yau Abelian
categories whose stack of objects admits a good moduli space. We prove that
this algebra is isomorphic to the positive part of the enveloping algebra of a
generalised Kac-Moody Lie algebra generated by the intersection cohomology of
certain connected components (corresponding to roots) of the good moduli space.
Some major examples include the BPS algebras of (1) the category of semistable
coherent sheaves of given slope on a K3 surface or, more generally,
quasiprojective symplectic surface, (2) semistable Higgs bundles on smooth
projective curves, (3) preprojective algebras of quivers, (4) multiplicative
preprojective algebras and (5) fundamental groups of (quiver) Riemann surfaces.
We define the BPS Lie algebras of $2$-Calabi-Yau categories and prove that they
coincide with the ones obtained by dimensional reduction from the critical
cohomological Hall algebra in the case in which the 2-Calabi-Yau category is
the category of representations of a preprojective algebra. Consequences
include (1) A proof in full generality of the Bozec-Schiffmann positivity
conjecture for absolutely cuspidal polynomials, a strengthening of the Kac
positivity conjecture (2) A proof of the cohomological integrality conjecture
for the category of semistable coherent sheaves on local K3 surfaces (3) A
description of the cohomology (in all degrees) of Nakajima quiver varieties as
direct sums of irreducible lowest weight representations over the BPS Lie
algebra.
