Swap BTC and ETH in seconds: Keep your Private Keys Private

Kincaid O'Neil
May 22, 2019 · 4 min read
Image for post
Image for post
Switch, the new app for non-custodial crypto trading

Bitcoin promised decentralized value transfer: be your own bank.

Yet more than a decade later, the vast majority of cryptocurrency trading volume still transpires on centralized exchanges that have full control over your crypto.

High profile exchange hacks, billions in lost funds, and shady banking partnerships have prompted a wave of new, “decentralized” exchanges.

But despite the promise of these DEXs, most are limited to only a single family of assets (e.g. only ETH and ERC-20 tokens, or only BTC, LTC and the like), necessitate undesirable trust assumptions, or are constrained by a slow, loathsome user experience.

Introducing Switch 💸

Switch sidesteps the problems of traditional DEXs by employing a novel solution: streaming micropayments, which work by moving little bits of value piece-by-piece until an entire payment or trade is complete.

Streaming micropayments enable lightning-fast swaps, interoperability across blockchains, and complete self-custody of assets.

Load funds onto “cards,” swap between them, and withdraw at your leisure. Only you have access to these funds, even while trading!

Image for post
Image for post
With Switch, exchange crypto using streaming micropayments

Bitcoin? Ethereum? You got it! 🌈

Today, Switch supports the three top crypto assets: Bitcoin, using LND and the Lightning Network; Ether, using Machinomy payment channels; and XRP, using its native payment channels.

Crucially, nearly any cryptocurrency or layer 2 network that transfers value fast and cheaply can support non-custodial trading in Switch. No specialized blockchain required!

We’ve been building the foundation to support ERC-20 tokens such as Dai, and hope to roll out support in the coming weeks. On top of that, many more asset integrations are in the pipeline.

Wait, it’s that fast? 🏎

Switch swaps are fast, and complete in seconds for small value transfers.

Image for post
Image for post
Every blob corresponds to an actual payment channel settlement, represented in real time.

Since streaming micropayments leverage payment channels and layer 2 networks such as Lightning, each “packet” of value settles on the order of milliseconds.

No slow on-chain transactions, or outrageously long escrows. It’s just: Settled. Boom. Done.

Networked liquidity 🕸

Switch is underpinned by the Interledger protocol to send packets over a decentralized network of “connectors,” or money routers, which provide liquidity.

Inspired by the internet, Interledger is an open standard for interoperability across all payment networks.

Each card in Switch is linked to a connector, and provides an “uplink” to the Interledger network to perform swaps and send peer-to-peer payments.

For this beta release, Switch uses a connector operated by Kava. But coming soon, we’ll roll out support for user-defined connectors, and all the tools, infrastructure, and docs necessary to operate one yourself.

Safe and secure 🔐

Even if you use the Kava connector, don’t trust us!

When trading between cryptocurrencies, Switch will prefund a very small amount of the source asset — the equivalent of $0.10, by default — to the connector. Then, the connector sends back a small amount of the destination asset. If the exchange rate is reasonable, we repeat the process. And again. And again; many times per second.

If at any point the connector stops sending or sends us too little of the destination asset, we halt the exchange. This enables non-custodial trading, since the counterparty risk is merely a few cents, and comparable to that of atomic swaps.

But by contrast to atomic swaps, streaming micropayments also mitigate liquidity lockup and the floating option problem — which is a win-win!

Try it today 🚀

Switch is available in beta for Mac, Windows, and Linux, and supports both testnet and mainnet, with trades up to $20.

Follow our Getting Started guide to get up to speed and configure Switch on testnet in minutes.

While we hope it’s all smooth streaming, as this is beta-quality software, issues may arise. We’re rapidly iterating to make Switch more reliable, feature-complete, and secure. If you encounter any bugs or unexpected behavior, we’d encourage you to submit an issue!

And for the latest updates from Kava, follow us on Twitter ~ we’d love to hear about your experience with Switch!

Kava Labs Blog

This publication features news and articles from the Kava…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store