This question is a little conceptual, so hopefully this picture will help clear up my misunderstanding.
Image there is a crowdsale smart contract deployed on address 0x2. A User at address 0x01 buys a token. Here is my understanding of what happens:
- The crowdsale contract (@ address: 0x2) accepts ether from the user account (@ address: 0x1)
- The crowdsale contract stores 0x1 as having purchased a token (important: this information is stored in the smart contract @address 0x2)
Now my Question: If 0x1 is a user account (and not a smart contract) there is no code at address 0x1. I thought a user account just consisted of an address + ether associated with the address, how can it also store the fact that 0x1 owns an ERC20 token? For example, I can login to MetaMask and (before clicking the "add token" option) MetaMask can see that I have a token... how is this possible?