  CUBES is a X-ray detector payload which will be installed on the KTH 3U
CubeSat mission, MIST. The detector comprises cerium-doped Gd3Al2Ga3O12 (GAGG)
scintillators read out with silicon photomultipliers through a Citiroc
Application-Specific Integrated Circuit. The detector operates in the energy
range $\sim$35-800 keV. The aim of the CUBES mission is to provide experience
in the operation of these relatively new technologies in a high-inclination low
earth orbit, thereby providing confidence for component selection in more
complex satellite missions. The design of the CUBES detector is described, and
results from performance characterisation tests carried out on a prototype of
CUBES, called Proto-CUBES, are reported. Proto-CUBES was flown on a
stratospheric balloon platform from Timmins, Canada, in August 2019. During the
$\sim$12 hour long flight, the performance of Proto-CUBES was studied in the
near-space environment. As well as measuring the X-ray counts spectra at
different atmospheric depths, a 511 keV line from positron annihilation was
observed.
