# How do Bitcoins work?

How do Bitcoins work?

Bitcoin is a decentralized peer to peer virtual currency.

Created in 2009 by a person or group known as Satoshi Nakamoto. The true identity of this person or group is still unknown) as a way to facilitate commerce on the internet. Without the need for a trusted third party to intermediate the transactions on the network. More specifically, Bitcoin is a protocol or mathematical algorithm that lays out a method for nodes on the network. To safely and reliably maintain a ledger of which nodes have Bitcoin. How much they have, where they got that bitcoin from, and how to maintain this ledger. Moreover, one could probably teach an entire course on Bitcoin and its mathematical underpinnings. But we will focus on a few key features as it pertains to profitability of Bitcoin mining. Namely an immutable ledger and Proof of Work

#### An Immutable Ledger

To begin, let us consider what a Bitcoin is. From the original white paper, a Bitcoin is a chain of digital signatures. When an owner of a bitcoin wants to transact with said bitcoin. He or she signs the bitcoin with the previous transaction. And the public key of the next owner and attaches it to the coin. Now the coin is owned by the second person. And they can repeat this process over and over again.

This action represents how one obtains a bitcoin. Furthermore, where one spent the coin. Naturally, a problem arises though. How does the new owner know for certain that the previous owner did not give this coin to someone else? After all, they could theoretically lie about the previous transaction. And give you a coin that owned by someone else. To prevent this, an immutable timestamped ledger records all of the transactions. This way, the new owner can see all transactions that occurred with this bitcoin. Furthermore, be sure that the previous owner is not trying to trick them.

To scale this system, transactions group together into ”blocks”. And become ”chained” together to form a linked list of transactions. This is where the term blockchain comes from. Then, when a new transaction forms. The network can propagate this information to all the other nodes in the network. Who will then add this block to their current record and then everyone has an updated version of the blockchain. This however raises a new question? How can I be sure that a new transaction I received is a legitimate transaction. Moreover, that everyone else also received and trusts. Lastly, the solution is a Proof of Work algorithm.