Bitcoin and blockchain. How does it work?

Blockchain is a chain of discrete blocks containing information and organized chronologically. Each block consists of a string of 0 and 1 (binary code). The string can be a number, an email address or a bank account. So, when you start adding these discrete blocs, you get a list. These blocks are interconnected with each other with what is called cryptographic hash. By design, block chain is “unhackable” because the data contained cannot be modified. Once the data has been recorded, it is not possible to change it retroactively without modifying the following blocks, making the network collapse. This makes blockchain suitable to track important data that cannot be temper450_1000ed with after it has been recorded like votes or money transfers.

In 2008 Satoshi Nakamoto presented his idea to create a currency that would not be physical, but digital, based on bits. Hence, Bitcoin.

When you pay digitally, in PayPal for example, your bank verifies that in your account there is the needed money to make the payment. Therefore, we depend 100% from these banks. Another concern with common payment method is privacy. When paying online with you credit card, you need to state your name to be able to make the payment, unlike with cash.

Bitcoin works peer to peer (P2P), like common torrents. When you download a movie from Pirate Bay (do not do that, it is illegal), the movie is not stored in a central server, but spread around different computers. When you have your torrenting program open, you allow other downloaders to get access to the movie and download it. This way, you do not depend on a single server but you rely on a group of computers. This increases the reliability of the system, as it is very unlikely that all of the computers will fall off the internet at the same time.

To keep track of the amount of Bitcoin that everybody has, there would be a need for a master record that intakes each transaction made by each person since the beginning. This record would be public, allowing users to track each bitcoin. Users could see through which accounts a bitcoin has gone through. The anonymity is kept intact as we do not know who the bitcoin belongs to. This universal record is called Blockchain.

Blockchain is a sequence of blocks that make reference to the last block and to the next. It is distributed globally, making it secure and public. It is nearly impossible to modify passed records and as long as there are users, the blockchain is kept safe. Each block contains transactions and they are created by the community. Each user can add blocks to the Blockchain, documenting each transaction. These members of the community are called miners. When a miner verifies a transaction, he sends it to the rest of the miners, so they can verify it and add it to the chain. This way, it gets decentralized.

Bitcoin is based in a number of rules.

  1. Blocks are made of text. The text consists of the information of the transaction. Party A sent X amount of money to Party C. Party A lost X. Party C won X.
  2. Each block is about 1MB in size and it will consist of as many transactions as fit in it. Approximately 2000 to 2200.
  3. Each 10 min a new block will be created, so the blockchain will increase by one block each minute. This will also put a cap in the amount of transactions per unit of time. 2000 to 2200 per 10min. 3-4 transactions per second. This is not even close to the amount needed to support a financial system, which is a bit cap limiting the potential of Blockchain.
  4. The miner who creates the block, will get a reward for doing so. The first block to be created rewarded 50 bitcoins to its miner, and every 210 thousand blocks, the number would divide itself by 2. Currently, you get rewarded 12 bitcoins for each block. This generates competition to mine blocks.
  5. From each block, a hash will be generated. A hash uses some data to create a unique identifier. You can generate one here. They have the curious property that if you know the algorithm that generated it, you can, knowing the initial text, generate the hash again. On the other hand, knowing the hash, it is very difficult to work backwards and find the text that generated it.
  6. Each block contains the hash from the previous block, the date and time of creation, the transaction of compensation to the miner that created it and all the transactions that fit in it to complete one megabyte. On top of this information, it will also contain a mysterious data that I will talk about later.

If we go to here we can see all the information about the block, with all the transactions that are included in it. On the right, we can also see the previous and next block. This little detail makes blockchain practically impossible to hack.

 Because of the characteristics of blockchain, each time a new block is created, it gets checked by other miners and added into the chain. In this case, if someone wanted to add a block with double spending for example, other miners would detect it and not accept the block into the chain. The only way to do this would require the hacker to get in control of more than 50% of the mining computers, in which case he would be able to add and delete blocks however he wanted to. A way of doing this would be spreading a virus around computers to make them mine in a fraudulent way. So, in theory, blockchains are hackable, but practically impossible. There have been reports of viruses spreading around the network that “steal” computing power from the infected computers. Then, hackers would use that power to mine more bitcoins.

Satoshi also thought of this and based his solution in the proof of work protocol (POW) The original paper can be found here. This idea was developed to avoid spam. Let us see an example.

Sending mails is very cheap. You just need a sender, receiver and your content, which is text. It does not require lots of data, and so the temptation to send thousands and thousands of mails as spam is big. Therefore, in the 90´s, the POW was developed. This was a series of complicated mathematical calculations that the server asks the sending computer to solve, forcing the computer to consume more resources and making sending huge amounts of spam not viable. POW had some problems when being implemented in mail servers, but as an idea it was very interesting.

 Satoshi knew about POW and so, he decided to implement it in blockchain. By making a rule that the hashes have to have a certain and variable number of 0`s at the start, the only way left to guess the hash is to make multiple tryies until the hash has that needed ammount of 0’s at the start. This avoids the hashes from being completely random, and hard to create. As the blockchain develops, the amount of 0`s increase, making the process longer and more costy. Creating fraudulent hashes is so power and hardware consuming that it becomes inefficient. The amount of 0’s at the start of the hash is defined as “difficulty”. It has been statistically designed so that it takes 10min to create a block. Each 2016 blocks, the difficulty is checked to see if it needs to be increased or decreased. The process of finding a valid hash is referred as mining. Each miner, when he/she finds a valid hash, is rewarded with bitcoins. This is how new bitcoin are created.

Applications

 The use of bitcoin gives the seller and buyer complete anonymity. Thus, bitcoin started to be used in black markets like The Silk Road in the dark net (this site does not exist anymore, although there are someproxies). Even though the accounts where bitcoins and other cryptocurrencies are deposited are anonymous, the tracking of a bitcoin is very easy to do. At all times, each bitcoin can be traced back and see what accounts it has been deposited in. Therefore, a very logical application would be asset management. Traditionally, trade processes have been expensive, especially cross-border. With smart contracts, like the ones presented by the creator of Ethereum, would make the whole process easier and more transparent.

With these smart contracts, where property is defined digitally, smart loans can then be put in place. People with poor credit ratings could use these contracts to receive liquidity in form of a digital currency, and in exchange, post their property as collateral. There is not a big company that has yet found a big market share, but as the technology keeps developing, more news will follow.

Advertisements

Djibouti, the African Singapore?

Since 1977, Djibouti enjoys independence from France in one of the most important territories of the Horn of Africa. In 1994, the country broke into a civil war that lasted 2 years between the People’s Progress Assembly (in government) and the Front for the Restoration of Unity and Democracy (FRUD). The conflict reached an end when the main faction of FRUD signed an agreement to share power, even though the more radical factions of FRUD continued fighting until 2000 when a final agreement is reached. Some ministerial posts were assigned amid this agreement.

In 2003 the People’s Rally for Progress* (RPP in French) joined forces with FRUD under a coalition called Union for the Presidential Majority. UMP elecCaptura de pantalla 2018-04-10 a las 16.07.24ted as their leader Ismaïl Omar Guelleh (previous leader of the RPP) for the parliamentary elections of 2003 and 2005 presidential elections. Not so surprisingly, they won all the parliamentary seats and Guellehwon the presidentialelections with 100% of votes in favor (the opposition did not present any candidate as a boycott). Guelleh had served as president from 1999 on. The Djiboutian constitution limits each president to 2 terms so a change in the constitution was implemented to abolish the limitation. In April 2016, Guelleh started his fourth term as the president of Djibouti.

In general Djibouti can be spoken of as a certainly calm country, especially when compared to its neighbors. In the south it has Somalia, in the west it shares its border with Ethiopia and in the north the Al-Qaeda supporting Eritrea is located. Djibouti is home to Camp Lemonnier (the only permanent U.S. military base in Africa) as well as French, Japanese, Italian and Chinese troops. Saudi Arabia and UAE have also been showing interest in positioning their troops in the third smallest country on the continent’s mainland. This great presence of foreign military forces in its territory has helped the local economy immensely providing safety to commerce as well as need for local services.

Djibouti owes its existence to three big causes. Due to its strategic place, nearly all the cargo shipments that wish to sail through the Suez Canal need to pass by Djibouti, converting it into an international hub.

Due to the first reason, the political situation in the Horn of Africa and the attacks of 9/11 in New York City, a second source of growth arrived. After the twin towers fell, United States created a special Task Force meant to be deployed in the Horn of Africa, in Camp Lemonnier. Other countries followed. Djibouti is the base from where drone and manned operations are conducted against pirates and Al-Qaeda factions present in the area and close countries likeYemen.

As a third catalyst of change in the small country was war. When in 1998 conflict between the independence seeking Eritrea and Ethiopia broke, the latter channeled all its trade through Djibouti instead of Eritrea, which would have been a more logical hub to go to. This brought a large economic impact. In the year 98, the pass of Ethiopian cargo through Djibouti quadrupled. The Ethiopian economy has also been enjoying a steady 10% increase of gross domestic product annually[1] in the last few years, further helping Djibouti. Despite the growth of the neighboring country, Djibouti has relied more on the gulf countries to expand its harbors and other infrastructures to meet demands from new and more important clients like China. Specially Dubai, through the state-own company called Dubai Ports World (DPW, owned by the holding company Dubai World and chaired by Sultan Ahmed bin Sulayem). DPW entered a $400 million harbor upgrade[2]  in Doraleh in 2009. Dubai sought with this move to confront the competition posed by Oman’s renewal of their main harbor in 1998. Djibouti Free Zones and Port Authority (DFZPA) owns two thirds of the endeavor. The remaining part belongs to DPW.

Despite all the different countries involved in Djibouti, Ethiopia remains the single most important user of Doraleh’s and other close cities’ harbors. Thus, in 2011, Djibouti and Ethiopia engaged in a project to modernize the railway connections between the two neighboring countries. The project was given to China Railway Group and China Civil Engineering Construction Corporation (CCECC). The total investment was $4 billion[3]. The lines in the Ethiopian side of the border would take 85% of the total costs, partially financed by the China Exim Bank (70%) and the local government (30%). This project would connect Addis Abeba (capital of the western country) with the smaller Djibouti and make connections between the coast and the capital faster.

Together with this railroad venture, Djibouti connected to the Ethiopian electrical grid** to import energy that same year. The transfer of electricity summed up to approximately 60MW. This lowered costs to businesses and private users.

Opportunities in Energy

Energy production and distribution in Djibouti is very poor. With transmission losses as high as 16%, there is a great deal of opportunities to increase performance in such an essential part of the economy. With the construction of a morereliable and efficient grid there would also be an increase in other fields of the economy, such as the manufacturing sector (it only accounts around 20% of the GDP. In 2013, the World Bank’s Djibouti Enterprise Survey showed that approximately half of companies in Djibouti claim access to electricity to be their main obstacle. This study also showed that 25% of the costs of a business comes from the electricity bill).

Currently, heavy reliance on fossil-fuel production, mostly imported from the gulf countries, keeps Djibouti exposed to price volatility. In 2014, Djibouti launched its long-term plan, called “Vision 2035”. This plan aims to direct the country towards renewable resources. By 2020 they want to have moved from 100% fossil sourced to 100% renewable. The sources would be mainly solar, geothermal and wind, but also imported energy from Ethiopia, whose production is based on hydropower.

Captura de pantalla 2018-04-10 a las 19.43.13

Djibouti has tremendous solar energy potential. Areas of the world famous for their solar energy production like Germany or Phoenix, Arizona have a Global Horizontal Irradiance (GHI) of 3.5kWh/m2/day and 5.7 kWh/m2/day respectively. In Djibouti it varies depending of the area between 4.5-7.3kWh/m2/day.

Studies show that Djibouti has also great opportunities for wind energy to be transformed into electricity. There are no on-grid wind power plants. However, studies show that there are areas of the national territory with potential. In the area of Goubet, analysis show that a grid-connected production plant could be installed. In the study a hypothetical plant was used that had a reference capacity of 20MW and a cost of $2500/kW. The project would have a payback period of approximately 10,7 years and an operation time of 20 years. Of course, the feed in price would ultimately determine the viability of the project. Here is a graph developed by the International Renewable Energy Agency (IRENA) showing the selling price, payback period and the revenue:

 

Captura de pantalla 2018-04-10 a las 20.16.41

 

Once the energy producing industry reaches a certain level of development, new opportunities will appear in the transmission sector. Djibouti is located in Africa and very close to the Arabian Peninsula. With a modern and efficient grid, energy produced from renewable resources could help Djibouti become a place from which to transmit energy towards the members of the Gulf Cooperation Council (GCC is formed by: Bahrein, Kuwait, Oman, Qatar, Saudi Arabia and UAE). CO2 emissions in countries members of this coalition are of increasing concern and so both parties would be interested in the deal (GCC to reduce CO2 emissions and Djibouti as an energy exporter).

Renewable energy present a lack of reliability. You cannot make the sun shine or the wind blow on demand. In the case of Djibouti this can be solved with a good connection infrastructure to the Ethiopian grid. The neighbor country has a network of production plants much larger than Djibouti, based in hydropower, which is a constant source. Djibouti energy consumption would represent 4,6% of the Ethiopian consumption. Each country consumes 0.376 billion kWh and 8.14 billion kWh[4] respectively so there would not be a problem to incorporate Djibouti into the Ethiopian grid.

The main challenges facing investments in the energy sector in Djibouti are the import tariffs (There is no local manufacturing industry, so all the technology needs to be imported) and the 33% VAT. Also, the lack of regulation and the levels of judicial security have been of great concern to international investors. (This fear was increased by the conflict between DPW and DFZPA. The dispute was over a deal in which allegedly DPW had not respected the sovereignty of Djibouti[5]). To promote private investments, authorities (Electricité de Djibouti,EDD, http://www.edd.dj/) liberalized the sector in May 2015. EDD kept distribution and transport, but the new law allowed private enterprises to generate power. This law included some tax exemptions for renewable energy producers. The strong will showed by politicians and a stronger legal framework can lure international capital to invest in the small countries. Work has been done, but there is still lots to be done.

Manufacturing and international Hub

Currently there are a few investment projects going on together with “Vision 2035” aiming to make Djibouti a world business center. Currently the economy is based on providing services for the transport industry. There is no local agriculture and most of the food is imported from neighbor countries.

On average, each day 45 cargo ships cross the Suez Canal. These ships connect Europe, Far East, the Horn of Africa and the Persian Gulf together. 60% of the port usage consists in cargo vessels, and fossil fuels amount to 16% of the usage[6]. This strategical position has given Djibouti the reputation as the bunkering and transshipment service hub. Djibouti is currently building new Liquid Natural Gas (LNG) and oil terminals to further increase their role as a refueling center for both commercial and military vessels.

As a transshipment provider, the coastal country is in charge of receiving cargo from one ship, storing it until another ship with the right destination arrives and gets the cargo. This is the kind of service the Singapore harbor also provides.

The strategical position has attracted foreign investment to develop further the current infrastructure to make it more modern and efficient, even though great inefficiencies are still present.

As an example of the inefficiencies happening in the port, the case of Ethiopia in July 2016 can be shown. During that time, the landlocked country was suffering one of its biggest drought in decades and was forced to seek international cooperation for the import of wheat (Ethiopia is the biggest wheat consumer of Africa). All this help was sent to Djibouti, meaning that extra ships where coming to the already busy port. By the middle of July, 33 ships were waiting at anchorage and 12 were expected to unload 470 thousand tons of wheat.  Some ships that arrived in February, were not released until May according to African Business Magazine. On top of this problem, a bottleneck is created because just under half of the roads in Djibouti are paved, making the transportation of goods and foreign aid to Ethiopia slower.

To deal with the infrastructure shortage, the local authorities have struck deals with different private and state-owned companies from other countries like China or UAE.

The widely talked “Belt and Road Initiative” developed by China arrived in Djibouti in 2016. The Djibouti Silk Road Station is part of the “One Belt and One Road” initiative launched by President Xi in 2013. This project will connect the small country with the main industrial cities in China. The agreement signed between the DFZPA and the Silk Road E-Merchant Information Technology Co. Ltd stipulates the setting of a currency clearing system using Gobebill Payment’s services, establishing a transit trade center, export processing zone, free trade zone and a commodity collecting and distributing center. Not agreed but envisioned projects also include building an extensive data cloud computing platform and congress center. In 2015, Djibutian port authorities signed an agreement with China Merchant Group to build the Free Trade Zone (aprox 48km2).

This new Free Trade Zone is expected to create 340,000 people indirect and indirect jobs in the next 10 years according to the Oxford Business Group and is expected to handle $7 billion in trade within two years. The area will feature manufacturing, transport, electronic trade and regional distribution businesses. This will help to industrialize the country.

After analyzing the country and its future I reach two conclusions. First of all, this small country has lots of potential. It has the capability to become a trade and financial hub, like for example Singapore. It is not unknown the story of success that surrounds the Asian country and how it transformed itself from a fishing town into one of the main financial and commerce capitals of the world. Thanks to free trade, easiness to invest, its strategic position and the strong legal framework, outside money flowed into Singapore to make it into what it is known for now a day. Djibouti needs to strengthen its regulatory system and its implementation to reach a similar growth like Singapore enjoyed.

Nevertheless, Djibouti still presents a very low proportion of skilled labor and so it will present a liability into the development of local businesses. Only the Free Trade Zone is going to demand approximately 34000 skilled labor a year, and the local government has not been taking big action to solve this deficiency. The dependency of the country from Chinese money is also worrying, as the Asian giant’s account are not known for their transparency. Nobody knows what the numbers really look like. Their economy is based in a huge bubble of debt, and its uncertain if it is going to go burst. In case the projects were left without finishing them because of a recession in China, this would real affect the local economy. Despite this fact, the commitment of the investors looks serious and the amount of completed projects is already important.

In the end, the destiny of the Djibouti lays on the hands of the territorial government and their attitude to push forward the needed political agenda and reforms to reach this goal and become the African Singapore. The country is in an embryonic state for investment and even though the outlook is good, without the political will all this potential can be lost.

Hugo Casao

@CasaoHugo

 

[1] https://tradingeconomics.com/ethiopia/gdp-growth-annual

[2]  Djibouti: Changing Influence in the Horn’s Strategic Hub, Chatham House, April 2013

[3] https://www.railway-technology.com/projects/ethiopia-djibouti-railway-line-modernisation/

[4] https://www.worlddata.info

[5] More information found in https://www.fairobserver.com/region/africa/djibouti-china-us-investment-development-africa-news-54311/

[6] https://www.fleetmon.com/ports/djibouti_djjib_1278/