The wealth of East African city-states was based on control of natural resources farming trade or gold mining

The wealth of East African city-states was primarily based on control of trade routes. Many of the city-states, such as Kilwa, Sofala, and Mombasa, were strategically located along the Indian Ocean trade routes. They served as important intermediaries for the trade of goods such as gold, ivory, spices, and slaves between East Africa, the Arab world, India, and China. The city-states were able to accumulate wealth through taxes and tariffs on goods passing through their ports, as well as through the sale of local resources and products. While some city-states did engage in farming and mining activities, trade was the main source of wealth and prosperity for the East African city-states.