  Neptune-size exoplanets seem particularly sensitive to atmospheric
evaporation, making it essential to characterize the stellar high-energy
radiation that drives this mechanism. This is particularly important with M
dwarfs, which emit a large and variable fraction of their luminosity in the UV
and can display strong flaring behavior. The warm Neptune GJ3470b, hosted by an
M2 dwarf, was found to harbor a giant hydrogen exosphere thanks to 3 transits
observed with the HST/STIS. Here we report on 3 additional transit observations
from the PanCET program, obtained with the HST/COS. These data confirm the
absorption signature from GJ3470b's exosphere in the stellar Ly-alpha line and
demonstrate its stability over time. No planetary signatures are detected in
other lines, setting a 3sigma limit on GJ3470b's FUV radius at 1.3x its Roche
lobe radius. We detect 3 flares from GJ3470. They show different spectral
energy distributions but peak consistently in the Si III line, which traces
intermediate-temperature layers in the transition region. These layers appear
to play a particular role in GJ3470's activity as emission lines that form at
lower or higher temperatures than Si III evolved differently over the long
term. Based on the measured emission lines, we derive synthetic XUV spectra for
the 6 observed quiescent phases, covering one year, as well as for the 3
flaring episodes. Our results suggest that most of GJ3470's quiescent
high-energy emission comes from the EUV domain, with flares amplifying the FUV
emission more strongly. The hydrogen photoionization lifetimes and mass loss
derived for GJ3470b show little variation over the epochs, in agreement with
the stability of the exosphere. Simulations informed by our XUV spectra are
required to understand the atmospheric structure and evolution of GJ3470b and
the role played by evaporation in the formation of the hot-Neptune desert.
