ENERGY STORAGE FROM FUNDAMENTAL PRINCIPLES