Remove recursions from computeLiquidity.