DeFi Farming on Autopilot: Behind maxAPY Algorithms