I created a low-fantasy world (there is magic, but it cannot really do much) centered around a city-state similiar to medieval/renaissance Venice. On the broken remains of an old empire they became a trade center, got rich and established multiple colonies on islands and even inland along the major continental river.
Greedy remnants of the empire attacked the city-state. Fortunately for the city-state, they discovered gunpowder some years earlier and used it to soundly defeat these attacks despite being greatly outnumbered.
Now comes my question: Fifty years in the future they still are the only ones that have gunpowder and they can be quite certain that they will be the only ones in the future. But why?
In my eyes the recipe for gunpowder is too simple to be kept secret and its components are to common to have a monopoly on them, but maybe I am wrong.