Browsing Tag



The Bitcoin Lightning Network

The bitcoin lightning network is a p2p network built on top of and uses the bitcoin blockchain. In order to use it you need to download and install some new software. It aims to solve the 7 transactions per second issue which, if bitcoin were to become mainstream, would never happen due to it’s low throughput rate. Theoretically the lightning network can handle millions of transactions per second. Compare that to the Visa network, which only handles 45,000 per second.

The topology of the network begins with “layer 1” – that is, the Bitcoin network itself. The blockchain has a 1 megabyte cap to prevent spam transactions from clogging the network and bogging down the ability to transmit blocks to other listening bitcoin nodes. If Bitcoin is to be all-inclusive to everyone in the world, it must be usable and work on poor internet connections. The 1 mb blocksize helps us achieve that. To scale, there must be a layer 2, and one implementation of that is the lightning network.

Layer 2 promises to lift that 7 tps restriction by keeping a “record” of transactions between the two individuals using smart contracts. The two lightning clients can end their open connection with each other at any time and only need to tell layer 1 of the ending balance between the two parties, regardless of how many times they have swapped bitcoin back and forth. Much like how bitcoin uses public/private keys to secure addresses the lightning nodes use multi-signature addresses to secure the escrow of coins locked between the two parties. If one party wants to stop, both parties settle instantly.

A lightning node can connect to multiple individual nodes at the same time. This fact opens the door for not just transferring value between two people, but if you were connected to your friend John, and John was connected to a Starbucks node – then you can buy coffee through John without needing to open a channel (a channel is what we call a connection) directly with Starbucks.

The lightning network is still in it’s infancy, with 3,000 nodes and 8,000 open channels but it is an exciting time for the bitcoin space. Anyone can open a lightning node and connect with someone. Much like layer 1, layer 2’s goals as always is to be open, censorship-resistant, and permissionless.


What Is A Blockchain?

Since about the year 2000 there’s been an array of buzzwords and catchphrases used in the technology industry in order to raise money from people for the purpose of investing into their startup. “The Cloud”, “Disrupt” (as long as it doesn’t affect the Old Guard), “Web 2.0”, and most recently, “Blockchain”, have all been used to secure funding and make others around you feel like you all know what you’re talking about. So what is a blockchain? Why would someone need it? Can you have “blockchain” without “Bitcoin”? Is it really this magical one-stop shop solution that is going to save your startup from failing? You might be able to secure some money from gullible investors, but it isn’t going to propel you any further ahead than if you used a traditional database.

In computer science, a linked list is a linear collection of data elements, whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequence.

Replace the above quote’s “linked list” with “blockchain” and you’ve nailed 90% of what a blockchain is. The remaining 10% are some special characteristics that puts the word “chain” in “blockchain”. Blocks consist of (rudimentarily) a header and the body data. The header that’s stored in the individual blocks reference the block immediately behind it, and is tied together using hashes.  In this manner a hash is used to secure the order in which the blocks are set, which is important because the body data of the block contains all of the transactions from the different addresses. It would pose a problem if blocks were not in order because the transactions wouldn’t be in the correct place for when the value was transferred. If some nefarious individual were to try to change a block from the past, perhaps to try to steal coins from another address, it would change the hashes of every single block after that affected block, thereby breaking the chain. The attacker would tell his node that his hacked blockchain is the correct one, which is all well and good for him, but he then needs to convince the rest of the bitcoin network – and that will not work. They ignore his chain. So what is a blockchain? It’s a data structure which locks nodes in a particular order. While normal linked lists can be modified in the middle of the chain, a blockchain’s data is secured by the network of self-governing bitcoin nodes and the hashes found in the header of each individual block.

An individual or company might want a blockchain if and only if there’s two cases they’re trying to achieve. The first is if they’re worried about the integrity of the data they’re storing. The second and most important is if they’re exposing that data to a network of individuals that may have the ability to modify or add to that data. A blockchain ensures that everyone in the network is working on the same dataset and is desired to preserve decentralization of the data. Instead of having a central server which can be taken down by state actors one would decentralize by using a blockchain to prevent that from happening. The Pirate Bay is a  great use-case example of a centralized service that has changed their business model and became decentralized. I won’t detail it out here but you can read more about what it means for them to be decentralized here.

Pundits in the FinTech sphere dislike the word Bitcoin but love the word Blockchain. It’s the next big thing, according to them. To have a blockchain but without some sort of financial-incentivized token behind it makes for an inefficient database that would be better served as a centralized MySQL database. Services these individuals are trying to build could very well be suited for a blockchain, but to try to reinvent the wheel, especially a wheel that’s been around since 2009 and has better security than almost all Fortune 500 companies is not only shortsighted but a clear money grab attempt. Nobody will voluntarily waste electricity to help you secure your over-engineered blockchain without some sort of reward, which in the case of Bitcoin are the bitcoins themselves.


Can Bitcoin Be Hacked

Whenever there’s an exchange that’s lost bitcoin or some other cryptocurrency the media always has a sensational headline that reads something like “Bitcoin Hacked”. The truth is of course that Bitcoin itself as the protocol has never been hacked, only exchanges with poor website best practices, weak API security, and/or bad internal processes are the ones that were hacked. Bitcoin has been running with four 9 uptime (99.99%) since 2009 and yes while it’s had problems with it’s protocol early on the fact is if a hacker wanted to transfer your bitcoin to her address it would be impossible without knowing your private key.

To lay the groundwork for this discussion it’s important to know what hacking is since knowing the meaning and ways to hack something will help you visualize it’s impossibility of doing it to Bitcoin. When some entity from their computer wants to steal cryptocurrency from another entity, whether that’s you as an individual, an entire exchange, or Bitcoin itself there has to be an attack vector. The hacker will choose the easiest attack vector there is in order to steal. As an individual, unless you’ve posted sensitive information online (like your private key or seed words) you’re not very easy to hack. Clicking on nefarious links or downloading and running malware creates this easy attack vector on you. An exchange is much easier to try to hack since it’s always online and the hacker knows that there’s bitcoin inside for the taking.

They go about hacking an exchange by looking for holes. There’s articles all the time that’s being published about entire company’s user databases being leaked, and this is just plain sloppiness from these large companies. No encryption, no security, and lax processes cause these things to happen. Once a hacker has gotten their hands on this sensitive information they can log in and transfer your (and everyone else’s) bitcoin out of the exchange and into their own address, then we read more headlines of “Bitcoin Hacked!”

If Bitcoin were hackable it would have happened already. You’d log into your personal account and see a balance of 0.

There’s a 100 billion dollar market ready to be in another person’s hands and all of the information is freely visible for the hacker to see on the blockchain but it hasn’t happened yet. No one has hacked a single satoshi. If it were to happen the value of any cryptocurrency would immediately fall to $0 because there’d be no value there. Bitcoin solves the double spending problem of digital assets, but the problem would not be solved if Bitcoin were hackable.

To put this idea into perspective about how impossible this is, we need to know what bitcoin’s encryption is. Human brains can only imagine numbers to a certain level. You can easily visualize 10 items, you have a pretty good idea of how much 100 items is. Depending on the size of the object, the human brain can hazily recognize what 1,000 marbles looks like in a jar. When it comes to millions of things however, we tend to fail pretty dramatically at it. When it comes to “cracking” a bitcoin key, we’re talking about numbers that exceed the number of atoms in the universe. If you can imagine the singular grains of sand of all the beaches in the entire world, the key-space of a possible bitcoin key exceeds that number.

Mathematicians have calculated the probability of cracking a 256 bit key (SHA-256 which is what Bitcoin uses), and even using the most powerful supercomputers in the world, that it would take longer than the heat death of the universe to find even 1 key. The key-space for a private key is 2160 which is an unfathomably large number. This kind of encryption is used by the NSA and SSL certificates of servers to protect sensitive information between two parties. It should stand to reason that the next time you read an article titled “Bitcoin Hacked” you should think twice about what that means.


History Of Money

The history of money, at least from an ancient times and United States perspective, is an interesting one. This article is just going to be a collection of videos and articles that dispel myths about what the US dollar represents. Other authors have described this very well and I’m not going to re-hash what has already been said.


How Does Bitcoin Work?

How does bitcoin work? This article will talk about that very simply and not go into great detail so as to not confuse anyone that may be 100% new. There are a couple of players in the Bitcoin ecosystem that allow individuals to send bitcoin to one another, and they are miners and nodes (those articles go into greater depth about what they are). Without one or the other the entire Bitcoin system would grind to a halt, and no one would be able to send the currency to each other.

Mining bitcoin

Almost every depiction of Bitcoin mining in the media shows an infographic with a pick axe and computer that hacks away at a rock to generate coins. It’s simple to visualize but doesn’t really represent what’s actually happening. Anyone can mine bitcoin by downloading software and running it on their computer. When running this software, your computer is using it’s processing power (electricity) to execute a mathematical function in a lottery to find a special string of characters. The mathematical function is very fast and easy to do, and is called “hashing”.

A bunch of random data is gathered together and hashed millions of times until one person finds the lucky string of characters. If the miner wins this lottery, it stops hashing and takes the random data it used during the hashing and broadcasts it to the Bitcoin nodes in the network for validation that it actually found a real block.

Bitcoin nodes

Bitcoin nodes are the backbone of the network because they actually are the ones that hold the Bitcoin blockchain in their memory and enforce the block validation from miners. Again, just like miners, the Bitcoin node is a piece of software that anyone can download and run on their computer.  There are over 100,000 people running a Bitcoin node currently. It downloads the blockchain from others in the network and validates the blocks in the chain automatically. The size of the blockchain is hundreds of gigabytes in size currently and grows every time a new block is found and added to the chain by about 1 megabyte every ten minutes.

The Bitcoin node will receive new blocks from miners and check their validity using the randomized data that was sent to it from the lucky miner. The node confirms the block’s validity using the same rules the miner used to find the block, so there’s no cheating. The node will add the new block to the end of the blockchain and award the Bitcoin address with new, freshly minted bitcoins out of thin air as a reward for finding a block. The node will then let the other nodes in the network of the new block so the other nodes can verify it’s a real block for themselves, and then add it to the end of their own copy of the blockchain. The node will also let the other miners know they were out of luck and should start working on a new block.

Bitcoin blocks

Bitcoin blocks are the pieces of the chain within the blockchain. They themselves represent a collection of payments from one user to another user’s address, and is why it takes 10 minutes to get 1 confirmation: A Bitcoin miner selects a bunch of payments to include in a block as a part of their hashing data then gets to work. Once found, it is broadcast to any Bitcoin node along with the miner’s Bitcoin address (so the node knows what address to award the coins to) and then works on the next block.


This was a very top level “How does Bitcoin work?” breakdown. We learned how miners and nodes interact with other in a broad sense, and with this knowledge you now should understand how the system behaves without too much technical know-how.





What Is A Bitcoin Address?

In order to receive money in a peer-to-peer transfer some sort of public information needs to be provided to the sending party to know where to send the money to. A bitcoin address can be thought of as a bank account number that corresponds to your bank. Someone can take that address and send bitcoin to you.

The address actually consists of two parts, a private key and a public key. The public key is derived from a private key by some simple math and can be sent to anyone in the world with the knowledge that giving someone the public key will still keep your funds safe. Every bitcoin wallet software protects you from exposing the private key, but if you need it normally there are commands to display it but this is not advised. It should be noted that anyone can see the balance and history of your transactions if they have the public key.

An example of a bitcoin address public key is 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX and it normally starts with either a 1 or a 3. More secure and advanced wallets will generate new keys for you after every transaction, and is advised since reusing an old address is not best practice for anonymity. The bitcoins that are sent to this address are not actually on the address itself. Rather, the ledger (or blockchain) states that your address contains X bitcoin, and until you move it, that address will always have that value. You can actually memorize a private key (or “seed words” that generate all of your private keys) and cross borders with millions of dollars in your head and no one would know. Once you get to another secure computer, you can jot down your memory and the advanced wallet will populate all of your keys again and your money is right there for you.

Anyone with the corresponding public key can combine a message, a putative digital signature on it, and the known public key to verify whether the signature was valid, i.e. made by the owner of the corresponding private key.

The concept of a public and private key goes way back into the 1970s but was officially named in 1997. In Bitcoin, to transfer funds from your bitcoin address to someone else’s, your wallet software will generate a signed message using your private key and their public key. The message contains pertinent information including the amount to send, and other parameters not covered here. When the wallet software broadcasts the transaction to the network and is mined, the signature is validated using your public key. Only someone with a corresponding private key will be able to create valid signatures. If it’s valid we can assume that it was you that sent the money. If a hacker has access to your machine and is able to send money the system doesn’t know that it wasn’t you, and you’re out of luck. The coins are gone forever and the transaction is irreversible.

The fact the transaction is irreversible might make some people uneasy, but it’s this very nature that gives Bitcoin it’s greatest strength: it is an immutable and censorship-resistant asset where you can not be told who you can and can not send money to. There are no blacklists in bitcoin. Bitcoin does not care about trade embargoes or FATF blacklists. It is a truly open currency that is 100% inclusive to everyone in the world.


What Are Bitcoin Nodes?

There’s a lot of moving parts in the Bitcoin network, and bitcoin nodes are a huge piece of that machine. Anyone and everyone can download and run a node on their home computer. Almost all nodes come with built-in wallets as well, which is nice but is not necessary to run a full bitcoin node. By running a node you are helping to secure the entire Bitcoin blockchain. You are providing a service to other nodes and helping to create a more secure and decentralized Bitcoin network.

Bitcoin nodes house the blockchain on the user’s computer. When a miner finds a block they tell a node that they’ve found one and to award their bitcoin address with some new bitcoins. If the node determines that the block was valid – that is, the signature in the block not only matches the previous block’s header (thereby growing the “chain”), but the correct number of 0’s were found in the hash of the block – then the node gives the miner a thumbs-up by way of giving the provided bitcoin address new coins for them to spend, and grows the block by 1.

Running your own full node is the only way to have full control and to ensure that all the rules of Bitcoin are being followed. Nodes do this by rejecting blocks that don’t follow the consensus rules and by rejecting connections from peers that send them.

At the same time, the validating node broadcasts this block to all of it’s listening peers. These peers download the block to their version of the blockchain, then broadcasts that same block to all of their peers, and so on. In this way the nodes communicate with each other much like a torrent program downloads music or other media from it’s peers.

Being gatekeepers of the blockchain, the nodes also have to have protocols that automatically deal with bad actors. From fake blocks to DoS attacks the bitcoin nodes need to handle these situations to keep the Bitcoin network at the constants 99.9999% uptime it’s grown to be accustomed to. There are internal blacklists that prevent repeated attempts to ping the node. Miners or individuals that manually send fake blocks to the node need to have that node validated – if it’s not valid, the block is simply ignored.

If you’re interested in helping the network grow and stay secure, consider running a full Bitcoin node. You can do so by downloading and running the Bitcoin Core software.


What Is Bitcoin Mining?

If you’ve ever seen a news piece covering Bitcoin what you’re most likely seeing is just one side of it, and that’s bitcoin mining. You’re usually shown pictures of massive warehouses showing hundreds of pieces of equipment that is very loud and has cables running everywhere, or a very simplistic picture of a pickaxe hitting a rock and bitcoins flying out of it. This article covers what those pieces of machinery are actually doing, how mining works, and where it fits in the Bitcoin protocol.

What Is Bitcoin Mining

Bitcoin mining is the act of using computer processing power to execute a special formula that calculates a number. The special formula is called a hashing function. The hashing function that Bitcoin uses is called SHA256, and it takes any kind of text as input and results in a hash. Here’s an example:

SHA256("This is a test") = c7be1ed902fb8dd4d48997c6452f5d7e509fbcdbe2808b16bcf4edce4c07d14e

Miners use their computers to first collect the transactions they’re going to include in the block, the header from the previous block (to preserve the connection of the blocks in the blockchain), and a random piece of text called a “nonce” all in a text value. They then hash the entire thing in SHA256 and look at the result value. If the value falls within the network’s limits of being a valid block, the miner submits that found block to the network for bitcoin nodes to validate as true. The special value the network is looking for is any text value that has minimum number of zeros in the hashed value. Here’s an example of that number from block id 540677:


Currently, a successful hash must start with approximately 17 zeros, so only one out of 1.4×1020 hashes will be successful. In other words, finding a successful hash is harder than finding a particular grain of sand out of all the grains of sand on Earth.

These zeros in front help ensure blocks are found about every ten minutes, and the network increases or decreases the number of zeros needed depending on how many people are trying to mine for bitcoin. When a miner finds a block they are awarded new bitcoins and any fees that were present on the transactions that they decided to include in the block. As such, miners will include transactions in the order of highest fee to lowest fee in order to gain the most money on their work put into finding a block. Since blocks are limited to 1mb in size, this means if you as a bitcoin user want to transfer value from one address to another address you must include a higher than normal fee in order to make sure it gets into the very next block.

How It Fits In The Bitcoin Protocol

Once the miner finds a valid block it needs to be proven that it’s valid by the network. The miner does not award itself with bitcoins and fees from the block, the bitcoin node does. The miner will submit the block to a node along with the hash found and the bitcoin address where the awarded coins should be going to.

The node takes the data submitted and confirms that the data contains a reference to the previous block in order to preserve the blockchain’s chain, and that the resulting SHA256 on all of the block’s data matches the hash submitted by the bitcoin miner. If all of these are true, then the miner is awarded the block reward (currently at 12.5 bitcoins) and any fees associated with all the transactions in the block. As a last step, the node then broadcasts this new block to every node (and resulting miners) which will then begin work on the next block referencing the new block’s header, and continues on.

Bitcoin Mining Cheaters

It might follow then that to get free coins one just needs to take a valid hash already used and submit it to the network to trick it into giving you free coins. This will not work for a number of reasons, but the two primary ones are the nature of hashing functions along with how the hash is calculated.

Hashing is a one-way function. You can not take a hash and somehow calculate what the text was that was used to create the hash on complex values. People have created rainbow tables which are large databases of text values containing the unhashed text value and the hashed value, however these are used to crack passwords so the complexity of the data in a bitcoin hash makes this an impossibility.

Finally the bitcoin nodes themselves that are validating these blocks will compute the hash themselves, so any submitted data along with the hash is checked for validity before including them in the blockchain and awarding the miner with coins. In a nutshell that’s how bitcoin mining works, from a top-level non-math intense view.


What Does The Bitcoin Network Look Like?

The Bitcoin network is often talked about but never really broken down into it’s smaller parts. The network itself is a stage with multiple pieces working in tandem that make up the larger network as a whole. This article will give the reader a cursory overview of these individual pieces, as well as how they interact together.

Bitcoin Network – Layer 1

The base layer 1 of the bitcoin network refers to nodes, miners, clients, wallets, and the blockchain. This is a settlement layer for payments and are permanently etched into the blockchain for all eternity. Anyone can interact with layer 1 by broadcasting their p2p payments to each other, but you must wait for confirmations to ensure there won’t be a double-spend on the transfer.


Bitcoin nodes are the backbone of the bitcoin network, which hold and maintain the entire blockchain. They communicate with one another about new blocks that are to be added to the end of the chain, and are the enforcers based on predefined rules as to whether the block is valid or not.


Bitcoin miners – while also bitcoin nodes – perform the actual mathematical calculations of attempting to find a new block. You read about these the most in the news, as they use a lot of electricity, and are the actual pieces of the network that can “make you money”. The use of electricity is a trade-off and ensures the security of the blockchain. Proof of work is utilized in that it took 10 minutes worth of expending electricity to discover a new block.

The block consists of selected transactions from a pool of transactions that people have broadcast to the bitcoin network. Miners choose which transactions to include in their discovered block based on the fees associated with the broadcasted payment.

Clients and Wallets

Individual users of bitcoin have software that allows them to receive and send bitcoin payments. This software manages their wallet, which is just a collection of private keys. Some wallets require the entire bitcoin blockchain to be downloaded in order to send bitcoin, while others like SPV or light wallets do not. Here’s a list of some of them and what they are:

  • Bitcoin Core – this is a client maintained by the core bitcoin team, and requires the full blockchain to send payments
  • Electrum – this is an SPV wallet that relies on seed words to backup your wallet. This does not require the full blockchain to send payments.
  • Ledger Nano S and Trezor – these are hardware wallets that create a very secure environment for your keys. You use the device to sign transactions that will be broadcast to the bitcoin network, and the private key never touches the computer. You can use this on public computers or on compromised machines housing keyloggers with no fear that your coins will be stolen.


The bitcoin blockchain consists of every single transaction since Bitcoin’s inception in 2009. Each individual block consists of either 0 kb in size or 1024 kb (1 megabyte) in size. The number of transactions that can be stored in a block depends on the type of transaction sent and miner’s desire to include a transaction in the block. Since each transaction includes some fees, miners are incentivized to include as many transactions as possible that will fit.

Bitcoin Network – Layer 2

A recent development in the bitcoin space is the Lightning Network. This is a layer on top of layer 1, much like PayPal or Visa is a layer on top of the banking system. Layer 2’s goal is to increase the transactions per second between two parties transferring value while still keeping security, anti-censorship, and decentralization as cornerstones of the protocol.

Since the base layer’s blockchain is 1 megabyte maximum in size for every block, there’s an obvious limit as to the number of transactions per second that can be processed by the bitcoin network. To get around this without increasing the blocksize to infinity (which would be impossible for people to download large blocks before the next block would be found, thereby leading to network congestion), layer 2 was built. Read more about what the lightning network is and how it relates to solving the blocksize problem in this article.


What Is Bitcoin?


What is Bitcoin? Wikipedia defines bitcoin as:

[Bitcoin is] a form of electronic cash. It is a decentralized digital currency without a central bank or single administrator.

It’s a very simple statement. You might read this quickly and not really grasp what it means in a larger sense. The important stuff is in the last sentence. Bitcoin is distributed to users without the use of a central bank which might leave you with a lot of questions about how that is possible from a technical and more importantly an economic standpoint. If bitcoin isn’t issued by a central authority then who controls the production of the coins?

The following articles go over all of these questions:

In order to answer “What is bitcoin?” we need to first understand what money is. There’s quite a few things that are never taught in school growing up, at least in the United States, and money is one of them. You were taught how to count it, and that there’s an entity called the Federal Reserve, but you weren’t exactly taught the history of it. A vast majority of individuals assume that every paper dollar is “backed” by an equivalent amount of gold. This is 100% false and hasn’t been the case since 1971.

So what is money then? There’s a plethora of youtube videos and articles out there describing the history of the US dollar, so I won’t get into that here. A list of videos on the history of money can be found here. Money, in it’s truest form, is a medium of exchange which allows individuals to conduct public and private business with each other. The fact that it is not backed by anything makes no difference. If the public trusts the currency, it will be used with no friction.

Sound Money

money [that is] not liable to sudden appreciation or depreciation in value : stable money; specifically : a currency based on or redeemable in gold
Webster’s Dictionary

The move away from the gold standard has caused an inflation in the price of goods and services in the United States. The value of the US dollar has dropped considerably since the 1900s due to quantitative easing.

Inflation is fought by hedging against the US dollar. Strategies include diversifying your portfolio by investing in companies outside of the United States, putting some fiat money into precious metals, jewelry, and more recently bitcoin. By hedging your bets you protect yourself from some inflation. If the national inflation rate is 2.9% per year and you’ve invested 10% of your cash into other currencies/commodities – if those did well you offset that inflation by a little bit.

What is Bitcoin?

Bitcoin can be seen as an addition to your portfolio for longer term holders. Bitcoin can also be seen as a peer-to-peer currency which cuts out the middleman (banks). It is a new emerging asset class that was born in 2009 and has seen remarkable price growth. Bitcoin is more than that though, and it’s price is just the tip of the iceberg. Much like the US dollar of today, which is backed by nothing but trusting that the government won’t destroy it, bitcoin is also only backed by the trust that the system is open for everyone to see and the fact that it can’t be changed on a whim from it’s 21 million coin cap by any central authority thereby diluting and growing the coin pool. The mathematical model which secures bitcoin ensures that it can never be hacked (and has not been hacked to this day) – only exchanges which house bitcoin have been hacked due to exchange’s poor security models.

To learn more about Bitcoin’s other use cases, check out this article.