The insertion of a metal layer between an active electrode and a switching layer leads to the formation of a ternary oxide at the interface. The properties of this self-formed oxide are found to be dependent on the Gibbs free energy of oxide formation of the metal (ΔGf°). We investigated the role of various ternary oxides in the switching behavior of conductive bridge random access memory (CBRAM) devices. The ternary oxide acts as a barrier layer that can limit the mobility of metal cations in the cell, promoting stable switching. However, too low (higher negative value) ΔGf° leads to severe trade-offs; the devices require high operation current and voltages to exhibit switching behavior and low memory window (on/off) ratio. We propose that choosing a metal layer having appropriate ΔGf° is crucial in achieving reliable CBRAM devices.