Haunted By Uncertainty
The future of cryptocurrency is haunted by uncertainty and discord over how to deal with the serious issues that plague the hot new asset class.
Scaling, security, privacy, cost, speed - there’s no perfect solution - or is there?
One of the hottest topics at TNABC Miami 2018 was cross-chain atomic swaps. What exactly are they? And could they save the future of crypto?
Cryptocurrency exchanges are really multi-billion dollar bug bounties just waiting to be targeted by hackers. Concentrating all those funds in one place, while the owners have no control over security measures, is a recipe for disaster.
The results of this centralized setup can be seen in the recent hack of the Japanese exchange Coincheck, in which a single transaction netted hackers the biggest bounty in history - more than half a billion dollar's worth of NEM coin.
Wouldn't It Be Awesome if....
Imagine if exchanges could be decentralized so those cryptocurrency funds wouldn't be concentrated in one spot just waiting for hackers to pounce. Well they can - and the solution, known as atomic swaps, could also tame several of the other demons haunting crypto such as privacy, speed, scaling, and cost.
Outside The Blockchain
Right now transactions are confined to their own blockchain. That's why an altcoin-to-altcoin trade can be so cumbersome, time-consuming, expensive, and even dangerous. But think outside the blockchain for a minute. What if cross-blockchain transactions were as seamless and even quicker and cheaper than on-chain transactions. That's the promise of atomic swaps.
An atomic swap is governed by a special type of smart contract, called an HTLC (hashed, time-locked, contract), which is a geeky way of saying it's encoded and timed so there is no need for trust between the parties - the HTLC ensures that everyone lives up to their side of the bargain.
I set up a secret key, hash it (encode it ), and send my altcoin to you, but locked in a safe that can be only be opened by my original key along with your signature. You can't get the coins, but you know they're in there, and you have the hash whose key will retrieve them.
You send your altcoin to me with the exact same hash, so now I need to open it with my secret key - and voila! - the key is revealed to you. You open your altcoin safe & we're done. No trust involved.
The whole thing can happen in a second if we want, but it times out after 24 or 48 hours, depending on how long we've agreed to wait. After timeout all funds are returned to their original owners - no harm done.
Since the transaction goes through a private channel off the blockchain, the transaction is not subject to mempool backlog, hashrate delays, or other issues that slow down blockchain transaction processing.
You don't actually "own" digital assets - you'll never have a stack of bitcoins. What you do have is proof, in the form of a private key, that your are the unique, legit, verifiable-by-anyone, recipient of chains of transactions that add up to your "balance". This private key is encrypted so nobody knows it's you, but the public address it links to is fully transparent for the whole world to see.
The problem with this setup is obvious - someone could easily do enough sleuthing on the blockchain with metadata - transaction chains, times, dates, amounts, and public addresses - to gather quite a bit of private information about you. This is in fact how the security firm investigating the MtGox Hack was able to nab one of the perps.
When transactions cross from one chain to another through a private channel and off the blockchain, following this transaction history becomes much more difficult if not impossible, since much of that history will never appear on the chain.
Atomic Swaps Are Coming
Based on the buzz and excitement at the 2018 North American Bitcoin Conference in Miami, I would say that cross-chain atomic swaps and decentralized trading will be playing a major role in the near and far future of cryptocurrency.
While there may never be a perfect solution to cryptocurrecy's woes, cross-chain atomic swaps certainly mitigate some of the major ones - security, privacy, speed, cost, and most importantly centralized exchanges as hacker-targets.