Electrolytes in lithium-metal and lithium-ion batteries have an especially difficult and complex role to play. The electrolyte is in contact with both the anode and the cathode and must not react with either.
It must allow a high degree of mobility of lithium ions between the two electrodes, but must be an electronic insulator to avoid self-discharge of electrons between the electrodes.
It should be thermally stable and relatively non-toxic so that it doesn’t present an environmental hazard in the event of an accident. Lastly, it must be inexpensive if the price of batteries is to continue to fall.