Carbon release by selective alloying of transition metal carbides