Showing posts with label Exchanges. Show all posts
Showing posts with label Exchanges. Show all posts

Monday, August 1, 2016

Contentious Bitcoin fork WILL create a split

Contentious Bitcoin fork WILL create a split

The Bitcoin community has debated a potential hardfork to Bitcoin for over a year now. There have been various solutions proposed to change the hard cap on block size and increase the amount of transactions that can go into any single block.

Leaving aside the discussion as to which approach would be the best for Bitcoin in the long run, we can agree that there is a disagreement on the issue and any hard fork that may happen will not be as unanimous as the previous forks were. Looking at some recent examples, we can expect that any contentious Bitcoin fork will create a split in the network.

Big players can trump forks - Elacoin


Last year Steve Sokolowski shared his thoughts on a Bitcoin hard fork proposal in a forum post. Other than discussing the actual solution, Steve also shared a story of Elacoin's attempted hard fork. Apparently, it was some unremarkable Proof of Work altcoin which activity has died off after awhile. A new developer came in and decided to breathe new life into the coin by creating a Proof-of-Stake fork. A lot of people got excited for the update and the trading volume and price rose back up.

When the fork was scheduled to take place, despite the backing of the community, the developers and stakers, the fork failed since Cryptsy continued to trade the coin without upgrading their daemon. Eventually the hard fork was deemed a failure while the old coins were still being traded.

This brings to mind the famous experiments with five monkeys, a ladder and a banana. People would trade a coin in anticipation of the fork, then ignore the fork and continue trading the coin due to its increased price and volume, completely forgetting why they were trading it in the first place. Classical altcoin speculators.

This only goes to show that big players, even if they are in a minority, can trump developer forks. While a story like this is rather unlikely to happen in Bitcoin, since the coin itself has many different markets and a vast community, we could experience a different problem when a hard fork happens...

New Coke vs Coke Classic - Ethereum


Not so long ago, Ethereum has experienced The DAO debacle, wherein a large quantity of ethers were drained from a high-profile smart contract. This prompted the Ethereum developers to create a hard fork that invalidated the attack. For a few days everything seemed to go smoothly - the majority of the network supported the fork, everyone transitioned just fine and it looked like the network could put the kerfuffle behind them. Then came Ethereum Classic...

Ethereum Classic is, I suppose, an "un-fork" of Ethereum - a codebase designed to ignore the DAO hard fork and continue the network as if it never happened. Whether the developers believe that they are supporting the community that disagrees with the fork, or they just want to make a quick buck, the fact is that the classic ethers (ETC) started being traded on Poloniex, probably one of the biggest altcoin exchanges currently, and now are being actively traded on a number of other exchanges with a current market cap of $200M and 24h trade volume of $65k - forth market cap after Bitcoin, Ethereum and Ripple, and having double the trading volume of Ethereum, second only to Bitcoin...

From a perspective of any Bitcoin core developer wanting to fork Bitcoin, this is probably the worst thing that could have happened in the given situation. Exchanges supporting both sides of a fork can set a precedent of what will happen when Bitcoin is forked in any fashion short of full unanimity. Even if the unforked version of Bitcoin has 1% of its market cap, that's $94M market waiting for an exchange to take their money - it would be the 7th largest coin market, around the halfway point between Litecoin and Dash.

As an Ethereum Developer pointed out in an Ethereum Foundation Skype Chat leak - ignoring Ethereum Classic means there is no money to be made, while embracing it allows you to tap into some "vestigial value remaining from the shared chain history".

Even if any potential fork has all of the support from all of the developers and miners, there isn't much one can do to stop the un-fork, perhaps short of a Coiledcoin-esque 51% attack. Even if networks like Ethereum implemented "the bomb" (a special smart contract that prints tokens out of thin air, intended to kill an un-forked network), a developer could just create another hard fork to disable that code pretty much like the DAO was disabled...

Kill it with fire


So when all is said and done, it looks like the only way to ensure only one version of Bitcoin is around, one would need to reach an overwhelming consensus with the developers, the miners and the exchanges to support only one part of the fork. Anything short of that will create a split network with duplicate tokens being created on both tines of the fork.

To ensure the rest of the network follows suit, someone should put aside some funds and mining power to be able to execute 51% attacks on any un-fork that would start being traded at an exchange. While a 51% attack in normal cases might be in the legal murky territory, perhaps using it to enforce a hard fork might not be seen as an attack on the currency, but as a part of the upgrade process. The law might not catch up to this conundrum for years still.

Conclusions


Anything short of an unanimous hard fork to Bitcoin will most likely result in a network split where both sides of the fork. The split will most likely be motivated by short-term profit to extract some remaining value from the alt-chain. A good way to ensure no such split happens would be to divert some resources to performing 51% attacks on the minority chain and thus causing whatever exchange that tries to trade them to lose money.

Related discussions:


Wednesday, June 10, 2015

Handling bitcoins during a hard fork - pondering Bitcoin XT

Handling bitcoins during a hard fork - pondering Bitcoin XT

As everyone might've heard by now, there is a big debate in the Bitcoin community about whether or not we should increase the block size limit. Some core devs are pushing for the size increase with the Bitcoin XT version, and it looks like some people might be committed to the hard fork even if the community would be against it. This can be a potentially dangerous move that fragments the Bitcoin world to those that use Bitcoin QT and those that use Bitcoin XT. If this was to happen and both of the versions were to coexist, there is a lot more than just confusion to be had for anyone that holds funds on behalf of their customers.

Hard fork and the transactions


Initially, when the hard fork happens, all transactions will be interchangeable between the two blockchains - after all, they will be spending the same outputs using the same algorithms. You could broadcast the same transaction to both blockchains and they will be able to get into the blocks just fine. However, this also means that any withdrawal from shared wallet, like from an exchange or CoinBase, may siphon the funds out of both chains even if the service is using only one chain. If a service was to ever switch over to the other chain, their balances might be out of order.

Over time, the networks will start drifting apart. Any transaction that spends the coinbase transaction of a block minted post-fork won't be copyable to the other chain. Similarly, any conflicting transactions will only be valid on one chain.

Since Bitcoin network currently has a lot of unspent outputs (such as the ones tied in physical bitcoins), we will probably see transactions valid on both chains for years to come.

Confusion about addresses


After the fork happens, there can be a lot of confusion as to what network everyone is on. If the address structure remains identical, someone asking you "to send 1BTC to 1PiachuEVn6sh52Ez7o6Fymvw54qvQ4RBm" might be confused when you send that amount of money to the listed address, but on a different network.

Maybe the devs behind BitcoinXT will take some precautions to prevent such mistakes by altering the Base58 alphabet in a similar fashion to Ripple (yes, Ripple addresses are identical to Bitcoin with the difference of the final Base58 alphabet used). Perhaps BitcoinXT addresses would start with an X instead of 1 without changing the underlying mathematics behind address creation or net bytes?

Recommendations for exchanges and other services


Even if one side of the fork will be more likely to stick around than the other, it is still useful to be prepared to exist on both sides of the fork. My recommendation for any exchange or service relying on a shared wallet is to make a backup of all user balances on the day the fork occurs. Since those Bitcoin balances would be valid on both chains, if the service was to support both sides of the fork, users should receive the same balance in BitcoinQT and BitcoinXT.

After that, both the hot and cold wallet balances should be spent on both chains in a conflicting fashion (send all funds to A on BitcoinQT, and all funds to B on BitcoinXT). After both transactions are confirmed on the separate forks, there will be no chance of the same transaction being copied between the chains. The balance of whichever chain is not used should be safely stored for the time being along with the backup of user balances.

If an exchange was to support both of the chains, supporting them straight away would create the least amount of confusion. Users should receive the same balance on BitcoinXT as they currently have on BitcoinQT, with their fiat balance remaining intact. Afterwards, the users would be free to trade both coins like they would be separate altcoins.

Conclusions


A Bitcoin hard fork might be coming. Exchanges and hosted wallets should have a plan of action if both chains were to co-exist.

Thursday, April 23, 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?

Thursday, July 3, 2014

A killer feature for wallets and exchanges

Awhile back I was working on some software for a Bitcoin ATM that didn't offset its Bitcoin sales instantly at an exchange. During that time it hit me - the software I was developing could be a killer feature for a number of wallets and exchanges. Since at the moment I don't have much time to implement this myself and Coinbase recently announced a similar feature on a smaller scale, I might as well share my thoughts on the matter.

Bitcoin transaction offsetting


One can do a lot with the transparent blockchain that Bitcoin has. For example, if one uses a wallet like Blockchain that reuses the same address for change, it is really easy to estimate how much money one has spent. Take for example, this random transaction:


We can see the owner of that address spent 0.05BTC somewhere and returned 0.0015876BTC back to their address. At the current rate of about 650 USD/BTC, that's roughly a $32.5 purchase.

Since we know exactly how much an address is spending without having to have a direct access to it, we can do a neat trick of offsetting any and all purchases made with an address at an exchange automatically. We would just monitor the blockchain for any transactions coming from our address, and see how much money was transferred out of it. Then, using some publicly available APIs on a number of exchanges we can buy the same amount of BTC back instantly. Pretty neat.

A service like that would encourage a number of Bitcoiners to spend their coins more willingly. I was hesitant to spend my coins at times since buying them at an exchange was a bit of a hassle. If I could just deposit some fiat at an exchange and automatically have all my purchases offset, I would be more willing to spend the coins at a regular basis, since I would be netting the same amount of them at the end of the day.

One step further


This simple scenario is a beginning. The same service could be expanded to say, let you invest into coins as you spend them. One would just take the amount to be offset and multiply that by a ratio greater than 1. For example, 1.05 would mean that I would be buying 5% more coins that I would be spending. As a person that is bullish on Bitcoin, this would not only encourage me to spend my coins, but it would reward me for doing so with more coins ;). (I know this can be done manually and what have you, but sometimes small automatic rewards can feel better than doing things yourself)

Another great part of this approach is that it doesn't have to be an external system. The same functionality could be handled by a wallet or even an exchange itself (they would probably love it more so as it would be bringing in more volume). I would love to see a big exchange implement something like this.

In conclusion


All in all, automatic transaction offsetting in Bitcoin is really easy and encourages more bitcoins to be spent and bought all the time. What Coinbase implemented is a nice step in the right direction, but it's far from a complete solution.