How to Mitigate Transaction Costs in DeFi