To any Newton polygon one can assign the cluster integrable system. The group $G$ of discrete flows acts on the phase space, preserving the integrals of motion of the cluster integrable system. After deautonomization the action $G$ leads to $q$-difference equations, which are equations of isomonodromic deformations of linear $q$-difference equations. Finally, these equations can be explicitly solved using Nekrasov functions of $5d$ supersymmetric gauge theory or partition functions of topological strings. The Seiberg-Witten curve for corresponding supersymmetric gauge theory and toric Calabi-Yau are constructed from the initial Newton polygon.
Based on joint works with A. Marshakov and P. Gavrylenko.