Liquidity and financial contagion