  We prove the flow tree formula conjectured by Alexandrov and Pioline which
computes Donaldson-Thomas invariants of quivers with potentials in terms of a
smaller set of attractor invariants. This result is obtained as a particular
case of a more general flow tree formula reconstructing a consistent scattering
diagram from its initial walls.
