A theoretical framework for dynamical fee choice in AMMs | Synapse