Decentralised Finance and Automated Market Making: Predictable Loss and Optimal Liquidity Provision