We consider game-theoretic models related to the supply function auction for electricity markets. We determine the set of supply function equilibria (SFE), introduced by Klemperer and Mayer (Econometrica 57:1243-1277, 1989), for a symmetric oligopoly with linear demand, fixed marginal cost and capacity constraint. This set depends on the maximum random shock of the demand function. We also study the best response dynamics and show that in general it does not converge to any SFE. We find out sufficient conditions for the convergence and conclude on the optimal parameters of the auction.