  We develop a theory of charge storage in ultra-narrow slit-like pores of
nano\-structured electrodes. Our analysis is based on the Blume-Capel model in
external field, which we solve analytically on a Bethe lattice. The obtained
solutions allow us to explore the complete phase diagram of confined ionic
liquids in terms of the key parameters characterising the system, such as pore
ionophilicity, interionic interaction energy and voltage. The phase diagram
includes the lines of first and second-order, direct and re-entrant, phase
transitions, which are manifested by singularities in the corresponding
capacitance-voltage plots. To test our predictions experimentally requires
mono-disperse, conducting, ultra-narrow slit pores, permitting only one layer
of ions, and thick pore walls, preventing interionic interactions across the
pore walls. However, some qualitative features, which distinguish the behavior
of ionophilic and ionophobic pores, and its underlying physics, may emerge in
future experimental studies of more complex electrode structures.
