The wealth of East African city-states was based on

control of natural resources
farming
trade
gold mining

Trade