This paper introduces a model of endogenous network formation and systemic risk. In the model a link represents a trading opportunity that yields benefits only if the counterparty does not subsequently default. After links are formed, they are subjected to exogenous shocks that are either good or bad. Bad shocks reduce returns from links and incentivize default. Good shocks, the reverse. Defaults triggered by bad shocks might propagate via links. The model yields three insights. The first concerns the volatility paradox. A higher probability of good shocks generates a higher systemic risk because increased interconnectedness in the network offsets the effect of better fundamentals. Second, the networks formed in the model are utilitarian efficient. The former is a consequence of contagion being triggered too often, whereas the latter is a consequence of contagion spreading easily. Third, the network formed critically depends on the correlation between shocks to the links. As a consequence, an outside observer who misconceives the correlation structure of shocks, upon observing a highly interconnected network, will significantly underestimate the probability of system wide default.