In this work, we demonstrate how the use of a poly(ionic liquid) interlayer in combination with perovskite solar cells provides a bi-functionality of the surface allowing to concomitantly reduce the energy losses, enhance the charge extraction and improve the device stability all at once.