Attacking the DeFi Ecosystem with Flash Loans for Fun and Profit