Depot can protect certain amount of your resources when you are attacked or when you are defeated in a battle. More resources are protected if you upgrade the Depot.

Resources produced but not yet collected from the Farm, Lumber Yard, Quarry, or Iron Mine are not protected.