By tapping on the "Refill stock" button you can refill all your resource stocks in the chosen village at the cost of some magic potions. This function is limited by a cooldown timer and can not be used perpetually.
The magic potions required for this action depends on the amount of resources. The more resources are gained, the higher the costs will be. The price for refilling 1 to 500 units of resources equals 25 magic potions, refilling 501 to 1000 units will cost 50 magic potions, and so on and so forth.