How Does Bitcoin Function? A Comprehensive Look at Bitcoin’s Technical Aspects

How are Bitcoin created?

Find more about the components of bitcoin’s operation, such as difficulty adjustment, the supply curve, the way transactions are processed, UTXO, Merkle Trees, hard and soft forks, and block explorers.

How are brand-new Bitcoins produced?

Bitcoins are produced using a procedure known as “mining.” Before adding new transactions to the blockchain, miners must first solve a challenging mathematical challenge known as Proof-of-Work. New bitcoins are given to them in exchange.

A computer and the right setup may be used by anyone to start mining. Once you become a miner, you can collaborate with other miners to validate and log transactions.

Adjustments for Blocktime and Difficulty

It is challenging to foresee the number of miners who will join. If there are too few, the system will operate slowly, and the user experience will suffer. If there are too many, the system will operate too quickly, which could compromise security. Therefore, it is critical that the system maintain a comparatively constant rate regardless of the number of miners (or, in other words, hash power) that are currently in operation.

Bitcoin uses a method known as “difficulty adjustment” to maintain a steady mining speed of roughly 10 minutes each block. Every two weeks, the “difficulty” is changed while taking into account the historical hash power. The difficulty will be lowered if the hash power is insufficient (i.e., the average block time exceeds 10 minutes). In contrast, the difficulty will be raised if the hash power is too high (i.e., the average block time is less than 10 minutes).

How are adjustments for difficulty made?

The Proof-of-Work algorithm is a requirement of the Bitcoin protocol, which compels miners to compete with one another to solve a “cryptographic problem” before the winner can suggest a new block and add it to the blockchain.

By changing the nonce (a 32-bit arbitrary random number), the “cryptographic riddle” is resolved so that the block-hash is smaller than the target-hash (a value that is smaller than 256-bits).

In order for the block’s hash to be less than or equal to the target-hash set by the network, miners must discover a nonce. You succeed and receive the mining rewards if your hash value is lower than the target. If not, you modify the nonce and try once again.

The target-hash gets smaller as network hash power increases. A smaller target-hash makes it more difficult for miners to generate a block hash with a smaller hash value than the target-hash. (Pretend a machine selects a number at random from 1 to 100. There is a 0.1 chance of discovering a number below 10, but a 0.5 chance of finding a number below 50.

The bitcoin network implements “difficulty changes” in this way.

What are transaction fees, mining rewards, and hash rates?

We can see why hash power matters and how it relates to blocktime and difficulty adjustment from the previous section. The hash rate can be used to calculate hash power:

Hashing rate

The quantity of hash operations carried out in a specific period of time is measured by the hash rate. Depending on the gear used, this can change. For instance, there are 30 million hashes per second if a miner has a device that can generate a hash rate of 30 MHz (a hash is one conversion from one state to another or to simplify it further, one calculation).

Therefore, a GPU with a 30MHz hash rate does 30,000,000 calculations per second.

Calculating hash rates

The likelihood that a miner will successfully solve a block and receive a block reward increases with hash rate. The following formula can be used to determine roughly how likely it is that a miner will solve the block:

P = X / Y

Where P is the likelihood that a block will be broken X = the hash rate of the miners

Y = total hash rate of the network, which is the sum of all active miners’ hash rates.

You’ve probably heard of “mining farms,” which are enormous industrial-scale buildings filled with mining equipment used only for Bitcoin mining. The combined hashing power of many GPUs (graphics processing units) or ASICs (application specific integrated circuits) may be thousands of times greater than that of a single mining piece of gear. This is intended to increase the likelihood that a block will be cracked, and a reward will be obtained.

Mining profits

When miners successfully solve the cryptographic conundrum required for mining a new block, the system generates money (in the form of newly produced coins) to reimburse them for their labor.

6.25 bitcoins are presently the block reward for bitcoin mining. In order to win the reward, miners must

compete with one another in the network to be the first to solve the block. Therefore, the likelihood of earning mining rewards increases with hash rate. Mining businesses and individuals frequently need to spend a significant amount of money upfront on hardware and electricity in order to improve the return on investment and raise the likelihood of successful mining.

However, because to restricted resources and the sharp rise in the total hash rate of the bitcoin network, it is now nearly impossible for a single person to mine bitcoins alone. Therefore, mining pools enable individuals to pool resources and participate to their mining that is outsourced. By sharing the rewards in accordance with their hash rate, individuals can reduce the volatility they might experience when mining alone and mining pools can acquire more resources to compete with one another.

Cutting mining rewards in half

The mining prize is divided in half every 210,000 blocks. Bitcoin’s block reward initially stood at 50 BTC, then dropped to 25 BTC in 2012, and then again to 12.5 BTC in 2016. The block reward again halved in 2020 to 6.25 BTC, and it will keep halving until all 21 million BTC have been mined.

The mining rewards and the timing of token releases vary amongst cryptocurrencies. This information can be obtained by consulting the white papers of the relevant coin.

A coinbase transaction, or the initial transaction in a block, is when the block reward is collected. To obtain the block reward or any additional transaction fees, miners use it.

Fees for transactions

A network charge acts as an additional incentive for miners to verify transactions because mining earnings for Bitcoin and other coins using the PoW process steadily decline. Users must pay a network fee to the miners for each transaction when using coins with a PoW consensus. Depending on the coin and the volume of traffic, this transaction cost may change. The remainder of the input that was not spent is the transaction fee. Typically, it is calculated in satoshi per byte (the smallest unit of bitcoin).

The miners are enticed to verify your transaction-by-transaction fees. Paying little or no transaction fees is also an option but doing so will make it far less likely that the transaction will be included in the following block.

Some coins, including XRP, EOS, and IOTA, offer low or no transaction fees and typically use a different consensus algorithm (like DPoS or PBFT) or technology (like DAG).

Using both hard and soft forks

In programming, a “fork” is a change to open-source code. Usually, the forked code is substantially different from the original but still related, and the two “prongs” can coexist together.

Cryptocurrency networks are decentralized, thus in order for them to function correctly, all members, or “nodes,” must adhere to the same set of rules11. The term “protocol” refers to that set of guidelines. The size of a block on a blockchain, the compensation miners earn for mining a new block, and many more rules are examples of typical rules in a protocol. Due to the decentralized nature of blockchain, nodes in the network must be able to agree on the blockchain’s shared state.

The fork’s purpose

The network nodes agree on a protocol that creates a single blockchain with verified data (transactions)

that it believes to be accurate. However, if there are network nodes that are unable to agree on the blockchain’s current state, this causes the network to split into two branches. In the world of cryptocurrencies, a fork is more frequently used to introduce a fundamental change or to produce a new asset with features that are close to (but not identical to) those of the original.

In the world of cryptocurrencies, there are hard and soft forks. However, both varieties of forks significantly alter how a cryptocurrency’s protocol functions.

Stony forks

When a cryptocurrency protocol undergoes a hard fork, it is incompatible with earlier versions. As a result, nodes running the older protocol version won’t be able to process transactions or add new blocks to the blockchain. The older chain will not accept any transactions from the forked (newer) chain. If nodes and miners wish to be on the new forked chain, they must update to the most recent version of the protocol.

As an illustration, a protocol raises the maximum block size from 2MB to 4MB. The older, non-updated nodes will reject a 3MB block if it is attempted to be sent to the blockchain by an updated node since they do not recognize it as valid. As a result, two branches of the original single blockchain form over time. One only has blocks from the older version, while the other only has blocks from the newer version. The nodes that validate the upcoming blocks will determine which chain grows the fastest, and other splits may occur. The two (or more) chains might continue to grow in parallel indefinitely.

Planned versus controversial forks

Hard forks can either be anticipated or contentious, depending on the circumstance.

Nodes will freely update their software to adhere to the new guidelines for planned forks, leaving the previous version behind. The users who don’t update are stuck mining on the outdated chain, which is used by a very small number of people.

However, if the fork is controversial, it indicates that the community is divided regarding the upgrade. Typically, the protocol is forked into two unrelated blockchains, creating two distinct coins. The developers will select the blockchain they feel is best among the two because each will have its own community.

All transactions from the original blockchain are transferred into the new fork because a new fork is based on the existing blockchain. For instance, if a hard fork based on a cryptocurrency named Coin A spawns a new cryptocurrency called Coin B, and you already own 100 coins of Coin A, you will also receive 100 coins of Coin B.

Supple forks

A bitcoin protocol update known as a soft fork maintains backward compatibility. As long as they don’t violate the new protocol guidelines, non-updated nodes can continue to process transactions and add new blocks to the blockchain. Unlike a hard fork, which requires (nearly) all nodes to upgrade and agree on the new version, this type of fork simply needs a majority of the miners upgrading to conform to the new rules.

A new rule to reduce the block size limit from 3MB to 2MB serves as an illustration of a soft fork. Older nodes will still be able to push new blocks that are 2MB or less and process transactions. The block will be rejected by newer nodes since it doesn’t comply with the new standards if an older node attempts to push a block larger than 2MB to the network. The fact that the older nodes are less effective than the updated ones motivate them to update to the current version.

What Token Supply Means for Bitcoin

The total supply of Bitcoin is 21,000,000. Over 18,000,000 bitcoins have already been mined as of today. The block reward for the first bitcoin block was 50 BTC, and it is halved every 210,000 blocks, or roughly every 4 years, which considerably reduces inflation. 6.25 BTC is the block reward at the moment (after three halving events). On June 3, 2024, the next Bitcoin halving is anticipated to take place. Some people projected that a few years after 2100, all bitcoins would have been mined.

Bitcoin is permanently lost

The actual quantity of bitcoins is less than the theoretical value since some bitcoins are permanently lost and cannot be recovered due to loss of private keys or hardware damage. Additionally, Satoshi Nakamoto, the person who created bitcoin, still holds a sizeable chunk of the cryptocurrency that he mined years ago.

About Author