Designing Competitive Electricity Markets by