As a future energy system,the smart grid is designed to improve the efficiency of traditional power sys-tems while providing more stable and reliable services.However,this efficient and reliable service relies on collecting and analyzing users'electricity consumption data frequently,which induces various secu-rity and privacy threats.To address these challenges,we propose a double-blockchain assisted secure and anonymous data aggregation scheme for fog-enabled smart grid named DA-SADA.Specifically,we design a three-tier architecture-based data aggregation framework by integrating fog computing and the block-chain,which provides strong support for achieving efficient and secure data collection in smart grids.Subsequently,we develop a secure and anonymous data aggregation mechanism with low computational overhead by jointly leveraging the Paillier encryption,batch aggregation signature and anonymous authentication.In particular,the system achieves fine-grained data aggregation and provides effective support for power dispatching and price adjustment by the designed double-blockchain and two-level data aggregation.Finally,the superiority of the proposed scheme is illustrated by a series of security and computation cost analyses.