If your compost stinks, it could be a combination of several problems. Your pile could be excessively wet, have insufficient air for circulation, or contain far too much nitrogen. It might also smell unpleasant because it's really a pile of decomposition, but the previous three options are just as valid and likely to produce a problem. These issues can be solved by adding dry materials, flipping the pile over, and adding brown materials, in that order.