Nature of the energy source powering solar coronal loops driven by nanoflares