  We consider algebras defined from quivers with relations that are k-th order
derivations of a superpotential, generalizing results of Dubois-Violette to the
quiver case. We give a construction compatible with Morita equivalence, and
show that many important algebras arise in this way, including McKay
correspondence algebras for GL_n for all n, and four-dimensional Sklyanin
algebras. More generally, we show that any N-Koszul, (twisted) Calabi-Yau
algebra must have a (twisted) superpotential, and construct its minimal
resolution in terms of derivations of the (twisted) superpotential. This yields
an equivalence between N-Koszul twisted Calabi-Yau algebras A and algebras
defined by a superpotential such that an associated complex is a bimodule
resolution of A. Finally, we apply these results to give a description of the
moduli space of four-dimensional Sklyanin algebras using the Weil
representation of SL_2(Z/4).
