Nanoscale dynamics of phospholipids reveals an optimal assembly mechanism of pore-forming proteins in bilayer membranes.