AI and DeFi: The Benefits of AI for On-Chain Protocols