  This article explores the optimisation of trading strategies in Constant
Function Market Makers (CFMMs) and centralised exchanges. We develop a model
that accounts for the interaction between these two markets, estimating the
conditional dependence between variables using the concept of conditional
elicitability. Furthermore, we pose an optimal execution problem where the
agent hides their orders by controlling the rate at which they trade. We do so
without approximating the market dynamics. The resulting dynamic programming
equation is not analytically tractable, therefore, we employ the deep Galerkin
method to solve it. Finally, we conduct numerical experiments and illustrate
that the optimal strategy is not prone to price slippage and outperforms
na\"ive strategies.

Trading and Market Microstructure