Your Treasury will protect a certain amount of resources and keep them safe from raids. You can build a Treasury at Keep level 7. Upgrading your Treasury will increase the amount of protected resources.