Capping a three-dimensional metal halide perovskite with a layered, two-dimensional perovskite prevents ions from diffusing out of the perovskite keeping out oxygen and water as well as contributing to solar cell stability. New research shows that a thin cross-linked polymer layer can ensure that the boundary between the 3D and 2D materials remains sharp, further improving stability.