  Mildly irradiated mini-Neptunes have densities potentially consistent with
them hosting substantial liquid water oceans (`Hycean' planets). The presence
of CO2 and simultaneous absence of ammonia (NH3) in their atmospheres has been
proposed as a fingerprint of such worlds. JWST observations of K2-18b, the
archetypal Hycean, have found the presence of CO2 and the depletion of NH3 to
<100 ppm; hence, it has been inferred that this planet may host liquid water
oceans. In contrast, climate modelling suggests that many of these
mini-Neptunes, including K2-18b, may likely be too hot to host liquid water. We
propose a solution to this discrepancy between observation and climate
modelling by investigating the effect of a magma ocean on the atmospheric
chemistry of mini-Neptunes. We demonstrate that atmospheric NH3 depletion is a
natural consequence of the high solubility of nitrogen species in magma at
reducing conditions; precisely the conditions prevailing where a thick hydrogen
envelope is in communication with a molten planetary surface. The magma ocean
model reproduces the present JWST spectrum of K2-18b to < 3 sigma, suggesting
this is as credible an explanation for current observations as the planet
hosting a liquid water ocean. Spectral areas that could be used to rule out the
magma ocean model include the >4um region, where CO2 and CO features dominate:
Magma ocean models suggest a systematically lower CO2/CO ratio than estimated
from free chemistry retrieval, indicating that deeper observations of this
spectral region may be able to distinguish between oceans of liquid water and
magma on mini-Neptunes.
