Power networks are undergoing a fundamental transition, with traditionally passive consumers becoming ‘prosumers’ — proactive consumers with distributed energy resources, actively managing their consumption, production and storage of energy. A key question that remains unresolved is: how can we incentivize coordination between vast numbers of distributed energy resources, each with different owners and characteristics? Virtual power plants and peer-to-peer (P2P) energy trading offer different sources of value to prosumers and the power network, and have been proposed as different potential structures for future prosumer electricity markets. In this Perspective, we argue they can be combined to capture the benefits of both. We thus propose the concept of the federated power plant, a virtual power plant formed through P2P transactions between self-organizing prosumers. This addresses social, institutional and economic issues faced by top-down strategies for coordinating virtual power plants, while unlocking additional value for P2P energy trading.