We introduce perfect effect algebras and we show that every perfect algebra is an interval in the lexicographical product of the group of all integers with an Abelian directed interpolation po-group. To show this we introduce prime ideals of effect algebras with the Riesz decomposition property (RDP). We show that the category of perfect effect algebras is categorically equivalent to the category of Abelian directed interpolation po-groups. Moreover, we prove that any perfect effect algebra is a subdirect product of antilattice effect algebras with the RDP.