The markets, mills and refineries are the banks of the game. You need the markets maxed out to hold the gold in order to upgrade your TC to each level in order to upgrade the next few levels of walls until they are maxed for that level then the process starts again. And as far as using crowns to purchase gold to buy the markets/TC/walls it is calculated based on the amount the market holds. So the markets have everything to do with it.