Bitcoin - bits & bytes

Overview

"Nakamoto set up a competition, the object of which is to be the first to determine a very specific signature based on three inputs: the signature of the preceding block, the list of new transactions, and a random third number. Since miners don’t know the third number, they must generate signatures repeatedly until one guesses correctly. This expends an immense amount of energy, signalling to the rest of the network that a miner’s accounting can be trusted.”

Mike Orcutt, “Blockchains Use Massive Amounts of Energy—But There’s a Plan to Fix That”

https://www.technologyreview.com/s/609480/bitcoin-uses-massive-amounts-of-energybut-theres-a-plan-to-fix-it/ 

A coin is a computer “token” a chain of bits and bytes just like your name or any other piece of programming.

Bitcoin was created as mathematical puzzle by an anonymous person who also created the Blockchain (a distributed real time ledger).

Its original intention, and still is, was to confront the establishment, to provide a global technology application that allowed individuals to exchange a computer token anonymously, outside the banking system and the purvey of the establishment.

The coins would be stored in an encrypted wallet.

This was a boon to activists but unfortunately more so to criminals such as those who operated on the Silk Road, to Drug Cartels, rogue nations and other regimes such as Russia.

People saw a business opportunity to attempt to solve the puzzle in order to create a new Block and to get a few Bitcoins in payment - they are called miners. Mining uses massive amounts of electricity.

Then people saw another opportunity to create coin exchanges to buy and sell Bitcoin making money by charging a real currency (dollars) transaction fee.

Other coins over time were created -  there are 1384 different ones as of today (https://coinmarketcap.com/all/views/all/). 

In 2010 a Bitcoin was worth £10 UK thus making it feasible to use as an exchange form of currency, but Bitcoin turned into a speculative casino.

Bitcoin, like all computer tokens is subject to software upgrades and changes.

The system can be hacked and has been, it is subject to Meltdown and Spectre threats.

Coins have no stored value like gold or currency.

Regulators and complexity are the greatest opponents, risks and barriers.

Zealots just want to trade it like a commodity, pay no taxes and speculate.


Bitcoin is a Mathematical Puzzle

The aim of Bitcoin — as envisaged by Satoshi Nakamoto, its elusive creator (not identified) — is to provide a way to exchange tokens of value online without having to rely on centralised intermediaries, such as banks. Instead the necessary record-keeping is decentralised into a “blockchain”, an ever-expanding ledger that holds the transaction history of all Bitcoins in circulation, and lives on the thousands of machines on the Bitcoin network. 

But if there is no central authority, who decides which transactions are valid and should be added to the blockchain? 

And how is it possible to ensure that the system cannot be gamed, for example by spending the same Bitcoin twice? The answer is mining. (The Economist, 2015)

Every ten minutes or so mining computers collect a few hundred pending Bitcoin transactions (a “block”) and turn them into a mathematical puzzle. The first miner to find the solution announces it to others on the network. The other miners then check whether the sender of the funds has the right to spend the money, and whether the solution to the puzzle is correct.
If enough of them grant their approval, the block is cryptographically added to the ledger and the miners move on to the next set of transactions (hence the term “blockchain”). 

The miner who found the solution gets 25 Bitcoins as a reward, but only after another 99 blocks have been added to the ledger. All this gives miners an incentive to participate in the system and validate transactions. Forcing miners to solve puzzles in order to add to the ledger provides protection: to double-spend a Bitcoin, digital bank-robbers would need to rewrite the blockchain, and to do that they would have to control more than half of the network’s puzzle-solving capacity. Such a “51% attack” would be prohibitively expensive: Bitcoin miners now have 13,000 times more combined number-crunching power than the world’s 500 biggest supercomputers.

 
numbers-money-calculating-calculation copy.jpg
 

Weaknesses

  • Requires rapid consolidation of transactions.
  • Uses massive amounts of electricity.
  • A Bitcoin miner with 51% of a Blockchain pool could mount an attack.
  • Miners therefore move from one mining pool to another.
  • A government, where electricity is cheap could mount a 51% attack and take all of the Bitcoins.
  • Monopoly fears.
  • It is speculative.
  • Forking.
  • Regulators can impinge upon it, shut down mining centres and also the exchanges that convert it to cash.
  • Competitor coins have emerged  – As at January 2018 there were 1309 crypto coins.

Here is the list of major crypto coins:

https://cryptocoincharts.info/coins/info

Here is the list of exchanges:

https://cryptocoincharts.info/markets/info

Australian cryptocurrency exchange Coinspot has described warnings of liquidity issues due to too many customers cashing out as “absolute rubbish and untrue”. Last month, December 2017, Coinspot announced it was temporarily suspending Australian dollar deposits due to ongoing problems dealing with local banks, sparking outrage among investors.

“The temporary restriction on AUD deposits will remain in effect until at least the first week of the new year,” the company wrote on Facebook. “AUD withdrawals, coin deposits, buy/sell orders and trading on the platform will continue to operate as normal. “We assure you we are just as unhappy with the situation as you but unfortunately Australian banks have been so far unwilling to work with the digital currency industry which leads to frequent account closures and strict limits on accounts whilst they remain operational, in effect debanking our industry.” (Source: news.com Jan 2018).

Bitcoin Crackdown: Swiss bank UBS AG refuses to trade cryptocurrency.

A Major Swiss bank has announced it will not be trading Bitcoin and will not offer the cryptocurrency to retail clients amid speculation increased regulation could spark a "massive" drop in value. (Source: DARIUS MCQUAID).

The European Union will regulate Bitcoin.

Regulatory and Policing: Bitcoin is the currency of choice for criminals, money launderers and terror funding – SILK Road. 


Forking

Forks can occur from two different events. An accidental fork occurs if coin updates are not truly compatible. People using different versions of the software create two different ledgers–one from the older version, and one from the newer version. In this circumstance the coin developer must rapidly eliminate the bugs causing the incompatibilities and decide how to merge the different blockchains.

A hard fork is generated when the cryptocurrency’s developers decide that changes must be made to the programming of the coin that will create incompatibilities between the older and newer version. When the changes are made, all users of that coin must be willing to update all applications to continue to use that coin type correctly.

  • Forks are not accounted for in futures trading: 
  • Futures are predicting price:
  • Coins can be lost in a forking.
  • Compatibility.
  • Stability (blockchain software and systems changes).
  • Limitations in size Bitcoin is 1MG and Bitcoin Cash is 8MG, this is due to speed requirements.
  • Forking may be speculative greed.
  • High transaction cost instability:
    • June 2017 $US5.
    • December: 2017 The cost to complete a Bitcoin transaction has skyrocketed in recent days. A week ago, it cost around $US6 on average to get a transaction accepted by the Bitcoin network. The average fee soared to $US26 on Friday and was still almost $US20 on Sunday.
  • ATO and capital gains.
  • Regulators will remove anonymity and that confronts the fundamental creation of Bitcoin and Blockchain.

The Bitcoin Fork(s) in the Road

 
The Bitcoin Fork(s) in the Road.png
 

Accepting Bitcoin as Payment in Your Business

You cannot do this in Australia currently, but would you want to after reading this?

This section is provided to demonstrate how American businesses accept Bitcoin and what is involved.

A coin exchange such as Coinbase has to be used.

Founded in June of 2012, Coinbase is a digital currency wallet and platform where merchants and consumers can transact with new digital currencies like Bitcoin, Ethereum, and Litecoin, based in San Francisco, California.

They are lobbying Australia’s banks, and politicians, to allow them to operate widely. Banks did make them a client but then suspended their accounts

Users buy cryptocurrencies by connecting their bank account, credit card, or debit card to their Coinbase account and then making a purchase in much the same way someone would buy something on another online store, such as Amazon.

Users can also use Coinbase to sell their cryptocurrency by converting a chosen amount of cryptocoins to U.S. dollars at the current value and transferring it to their connected bank accounts. 

Coinbase also offers a service to businesses to help them accept Bitcoin payments from customers and clients.

Accepting Payment

If it is a physical shop, customers pay using hard-ware terminals, touch screen apps or simple wallet addresses through the QR Codes.

For an online website, accepting Bitcoin should be implemented by a competent programmer and requires a full computer node if transactions are of large value.

Smart Phone or Tablet

Some businesses use a dedicated app or webapp that generates a QR code on the fly including the amount. Many wallets directly support QR code scanning for payment.

Accounting

When a customer makes a payment, a credit is issued to their account. Ideally, in a way that suggests a payment was received. If on the other hand, "discounts" for Bitcoins are offered, the vendor is selling the Bitcoins for currency and then counting that as income. 

Businesses that offer gift cards

Where a business sells gift cards or gift certificates, they find that the easiest way to accept Bitcoin is to accept it only for the purchase of gift cards, and then require the gift cards to be used for actual purchases of goods or services. 

This way, the accounting practices for processing gift cards can be put to use. The accounting for Bitcoins would then be minimised to tracking sales of a single stock item.

This method is ideal for retail food establishments and convenience stores, where the payment of Bitcoins through a mobile phone for a small daily food purchase might be cumbersome or disruptive, especially in front of a line of other customers. Bitcoins in this case would be best used to reload ordinary prepaid cards that can then be swiped at point-of-sale.

Businesses that mail invoices

List Bitcoin as a payment option.  

However, this requires some programming expertise to generate Bitcoin addresses programmatically, with a brand new Bitcoin address for each invoice, and print it on the invoice. 

Customers might wonder how much BTC they should pay in order to satisfy an invoice in full. The invoice suggests an amount.

On the invoice, some businesses allow them to go to a special URL to get the address to make a Bitcoin payment just by typing in their invoice number. This way, they can see the Bitcoin address, copy and paste it directly into their Bitcoin client.

This requires a brand-new address for each invoice whenever possible, and it used only once. This benefits the customer as it removes any ambiguity as to which customer is making which payment and for which invoice.

Fraud

Fraudsters can send counterfeit invoices to your customers and entice them to make a payment to a Bitcoin address they control. 

Businesses never let people try to type Bitcoin addresses off payment stubs - instead, force people to get the full Bitcoin address from the business website via secure SSL. But, still print most of the address on the payment stub (perhaps with four or five characters starred out), so that the customer's need for a paper trail can be satisfied, so they can prove they paid if there is ever a dispute. Merchants can also use the IP address geolocation to understand the close proximity of users. There are automated solutions such as FraudLabs Pro that automate the screening of Bitcoin transactions to determine the risk level.

 
We are accepting Bitcoins.jpeg
 

Setting Prices

When a business accepts Bitcoins for payment, there is the need to convert them to the currencies used for paying suppliers, employees and shareholders. Some merchants set prices based on the current market rate at the time the price quote is presented to the customer.

Bitcoin Prices lists the exchange rate for many currencies on multiple exchanges.

When prices are determined using an automated process, the current market rate can be based on either a current price or on a weighted average basis.

When Bitcoin funds for purchases are received, some merchants instantly exchange those proceeds into the preferred currency used. Hedging for each transaction can nearly entirely eliminate exchange rate risk that the business is exposed to when accepting Bitcoins for payment.

Contract

A sales contract might be used to ensure that specific terms are met to lessen the chances of a misunderstanding. For instance, the party sending payment is responsible for paying any transaction fee. A contract might specify that a transaction fee must be paid and what amount, so as to prevent the situation where the transaction is considered a low priority transaction and thus isn't confirmed quickly.

Other items that might be addressed in a contract:

  • Requirement and handling of escrow through an escrow service.
  • Jurisdiction for disputes.
  • Refund policy (particularly with the exchange rate being volatile).

Paying taxes on Bitcoin income

Bitcoin transactions work very much like cash. Just like Bitcoin, cash is anonymous and doesn't leave a paper trail, yet is widely used in commerce every day.

The US IRS has rules and guidelines on how to value transactions made in foreign currency or "cash equivalents" and is likely to apply those. 

With Bitcoins, there's likely to be some difference between the value of BTC when received as payment, versus when they are exchanged for another currency like USD.

Manual Process

  1. Download a Bitcoin client
  2. When a customer wants to buy something, the merchant sends them a Bitcoin address where their payment should be sent.
    • This is done by clicking "New.." next to your address in the Bitcoin client and sending that address to the customer.
  3. When payment comes in to that address, the goods are sent to the customer. Depending on the value some merchants wait until the payment shows Confirmed.
  4. To issue a refund, the business must obtain from the customer the Bitcoin address where the refund payment should be sent. The refund address will likely be different from the address used when the customer sent payment, especially if an EWallet was used by the customer.

Automated

Pre-generating Bitcoin Addresses

Merchants can accept Bitcoins on their website without needing to use Bitcoin APIs or third party services if the business pre-generates a large number of receiving Bitcoin addresses and stores them in a database on the web server, and dispenses them one-by-one to customers when they are ready to pay. 

The web server never actually handles the Bitcoins - it simply gives out addresses belonging to a wallet you maintain elsewhere. By using a unique address per order, the business accounting officer always know which payment belongs to which order.  

To pre-generate addresses, the business has to use a tool such as Pywallet (which can generate a wallet.dat file) or Bitcoin Address Utility (which can generate a CSV file). In both cases it is generating a list of Bitcoin addresses along with their corresponding private keys. Only the Bitcoin addresses (not the private keys) are loaded on the web server.

When shipping goods manually, some merchants use the Bitcoin software to check for incoming payments, or alternately consider using Block Explorer or Abe to verify payment when goods are about to ship. To make this easy, websites provide a full hyperlink that includes the proper receiving address: http://www.blockexplorer.com/address/ADDRESSGOESHERE.

If the business is delivering digital goods or services and wants to be able to deliver instantly upon payment and/or confirmation, they may use a third-party service such as Bitcoin Notify to tell the business website when a payment has been received. 

This sort of service requires no significant API implementation - they will simply make a POST to the business website or send an e-mail when a payment has been received at one of the business addresses.

Keeping Bitcoins off the web server, ensures the wallet cannot be stolen if the web server experiences a security intrusion. The risk becomes limited to the possibility that a successful intruder could add their own addresses to the address pool and steal funds from a few incoming orders until detected.

Using offchain payment networks

Off chain networks provides various benefits to Bitcoin, such as instant confirmations and protection against double spending.

Using a third-party plugin

Some businesses use a shopping cart interface from a 3rd party to automatically handle all Bitcoin payments on the website. They may create their own utilising the Bitcoin client's JSON-RPC API to automatically accept payments.

  1. When a customer orders something on these internally built websites it records:
    • Bitcoin address that payment should be sent to.
    • Order details (delivery address etc.).
    • Customer's refund address.
    • Payment amount.
  2. When payment arrives, checks that they have paid the correct amount or not, and informs the accountant’s office:
    • Dispatch the goods to the customer and mark the order as fulfilled.
  3. If goods cannot be dispatched the order is marked as denied and refund occurs.
  4. Forwards the funds to bitcoin address of choice.

Businesses that mail invoices

They create automated invoices by using known payment systems supporting invoicing, and recurring invoice setup.

Common Errors

It has been observed on occasion that a business that funnels all its orders through the same Bitcoin address, and asks people to send BTC, then send email describing the timing and the amount of the transaction to 'claim' it. This is not secure, since anyone can see the transaction details using a tool such as Block Explorer, and then try to claim someone else's transaction as theirs.

The merchant has to give each customer a unique Bitcoin address.

(Source: Bitcoin wiki)

 
Common errors
 

Syndicating Real Estate Using Blockchain

Ethereum (another coin) lays the foundation for tokenisation. Tokenisation provides the tools to create new incentive programmes for collecting and syndicating real estate data. First, we can create shared data ecosystems that give firms, brokers and landlords alike the ability to own, maintain and share real estate information safely and securely. Using the blockchain, we can create global listing portals. Next, we can incentivise other participants to contribute local data. 

 
New York Marketplace.png
 

Transactions

Ask a real estate person what kills most deals. Nine times out of ten you’ll get “time” as a response. Time is a bi-product of poor communication. Real estate transactions are complex, with piles of paperwork being passed back and forth. The path of these deliverables often takes circuitous routes. Documents typically range from credit reports, bank statements, insurance estoppals, personal identification, inspection reports, and many other types of sensitive information.
Documents often take several email hops between requestor and requestee before reaching their final destination. It is difficult for transaction participants to accurately track inbound/outbound collection. In addition, disclosing participants information, and careless mistakes made by transaction participants, creates potentially serious data breaches.

Documents often take several email hops between requestor and requestee before reaching their final destination. It is difficult for transaction participants to accurately track inbound/outbound collection. In addition, disclosing participants information, and careless mistakes made by transaction participants, creates potentially serious data breaches.

Ethereum and IPFS provide the tools where participants can upload transaction documents via a smart contract. The documents can be encrypted with a fixed time and duration. The contract produces a private key to the disclosing participant and can be distributed to only those participants that need access. Transaction participants can accurately track which documents have been collected and what data still needs attention. The process will create a transparent layer that securely distributes and tracks sensitive information. In addition to securing the data, the contracts can act as escrow agents for deposits, payments and allowances.

 
Data escrow contract.png
 

Source: Stephen King, The Official Guide to Real Estate and the Blockchain https://medium.com/@MStephenKing/the-official-guide-to-real-estate-and-the-blockchain-dcc3129e690f


 
Kevin Beck 2016 thumb.jpg

Author: Kevin Beck, Associate, nem Australasia

This article is based on research and opinion available in the public domain.