Contracting for the Second Best in Dysfunctional Electricity Markets