What determines how much of my resources are available for an opponent to steal?

I cannot work out how the game decides how much gold and elixir an opponent can steal from me. Sometimes it is around half of my total balance, while other times it seems to be a very small proportion, say around 10-20% .

Is there a formula that determines this?


Solution 1:

It's 20% of total storage. 200k is maximum that can be taken and anything in elixer collectors or mines is added on top of the 200k.