  In this paper, a generalized version of dynamic ASEP is introduced, and it is
shown that the process has a Markov duality property with the same process on
the reversed lattice. The duality functions are multivariate $q$-Racah
polynomials, and the corresponding orthogonality measure is the reversible
measure of the process. By taking limits in the generator of dynamic ASEP, its
reversible measure, and the duality functions, we obtain orthogonal and
triangular dualities for several other interacting particle systems. In this
sense, the duality of dynamic ASEP sits on top of a hierarchy of many
dualities.
  For the construction of the process, we rely on representation theory of the
quantum algebra $\mathcal{U}_q(\mathfrak{sl}_2)$. In the standard
representation, the generator of generalized ASEP can be constructed from the
coproduct of the Casimir. After a suitable change of representation, we obtain
the generator of dynamic ASEP. The corresponding intertwiner is constructed
from $q$-Krawtchouk polynomials, which arise as eigenfunctions of twisted
primitive elements. This gives a duality between dynamic ASEP and generalized
ASEP with $q$-Krawtchouk polynomials as duality functions. Using this duality,
we show the (almost) self-duality of dynamic ASEP.
