In this paper, we propose a novel multi-layer market for analyzing the energy exchange process between electric vehicles and the smart grid. The proposed market consists essentially of two layers: a macro layer and a micro layer. At the macro layer, we propose a double auction mechanism using which the aggregators, acting as sellers, and the smart grid elements, acting as buyers, interact so as to trade energy. We show that this double auction mechanism is strategy-proof and converges asymptotically. At the micro layer, the aggregators, which are the sellers in the macro layer, are given monetary incentives so as to sell the energy of associated plug-in hybrid electric vehicles (PHEVs) and to maximize their revenues. We analyze the interaction between the macro and micro layers and study some representative cases. Depending on the elasticity of the supply and demand, the utility functions are analyzed under different scenarios. Simulation results show that the proposed approach can significantly increase the utility of PHEVs, compared to a classical greedy approach.