How Bitcoin Trading Works Under the Hood
How Bitcoin Trading Works Under the Hood
Cryptocurrencies like bitcoin are increasing in popularity with each passing day. They are called cryptocurrencies because they make use of cryptography to regulate the creation and transference of money. Digital goods usually have a problem called “double spending”, which means that they can be copied a thousand times and sent to a thousand-different people. Bitcoin, which is basically a distributed ledger at its core, solves this problem by recording each transaction and maintaining a peer to peer network. There’s a lot of talk surrounding bitcoin now, whether it’s safe or not, but the purpose of this article is to shine a light on the intricacies of its trading.
If you want to start trading in bitcoin you will first need a bitcoin address, either by downloading the bitcoin client or getting an online wallet. Bitcoin-qt and Muiltibit are the most popular bitcoin clients out there with former preferred as its widely regarded as the “official” bitcoin client. However, it does require one to have at least 10 GB of free space on their hard drive, so if space is a constraint it’s advisable to use the latter.
Sending money on bitcoin
When sending money on bitcoin, a message is broadcasted to the entire bitcoin network containing millions of computers worldwide. The transaction message consists of; “input transactions”, amount of bitcoin being sent and a digital signature which is basically a password to unlock and spend funds. To avoid forgery the digital signature is transmitted as a mathematical algorithm and on top of that a completely different digital signature is needed for every transaction, there is no reuse.
Digital signatures and how they work
Since information in bitcoin trading is spread out among millions of nodes (computers connected to the Bitcoin network), broadcasting any sensitive information would just ensure that someone will steal your money. This means your “private key”, which is sort of like your password, can’t be included in the transaction message. This is where the digital signature comes in, with each digital signature being used only once per transaction. It is computed by a function using your private key and the text of the message as inputs. To verify whether the digital signature matches with your public key, all the nodes processing the transaction in the network use a different function using the signature, message, and public key as the inputs. The network is therefore able to verify that you are the legitimate owner of the sender’s public key and ensure that no one tampers with the transaction amount after it has been sent since the signature contains both the private key and message as inputs.
Public and private keys and how they are generated
The private key is generated as a random number by the software when you start the process of creating a new wallet. It is therefore anonymous and only known to your wallet. The public key is derived from your private key by your wallet using a hashing algorithm known as “elliptic curve multiplication”. Consequently, via the use of a succession of hashing and encoding algorithms, the wallet software comes up with your wallet address. The number of possible bitcoin addresses is so large that the likelihood you’ll get the same address as someone else is so minute that it is thought to be mathematically impossible.
Account balances and how they are calculated
Your account balance can be calculated by the network at any given time since all dealings are chronicled by all blockchain-containing nodes. The amount transferred out of your account subtracted from the amount transferred into your account is basically your balance. When you want to send bitcoin to another person, ownership of funds is substantiated by use of links to prior transactions.
The Blockchain
This is essential in preventing incidences of “double spending” errors and attacks. Basically, it’s where transactions are ordered by placing them in groups known as blocks which are then linked together in what is referred to as the blockchain. This is done by the bitcoin system. This is necessary since the bitcoin system is a distributed ledger and not a private-ledger scenario like in a bank. Since it takes time for each transaction to circulate through the network as nodes will receive the transaction based mainly on their proximity to the origin of the transaction with those near receiving the transaction sooner than those far away due to time delays in data flowing around the world. The transaction-order problem is solved by blockchain by having each node group the transactions it receives into “blocks” of transactions based on the time that node received them instead of trying to create a timeline of individual transactions.
It also takes a gigantic amount of computing power to solve each block meaning it is very hard, almost impossible, to cheat the system and this makes it extremely hard to carry out a successful double-spending attack. If somehow two blocks are solved at the same time, two branches of the block are created, and a tie is created with the tie-breaker being when the next block is solved.
Bitcoin mining
This is the giving of monetary rewards to the computer that solves each block, as an incentive to run the bitcoin system’s transaction processing software. With each bitcoin going for over $900, it’s a very lucrative venture. However, since it takes a lot of time, computing power and electricity to solve each block, miners are now looking to come together into “mining pools”. Rewards from solving of a block are split based on how much computing power each member put in to the pool.
Hopefully this article gives you a broad understanding about bitcoin, and how it works under the hood. This is such a wide field that you can always learn that much more by visiting authoritative sites on the same such as bitgale.com