An obscure derivative is costing investors billions as China’s currency falls