bitcoin design
![bitcoin-shatters-lifetime-price-high-breaking-the-69k-barrier.jpg](file-guid:1b8ed8f5-4a54-4f39-ba3f-08b9ab7f17a0 "bitcoin-shatters-lifetime-price-high-breaking-the-69k-barrier.jpg")
# Design
### Units and divisibility
The unit of account of the bitcoin system is the bitcoin. It is most commonly represented with the symbol ₿ and the currency code BTC. However, the BTC code does not conform to ISO 4217 as BT is the country code of Bhutan, and ISO 4217 requires the first letter used in global commodities to be 'X'. XBT, a code that conforms to ISO 4217 though not officially part of it, is used by Bloomberg L.P.
No uniform capitalization convention exists; some sources use Bitcoin, capitalized, to refer to the technology and network, and bitcoin, lowercase, for the unit of account. The Cambridge Advanced Learner's Dictionary and the Oxford Advanced Learner's Dictionary use the capitalized and lowercase variants without distinction.
One bitcoin is divisible to eight decimal places. Units for smaller amounts of bitcoin are the millibitcoin (mBTC), equal to 1⁄1000 bitcoin, and the satoshi\[a\] (sat), representing 1⁄100000000 (one hundred millionth) bitcoin, the smallest amount possible. 100,000 satoshis are one mBTC.
### Blockchain
Further information: Blockchain § Structure and design As a decentralized system, bitcoin operates without a central authority or single administrator, so that anyone can create a new bitcoin address and transact without needing any approval. This is accomplished through a specialized distributed ledger called a blockchain that records bitcoin transactions.
The blockchain is implemented as an ordered list of blocks. Each block contains a SHA-256 hash of the previous block, chaining them in chronological order. The blockchain is maintained by a peer-to-peer network. Individual blocks, public addresses, and transactions within blocks are public information, and can be examined using a blockchain explorer.
Nodes validate and broadcast transactions, each maintaining a copy of the blockchain for ownership verification. A new block is created every 10 minutes on average, updating the blockchain across all nodes without central oversight. This process tracks bitcoin spending, ensuring each bitcoin is spent only once. Unlike a traditional ledger that tracks physical currency, bitcoins exist digitally as unspent outputs of transactions.
### Addresses and transactions
Simplified chain of ownership. In practice, a transaction can have more than one input and more than one output. In the blockchain, bitcoins are linked to specific addresses that are hashes of a public key. Creating an address involves generating a random private key and then computing the corresponding address. This process is almost instant, but the reverse (finding the private key for a given address) is nearly impossible. Publishing a bitcoin address does not risk its private key, and it is extremely unlikely to accidentally generate a used key with funds. To use bitcoins, owners need their private key to digitally sign transactions, which are verified by the network using the public key, keeping the private key secret.
Bitcoin transactions use a Forth-like scripting language,\[8\]: ch. 5 involving one or more inputs and outputs. When sending bitcoins, a user specifies the recipients' addresses and the amount for each output. This allows sending bitcoins to several recipients in a single transaction. To prevent double-spending, each input must refer to a previous unspent output in the blockchain. Using multiple inputs is similar to using multiple coins in a cash transaction. As in a cash transaction, the sum of inputs can exceed the intended sum of payments. In such a case, an additional output can return the change back to the payer. Unallocated input satoshis in the transaction become the transaction fee.
Losing a private key means losing access to the bitcoins, with no other proof of ownership accepted by the protocol. For instance, in 2013, a user lost ₿7,500, valued at US$7.5 million, by accidentally discarding a hard drive with the private key. It is estimated that around 20% of all bitcoins are lost. The private key must also be kept secret as its exposure, such as through a data breach, can lead to theft of the associated bitcoins. As of December 2017, approximately ₿980,000 had been stolen from cryptocurrency exchanges.
### Mining
Bitcoin mining facility with large amounts of mining hardware The mining process in Bitcoin involves maintaining the blockchain through computer processing power. Miners group and broadcast new transactions into blocks, which are then verified by the network. Each block must contain a proof of work (PoW) to be accepted, involving finding a nonce number that, combined with the block content, produces a hash numerically smaller than the network's difficulty target. This PoW is simple to verify but hard to generate, requiring many attempts. PoW forms the basis of Bitcoin's consensus mechanism.
The difficulty of generating a block is deterministically adjusted based on the mining power on the network by changing the difficulty target, which is recalibrated every 2,016 blocks (approximately two weeks) to maintain an average time of ten minutes between new blocks. The process requires significant computational power and specialized hardware.
Miners who successfully find a new block can collect transaction fees from the included transactions and a set reward in bitcoins. To claim this reward, a special transaction called a coinbase is included in the block, with the miner as the payee. All bitcoins in existence have been created through this type of transaction. This reward is halved every 210,000 blocks until ₿21 million, with new bitcoin issuance slated to end around 2140. Afterward, miners will only earn from transaction fees. These fees are determined by the transaction's size and the amount of data stored, measured in satoshis per byte.
The proof of work system and the chaining of blocks make blockchain modifications very difficult, as altering one block requires changing all subsequent blocks. As more blocks are added, modifying older blocks becomes increasingly challenging. In case of disagreement, nodes trust the longest chain, which required the greatest amount of effort to produce. To tamper or censor the ledger, one needs to control the majority of the global hashrate. The high cost required to reach this level of computational power guarantees the security of the bitcoin blockchain.
Bitcoin mining's environmental impact is controversial and has attracted the attention of regulators, leading to restrictions or incentives in various jurisdictions. As of 2022, a non-peer-reviewed study by the Cambridge Centre for Alternative Finance (CCAF) estimated that bitcoin mining represented 0.4% of global electricity consumption. Another 2022 non-peer-reviewed commentary published in Joule estimated that bitcoin mining was responsible for 0.2% of world greenhouse gas emissions. About half of the electricity used is generated through fossil fuels. Moreover, mining hardware's short lifespan results in electronic waste. The amount of electrical energy consumed, and the e-waste generated, is comparable to that of Greece and the Netherlands, respectively.
### Privacy and fungibility
Bitcoin is pseudonymous, with funds linked to addresses, not real-world identities. While the owners of these addresses are not directly identified, all transactions are public on the blockchain. Patterns of use, like spending coins from multiple inputs, can hint at a common owner. Public data can sometimes be matched with known address owners. Bitcoin exchanges might also need to collect personal data as per legal requirements. For enhanced privacy, users can generate a new address for each transaction.
In the Bitcoin network, each bitcoin is treated equally, ensuring basic fungibility. However, users and applications can choose to differentiate between bitcoins. While wallets and software treat all bitcoins the same, each bitcoin's transaction history is recorded on the blockchain. This public record allows for chain analysis, where users can identify and potentially reject bitcoins from controversial sources. For example, in 2012, Mt. Gox froze accounts containing bitcoins identified as stolen.