Tampilkan postingan dengan label Gateways. Tampilkan semua postingan
Tampilkan postingan dengan label Gateways. Tampilkan semua postingan

Senin, 07 Maret 2016

Big blocks, small blocks, side-blocks, off-blocks...

In the recent week Bitcoin has experienced another "stress test" in form of a lot of transaction spam (see below for a chart of the amount of transactions in mempool), although this time the spam was not scheduled and it's not clear who was responsible for it. Along with the continuous debate on whether or not to increase the Bitcoin block size, a lot of people have started looking at what are the potential outcomes of the situation. I have covered a similar topic over a year ago, but it might be a good opportunity to revisit the topic and bring everyone up to speed.

A mockup of "Bitcoin surge pricing", inspired by Uber.

The problem


As some of you know, the Bitcoin blockchain was initially designed to have a limit of 1MB per block. This was done due to prevent the bloat and abuse of the network. However, if this limit is strictly enforced, the Bitcoin network would only be able to support a small number of transactions, about 7 transactions per second (compared to Visa's 2000 tps). Clearly, this won't be enough for a payment network that is supposed to replace the banks and credit cards. Either we will increase this size in some way, or we will see Bitcoin become a much different network.

The outcomes


Depending on whether the block size is increased or not and by how much would dictate how the Bitcoin network is shaped. Lets look over some possibilities.

Block size remains rigid


In this approach, the 1MB block size is rigid and remains unchanged. When we start hitting this limit, the miners will be able to pick and choose which transactions to include in the block. Rational miners will pick the transactions that pay them the most in fees (proportionally to their size), thus there will be a bidding war to get into the next block.

Due to the increased cost, fewer people will opt to send transactions themselves, either leaving Bitcoin entirely, or by performing some off-chain settlement. Wallet services such as Coinbase could become more like banks - offering their customers settlement with other people on their platform and other platforms that accept off-chain settlement.

In this scenario, Bitcoin becomes a settlement method for large bank-like wallets and large corporations.


Block size limit is abolished


A polar opposite of the previous approach. The block size limit is completely abolished and miners can create arbitrarily big blocks. While anyone can create a transaction for cheap, the network would soon be attacked by malicious entities trying to push the limit. Someone could decide to generate a 1GB block for example and cause the network to grind to a halt while synchronizing.

Quite quickly running a full node becomes a luxury or a business. We see more reliance on Stratum-like supernodes. The functionality of the network is dictated by them.

In this scenario, the Bitcoin network turns into something like the modern Internet - only big players can access it directly and everyone else has to rely on something like Bitcoin-Internet Service Providers.

Middle of the road


The most likely scenario would be somewhere in the middle of the road - raising the block limit, but doing so gradually. Dedicated users could run their own nodes, but most of us would rely on third parties for helping our wallets function.

Alternative solutions


Bitcoin is both an independent currency and a settlement network for that currency. Whether the block size increases or not, there are a lot of ways one could try enhancing the settlement aspect of Bitcoin.

Soft forks


There are some proposals on how to improve the scalability without hard forking the network. Some of them include softforks such as Segregated Witness , or Sidechains (allowing value to be moved in and out of the Bitcoin network without a trusted third party).

Segregated Witness, or "SegWit" is a solution focused on slimming down the transactions by moving the signatures off-blockchain. This can slim them down to about a quarter of the size, essentially allowing the Bitcoin network to process 4MB of transactions in 1MB blocks. The idea appears to have a lot of support, but since it's mostly streamlining what Bitcoin can currently do rather than creating a whole new solution, there isn't much left to explain without going into technical details.All in all, SegWit can buy Bitcoin some breathing room with its current block limit.

Sidechains is an idea focused on on being able to move the value in and out of the Bitcoin network without depositing the coins with a third party. While this doesn't sound like much, sidechains can lead to a lot more than just scaling Bitcoin - they have a potential of recreating networks with the features of Ethereum or Ripple without having to bootstrap those networks with new coins. These sidechains could be used to settle BTC transactions outside of the network while still not having to worry about the counterparty risk.

Payment channels


Payment channels in general or Lightning Network specifically are an interesting approach to allowing a large amount of transactions to take place outside of the Bitcoin network while everything would still be settled on-chain. The idea was discussed as early as 2011, and today we have some companies that even start advertising it on their websites:


21.co advertising their payment channels right above telling everyone how many blocks it might take to confirm various transactions during the recent spam attack

A payment channel is a way for two nodes to pass payments back and forth between one another using unbroadcasted Bitcoin transactions. Each payment adjust the balances between the nodes - shifting the balance back and forth accordingly. Only the final transaction gets published to the whole world, thus potentially saving a lot of space in a block. While the use case for this solution might be limited (who sends another person multiple transactions over a short period of time?), it gets more interesting when you add the network effect to it.

A simulation of 6 networked payment channel nodes

Now, when you introduce a few "supernodes", possibly in form of Bitcoin exchanges and big companies, you start mimicking the Gateway model of Ripple:

An illustration of the Gateway model of Ripple

Instead of settling directly on the network, anyone can potentially save a bit of fees by connecting to one of the supernodes and establishing a payment channel with them. This would allow you to transact with anyone in the network fast and cheap, while still being able to settle your balance on the Bitcoin blockchain as needed. If the payment channels are open for a long period of time, a lot of people could begin to operate solely within the network. This might be especially important for cross-exchange settlement, or for shared ewallets like Coinbase or 21.co.

Alternative networks


Last but by no means least, we have the alternative networks. A lot of them stand to benefit when the Bitcoin network falters.

Simplest ones would be the altcoins - Litecoin and the like. They reason that if Bitcoin blocks are full, people will join other networks and use other coins instead. I'd take that with a grain of salt, after all, Bitcoin is a better currency in terms of price and market cap than its alternatives, but the other networks might have a higher throughput.


A much more compelling alternative would the the Crypto 2.0 networks and permissioned blockchains - Ripple, Open Transactions, Liquid. Those networks can use the above mentioned Gateway model and move the settlement completely off the Bitcoin network. The only transactions that would need to be included in the blockchain would be deposits and withdrawals. While certainly more rigid and centralized than the payment channels, there are ways of preventing the gateways from stealing one's coins (such as Voting Pools). Moreover, such networks could also be used to issue fiat-denominated IOUs, which might be very attractive for some applications.

Conclusions


The Bitcoin block size debate is still going on, while the blockchain limit is being hit more and more often. Either the Bitcoin network will scale to larger blocks, or higher fees. There are many solutions out there focused on providing alternative means of settling with BTC without having to further burden the Bitcoin network. Only time will tell how our current problems will be addressed and which solutions will be used.

Kamis, 23 April 2015

Specialists, not generalists - the upcoming service fragmentation in the 2.0 world

I am a strong believer in the Crypto 2.0 space. I see the world heading towards the Singularity of Money, where the currency we transact in won't matter as much as the value of that currency. Today, I would like to share with you my thoughts on how various services we know from the Bitcoin ecosystem might look in the "2.0 world".

Exchanges turning into gateways


In the current model, we have a lot of Bitcoin exchanges. Everyone is trading their local currencies to and from Bitcoin. Because of this, every exchange has to fulfil a few roles:

  • Verify customer identity
  • Onboard and offboard both Bitcoin and fiat
  • Securely store both Bitcoin and fiat
  • Facilitate trades through its trading engine
  • Usually provide some open API for automatic trading

If the exchange fails on one of those aspects, they are essentially out of business - an exchange with a crappy trading engine is no good, neither is one that can't hold its BTC balance. Because of this, building an exchange is no easy task - you have to be proficient at all parts of your business.

Now, in the 2.0 world, a great deal of what an exchange does can be fragmented using the gateway model. Instead of dealing with everything, a gateway can focus on handling one part really well. We can have a gateway that handles only Bitcoin (onboarding, offboarding and securely storing BTC), and a separate gateway that handles only one fiat currency. Neither of them have to worry about holding more than one currency they know how to handle, and neither of them has to build any trade engine - that is either provided by the 2.0 system itself (like Ripple), or can be built separately.

Once we have a gateway for a given currency, that currency can be traded for anything else on the system - BTC for USD, CAD for EUR, gold for oil or whatever else you want. The market will decide what it wants to trade, and all the gateways need to do is provide IOUs for their currencies or commodities of choice.

Lastly, good money will drive out bad money - if a gateway is involved in some shady dealings (like MtGox in the exchange space), their IOUs will devalue quickly for everyone to see. In contrast, good and diligent gateways will secure the value of their IOUs. As nobody wants to hold inferior money, people will flock to the good gateways, leaving the bad ones in a subversion of Gresham's law.

All in all, in the Crypto 2.0 world we will see the rise in importance of gateways and a diminished need for exchanges.

Currency-agnostic exchanges


Even though we will move away from the current proliferation of exchanges, there will still be a market for high-performance currency-agnostic exchanges. Usually the first place to trade IOUs from gateways will be the 2.0 system they are issued on - be it Ripple, Omni, NXT or something else. Since those are distributed exchanges, they can only settle so many trades and work so fast - a trade on Ripple might clear in 5 seconds, while a trade on Coutnerparty might take 10 minutes on average. There are some applications where you need to achieve higher speeds and transaction volume, and that's where we can see the rise of high-performance currency-agnostic exchanges.

The exchanges built on the 2.0 systems can be quite different from what we see today. They might only take one settlement method - the 2.0 network they are connected to, but would accept any number of supported currencies from that network. For example, we could have a Ripple-powered exchange that accepted BitStamp.USD, SnapSwap.EUR, as well as DYM - the silver dimes. Once the deposits are settled, the exchange users can trade them away using the high-performance trading engine. Once all the trades are settled, the withdrawals would similarly take place through the 2.0 network.

In general, while we might see the decline in the number of exchanges, we will also see the rise of high-performance currency-agnostic exchanges.

Market makers


Similarly to how we currently have traders going into multiple exchanges and copying the market between one platform onto another in hopes of locking in some profit, we will see the rise of importance of market makers in the Crypto 2.0 space. Both the distributed exchanges living in the 2.0 systems and the various currency-agnostic exchanges will need liquidity from many markets. Since we will be dealing with a lot more currency pairs than just everything-to-BTC, we can see people copying the stock market, FX market, as well as copying the existing liquidity from Bitcoin and altcoin exchanges. Efficient market makers will get their trades and earn money, thus creating an incentive for many parties to compete and bring everyone the most competitive prices. Thanks to that, everyone will be able to get an FX rate for their currency conversion, rather than relying on "spot +-3%" usually offered by the banks.

In the 2.0 world, we will see a number of market makers copying the liquidity from the old world into the new.

Bridges between worlds


Built either as part of the gateways, or perhaps as standalone services akin to ShapeShift, the 2.0 world will be connected to both the "old world" as well as between the various 2.0 systems through the use of bridges. A bridge in this context is a service that provides onboarding and offboarding between various systems in a convenient fashion. For example, if I go into the RippleTrade wallet (a wallet handling only Ripple) and decide to make a transfer from my account into a Bitcoin address, the wallet will figure out how to pay the recipient, even though they are on a completely different network:

Bitcoin bridge from Ripple

One can imagine the same bridge functionality for any other system - SEPA, PayPal, etc.

All in all, in the spirit of the Singularity of Money, we will see a lot more bridges connecting various systems together.

Currency-agnostic services


Just like with exchanges, the current model for services usually ties them down to a single currency. For example, we see Bitcoin-only payment processors like BitPay, Bitcoin-only ATMs like Lamassu, and Bitcoin-only wallets like Blockchain.info's wallet. In the 2.0 world, we will most likely see a lot of services become more currency-agnostic (like say, CoinPayments to BitPay).

All of the services will focus on what they do best while letting everyone else focus on their strengths. Lamassu might decide that it is really good at handling cash, and instead of also converting the cash into Bitcoin, it might either pay its customers directly in fiat IOUs from a gateway (USD cash in, BitStamp.USD IOU out for example), or perhaps use ShapeShift or other dedicated high-performance currency conversion tool to pay its customers in any currency converted on the spot through open APIs.

There is a lot of room for many companies to redefine themselves when transitioning from the Crypto 1.0 world into the Crypto 2.0 world to benefit from the network effect. In the end, if you can do something better than everyone else, you can still be in business letting everyone tap into your strengths as long as you separate them from your weaker points.

In the 2.0 world, a lot of services will focus on the service they offer, not the currency they use.

The connectors - putting it all together


The last important part of the transition into the 2.0 world will be the connectors - services that bring everything together and form a coherent user experience. Instead of going to all the services separately and managing everything yourself, you are very likely to see some user-focused all-in-one services. They might take a form of a currency-agnostic wallet that automatically connects you with all of the gateways to let you receive any currency you want, uses the bridges to deliver your money where it needs to go, perhaps even has some built-in handles into an exchange to allow you to trade on the FX market.

If the 2.0 world is ever to be mass-adopted, it will require a user-friendly layer that connects everything together.

Conclusions


When we transition into the Crypto 2.0 world, we are more likely to see more specialists, not generalists. Every service will have to re-examine their strengths to build on and weaknesses to move away from. This works similarly to the Principle of Comparative Advantage - even if you can do everything better than everyone else, focusing on your few key strengths and letting everyone else focus on their strengths might be better overall:


60 Second Adventures in Economics - The Principle of Comparative Advantage

So, does your company have a Crypto 2.0 roadmap yet?