A comparative analysis of structural and surface effects in the electrochemical corrosion of carbons