  We discuss the recent proposal of arXiv:1608.05351 about generalization of
the RTT relation to network matrix models. We show that the RTT relation in
these models is modified by a nontrivial, but essentially abelian anomaly
cocycle, which we explicitly evaluate for the free field representations of the
quantum toroidal algebra. This cocycle is responsible for the braiding, which
permutes the external legs in the q-deformed conformal block and its 5d/6d
gauge theory counterpart, i.e. the non-perturbative Nekrasov functions. Thus,
it defines their modular properties and symmetry. We show how to cancel the
anomaly using a construction somewhat similar to the anomaly matching condition
in gauge theory. We also describe the singular limit to the affine Yangian (4d
Nekrasov functions), which breaks the spectral duality.
