Instability of supersymmetric black holes via quantum phase transitions