The invention relates to a porous perovskite film, carbon slurry and a carbon electrode based solar cell. The chemical formula of the perovskite film is ABX3, wherein A is at least one monovalent cation, and is preferably at least one or a mixed ion of CH3NH3<+>, NH2-CH=NH2<+>, Cs<+>, Li<+>, C4H9NH3<+>, CH6N3<+>, Na<+> and K<+>, B is at least one of PB<2+>, Sn<2+>, Ge<2+>, Co<2+>, Fe<2+>, Mn<2+>,Cu<2+> and Ni<2+>, and X is at least one of Cl<->, Br<->, I<->, SCN<-> and BF4<->. The perovskite film is of a porous structure.