Skip to content

Swap BTC, ETH, DAI & XRP in seconds. Keep your private keys private.

License

Notifications You must be signed in to change notification settings

Kava-Labs/switch

Repository files navigation

💸 Swap BTC, ETH, DAI and XRP in seconds. Keep your private keys private. 🔒

Switch swap screen cropped

GitHub release GitHub All Releases GitHub Discourse users Twitter Follow

Switch is an Interledger wallet enabling lightning-fast crypto swaps 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!

Get Started

1. Download Switch

» Mac | Windows | Linux «

Switch will prompt you whether you want to use testnet mode or mainnet mode. To get started, we suggest selecting testnet (you can always switch to mainnet mode later).

2. Add cards

Add and deposit to a minimum of two cards to enable swapping. To get started on testnet, ETH, DAI or XRP are the simplest.

  • ETH, DAI: Add an Ethereum card using a private key. You can generate a private key and address here. Then, load the address with testnet ether from the Kovan testnet faucet.
  • XRP: Add an XRP card using a XRP secret. If you don't have a testnet account, generate a prefunded account and secret from the XRP testnet faucet.
  • BTC: To add a Lightning card, follow these instructions.

Switch will prompt you to securely deposit funds onto your cards as you add them. Only you have access to these funds.

3. Swap!

Select a card to send, then click "Swap" and choose a card to receive. Enter the desired amount, and exchange crypto in seconds!

Demo of XRP to ETH swap

How It Works

Fast, non-custodial trading

When trading between assets, Switch will first send a very small amount of the source asset, the equivalent of $0.10, to the exchange party known as the connector. Then, the connector sends some amount of the destination asset. If the connector upholds its side of the bargain and the exchange rate it provides is decent, we repeat the process. And again. And again; many times per second.

This is the model of streaming micropayments: moving value bit-by-bit until the entire payment or trade is complete.

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.

Payment channels enable these payments to be cheap and very fast.

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.

Developer Installation

> git clone https://github.com/kava-labs/switch
> cd switch
> npm install
> npm run serve

Roadmap

  • Integration of the top three cryptocurrencies
  • Mainnet
  • Cards for ERC-20 tokens, such as DAI
  • Custom connectors
  • Peer-to-peer payments

License

Copyright © Kava Labs, Inc. All rights reserved.

Licensed under the Apache v2 License.