In a 10- to 12-inch frying pan over medium-low heat, frequently stir onion in olive oil until very limp, about 10 minutes. Add tomatoes, basil leaves, and bay leaf to pan. Reduce heat to low and cook, stirring occasionally, until tomatoes have disintegrated and most of the liquid has evaporated, about 30 minutes. Let cool about 30 minutes. Discard bay leaf. In a blender or food processor, whirl tomato mixture, sherry vinegar, extra-virgin olive oil, and cayenne until smooth. Use or chill airtight up to 2 days.