To prepare the marmelatta, place the onions, sugar, salt, and cayenne together in a small pan. Turn the heat to medium-low, and bring to a boil. The onions will give off significant water—let the mixture boil until it becomes jam-like in consistency, 5 to 10 minutes. Remove from heat and stir in the vinegar. Let cool to room temperature before serving with the warm polpette.