Cystatin forms a tetramer through structural rearrangement of domain-swapped dimers prior to amyloidogenesis.