How aquafaba works isn’t precisely understood. Mr. McGee said the key is its viscous mixture of protein and dissolved starch, which slows down the collapse of a foam, as well as chemicals called saponins.

Saponins — the name comes from the Latin for soap — have long been known for their ability to stabilize bubbles much as emulsifiers do, gathering at the water-air interface in the bubble walls and holding them together. The Lebanese meringuelike dessert natef is made with saponaria officinalis, a saponin-rich root that is used for carpet cleaning as well as cooking.

Whatever the reason, aquafaba delivers. Dump a can of chickpea water into a mixer, and it froths instantly, like bubbles in a bath, and whips into stiff, glossy peaks. It retains a slight beany aroma in the bowl, but that disappears when cooked. There is no residual flavor, and few calories.

“It’s definitely cool,” said Tal Ronnen, the chef at the vegan restaurant Crossroads in Los Angeles. Where gallons of chickpea water used to be tossed out every week, the kitchen now uses whipped aquafaba to lighten pancakes, make macarons and create cocktails at the bar. (Aquafaba adds little significant nutrition; one recent analysis found about 1.8 grams of protein in three-quarters of a cup, and trace amounts of minerals.)

For Sir Kensington’s, aquafaba was a miracle. The market for vegan mayonnaise is booming. Sales have jumped in the last year to $34 million from $25 million, while remaining flat in the $1.8 billion traditional mayonnaise market, according to Spins, a retail sales data company. But the company couldn’t find a way to make one without resorting to protein powders, starches or gums.