We study macroscopically two dimensional N = (2, 2) supersymmetric gauge theories constructed by compactifying the quiver gauge theories with eight supercharges on a product T d × R 2 ǫ of a d-dimensional torus and a two dimensional cigar with Ω-deformation. We compute the universal part of the effective twisted superpotential. In doing so we establish the correspondence between the gauge theories, quantization of the moduli spaces of instantons on R 2−d × T 2+d and singular monopoles on R 2−d × T 1+d , for d = 0, 1, 2, and the Yangian Y ǫ (g Γ ), quantum affine algebra U aff q (g Γ ), or the quantum elliptic algebra U ell q,p (g Γ ) associated to Kac-Moody algebra g Γ for quiver Γ.