How perverse incentives led to the explosion in Beruit