paint-brush
TCP Can Help You Understand Bitcoin Price Changesby@derek7mc
980 reads
980 reads

TCP Can Help You Understand Bitcoin Price Changes

by Derek McDanielDecember 9th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A protocol is a convention for how parts of a network interact. The internet has different <em>layers:</em> there is a physical layer that connects devices, a <a href="https://hackernoon.com/tagged/network" target="_blank">network</a> layer that routes packets, a transport layer that sends and receives packets, and an application layer that processes the information in the packets. Here is an overview:

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - TCP Can Help You Understand Bitcoin Price Changes
Derek McDaniel HackerNoon profile picture

Bitcoin could lose half its price in an instant, but it also stabilizes over time.

What is the TCP Protocol?

A protocol is a convention for how parts of a network interact. The internet has different layers: there is a physical layer that connects devices, a network layer that routes packets, a transport layer that sends and receives packets, and an application layer that processes the information in the packets. Here is an overview:

Internet Layers

  • Physical: Computers, Routers, Switches, Cables, and Modems.
  • Network: Packet Routing, IP.
  • Transport: Packet Ordering, Transmission, and Confirmation. TCP and UDP. Handled by the operating system.
  • Application: How packets are used by programs. Examples: http, ftp, telnet, ssh, etc.

TCP stands for Transmission Control Protocol. TCP specifies how operating systems handle data that programs send or receive over the network. On the sending machine, the OS builds packets and transmits them. On the receiving computer, the OS collects packets, sorts them in proper sequence, combines them in chunks, and gives them to a waiting computer program. The operating systems on the two machines also need to confirm or resend missing packets, and control the rate at which the packets are sent out. If packets are sent out faster than the network can handle them, they get “dropped” and their information is lost! TCP is a mathemagical algorithm that keeps this from happening.

TCP Keeps The Network Regular

TCP is the laxative of the internet. It keeps the connections from getting clogged. Unfortunately, the internet isn’t just a direct connection between two computers. There are a lot of packets traveling at the same time, and a lot of paths they can take through the pipes. If too many packets try to take the same pipe, the pipe gets backed up until it has to drop packets.

Packet Dropping: Let’s just delete cars until they can move freely again.

When a packet get dropped, all the effort that was used to send the packet is wasted. The more effort the network spends on dropped packets, the worse the congestion becomes. A dropped packet just gets sent again, until the user or program gets frustrated and stops trying. The goal is to allow as much traffic as possible, without actually overcrowding the network.

The TCP Bandwidth Algorithm

To keep the internet smooth, TCP sends out packets in groups. The OS waits until it hears that the group got there safely, before it sends out the next group.

The size of these groups is called the Window Size. It’s how many packets can get sent out at once. The total time it takes to send a group and get a confirmation is the RTT: Round Trip Time.

Here is a great article that describes the technical details:

A Very Simple Model For TCP Throughput

The throughput is given by this formula:

Throughput = WindowSize / Round Trip Time

To keep the network unclogged, but still use its full capacity, TCP gradually increases the window size linearly over time, but cuts the window size in half whenever one or more packets is dropped.

Source: A Very Simple Model For TCP Throughput

You can actually see this kind of pattern in your download speeds if you your refresh rate is high enough, and you watch closely. The window size is set for each unique connection, so if you wanted to observe this pattern while torrenting a linux distro, you need to look at your speed from a particular peer:

Watch closely how the connection speed changes over time

Bitcoin’s Price Patterns

Bitcoin’s price doesn’t follow the exact same rules, but you can use the same ideas to analyze what is happening with the price.

Here is a graph of Bitcoin’s price over its history, on a logarithmic scale:

Bitcoin’s Price History on a Logarithmic Scale

The graph on top uses a base 10 logarithmic scale. Each vertical notch represents a 10 fold increase in price. Bitcoin’s price has exploded!

Because bitcoin’s price growth has been so dramatic, without using a logarithmic scale, the graph doesn’t really show anything, all the older history gets dwarfed by the current price level, and you only see a flat line on bottom, and a vertical line on the right. Logarithmic scales present geometric relationships, that are especially insightful with processes that have exponential growth.

Bitcoin’s price seems to do the exact opposite of TCP’s window sizes: the price increases rapidly, and then adjust gradually downward, in a “trough”, until it starts increasing again. There are three major peaks in bitcoin’s price history, and also several smaller peaks in between those showing a similar pattern. Again, this is a logarithmic scale, so what appear to be modest decreases, can potentially be a reduction in half or more.

Bitcoin has the potential to be at the center of a financial revolution and a political evolution. The price trends we see are not only random speculation, even though there is a LOT of speculation involved. As the cryptocurrency community builds itself, the financial community invests more and more in bitcoin and cryptocurrency as an important financial paradigm of the future. It’s important to consider that this is bitcoin’s price in US fiat, so that price relationship is influenced by those who have a lot of fiat money, or financial influence.

Like TCP, bitcoin’s price involves peers in a network negotiating rules and expectations involving a limited resource. The success of both depends on our ability to stabilize and work together harmoniously. I hope to see the bitcoin community adopt socially conscious habits for how it prices, buys, sells, mines, and charges fees. Profit may be the primary motivator, but the community needs to learn how to collaborate fairly and effectively while seeking profit, if it wants long term success.

Cryptocurrency investors need to make cryptocurrency a practical and beneficial tool for society. Potentially, these tools can allow us to improve our accounting relationships, and better achieve our goals as a society.