So I have been reading up on bitcoin and blockchain for awhile now, but I have yet to fully understand it. I understand that bitcoin leverage on DLT, which uses cryptography to verify transaction. This is what I have understood so far:
- When I make a transaction, this transaction is added to a pool of unconfirmed transactions
- This pool of unconfirmed transactions forms a block and miners will solve a mathematical problem as verification
- The first miner to solve it will have the block verified and added on to the chain
However, how do they know if my transaction is valid? What if I have 1 BTC but decide to send 2 BTC, how does the solving of mathematical problem verify that I do not have 2 BTC? What if I just purchased 5 BTC from Coinbase using fiat, how will anyone know that I have 5 BTC?
I believe this should not be a very difficult question but I cant seem to understand it fully. Hope someone can point be to the right direction and enlighten me thanks!