Ternary battery