Arwen User Guide v1.0

Jan 24, 2019 · Unlisted

With Arwen, you can trade on an exchange without trusting the exchange. Trades are done directly from your wallet, and you don’t have to trust the exchange with custody of your coins!

Arwen is currently live, in beta, on KuCoin. You can use Arwen to securely trades of BTC, LTC, BCH and ETH on KuCoin with zero counterparty risk. Each Arwen trade is secure, because it is settled via an instant atomic swap.

Download Arwen:
Arwen on Mac
Arwen on Windows
Arwen on Linux

This guide shows you how to use Arwen to trade BTC, LTC, BCH and ETH at KuCoin. You can also read our support documents, or watch this demo video. You might prefer to get to know Arwen by trading with testnet coins. So, at the end of this guide, we also show you how to try out Arwen on testnet!

Depositing to your User Escrow

When you trade with Arwen, you don’t need to deposit your coins at the exchange. Instead, you use your Arwen App to deposit the coin you are selling in an on-blockchain user escrow smart contract.

The user escrow smart contract is on the traded coin’s native blockchain. (So, you escrow BTC in a smart contract on the Bitcoin blockchain, you escrow ETH in a smart contract on the Ethereum blockchain, you escrow LTC in a smart contract on the Litecoin blockchain, etc.)

Your Arwen App has one of the keys to this escrow. This key protects your coins, even if the exchange is hacked.

You can sell coins from your user escrow once it confirms on the blockchain.

You can close your user escrow at any time. Closing your escrow releases coins back to your wallet. To protect your coins, your user escrow also has an expiry time. If the exchange goes offline, becomes unresponsive or gets hacked, you will be able to close this escrow after this expiry time (without any help from the exchange!).

Image for post
Image for post
When you create a User Escrow, you choose an exchange, the coin you want to sell, the amount of that coin, and the expiry time. You also need to enter a wallet address where you want your coins to be deposited when escrow closes. This wallet address is the receiving address of whatever wallet you use to hold your coins (e.g. hardware wallet, software wallet, etc.)
Image for post
Image for post
To deposit coins in the user escrow, you send coins from your wallet to the blockchain address of the escrow. The escrow’s address is shown in this “Fund User Escrow” modal. You can use whatever method you’d like to send these coins: scan the QR code, or copy and paste the address manually into your software wallet application or hardware wallet application.

Requesting your Exchange Escrow

Next, you request an exchange escrow. You can buy coins from the exchange escrow once it is confirmed on the blockchain.

The exchange escrow is funded by the exchange. Because the exchange is escrowing coins for your use, you pay the exchange an escrow fee. The escrow fee depends on the number of coins in the exchange escrow, and the expiry time of the exchange escrow.

The exchange escrow is also a smart contract is on the traded coin’s native blockchain. (Thus, BTC is escrowed in an exchange escrow on the Bitcoin blockchain, etc) Your Arwen App has one of the keys to the exchange escrow. This key protects the coins you buy, even if the exchange is hacked.

You can close your exchange escrow at any time. But, if you want to protect your coins in case the exchange becomes hacked or unresponsive, you should close your exchange escrow before it expires.

Image for post
Image for post
To request an exchange escrow, you specify the coin, the amount, and provide an wallet address where you want your coins to be deposited once your escrow is closed. Also, you need to pay the exchange an escrow fee.
Image for post
Image for post
The exchange will quote an escrow fee. The escrow fee is paid out of the coins locked in a user escrow. Here the escrow fee is 0.00003971 BTC, and we are paying out of BTC user escrow that we set up before. If we close the exchange escrow early, before it expires at 9:45 AM on Jan 19, 2019, then the exchange will pay us back some of the escrow fee back as a rebate.

Trading with Arwen

Now that we have a user escrow and an exchange escrow, we’re ready to start trading. To trade, we need to pair a user escrow and an exchange escrow. Each trade uses the RFQ (Request for Quote) trading instrument.

Image for post
Image for post
Here we’ve paired our BTC user escrow with our LTC exchange escrow. We’re ready to make a trade using the trading panel at the bottom of the screen. We want to buy 0.5 LTC in exchange for some BTC.
Image for post
Image for post
The exchange gives us a quote: “0.5 LTC can be bought for 0.00350999 BTC”. If we like the quote, we can place the order and make the trade. The exchange commits to executing the trade at exactly the quoted price. The exchange can’t hold a quote forever, since prices fluctuate, so the quote also has expiry time.

Multiple trades can be executed against a given escrow. Also, we can pair different escrows, as long as they are at the same exchange.

Image for post
Image for post
Here we’ve done three off-blockchain RFQ trades against this pair of escrows.

Closing escrows

Once we are done trading against an escrow, that escrow can be closed. Once an escrow is closed, the balance of coins owned by the user is released into the user’s wallet, and the balance of coins owned by exchange is released into the exchange’s wallet.

Image for post
Image for post
We are closing our exchange escrow. Here, the exchange will send us 1 LTC, because that is the total amount of coin that we bought in all three trades against this escrow. Also, because we are closing this escrow before it expires, we get a 0.00537692 LTC rebate on our escrow fee. All of these coins will be transferred to the LTC wallet address that we specified when we opened the exchange escrow.

Arwen on Testnet

Your Arwen App has a switch that allows it to quickly move from testnet mode to mainnet mode. You can trade with Arwen on mainnet at KuCoin. Testnet mode allows you to trade at a number of fictional testnet exchanges, like Coinboss, Roloniex, Mt. Fox, etc.)

Image for post
Image for post
Arwen’s login screen allows you to switch to testnet. You can also switch to testnet on Arwen’s setting screen.

To try Arwen on testnet, you need a wallet that supports testnet.

We recommend downloading Coinbase Wallet for mobile (Android or iOS), a non-custodial wallet that supports BTC, ETH, BCH, and LTC testnet. You can switch to testnet from the Advanced Settings section of the Settings tab. For ETH please choose Ropsten Testnet.

(Note! Testnet mode hides your mainnet wallet coins in the Coinbase Wallet. And remember to never delete any wallet without ensuring you have your seed recovery phrase!)

Here are some other wallet options:

• Bitpay supports BTC and BCH Testnet.(iOS app, Android app, Mac app, Windows app, Linux app)

•Electrum supports BTC and LTC testnet (See instructions.)

Metamask supports ETH testnet.

You also need some testnet coins!

Here are some faucets that will give you free testnet coins that you can trade with. If you’re having trouble getting coin from these faucets, just email and we will send you some testnet coins.

Questions? Email!

This user guide was last updated on November 15, 2019. Learn more by reading our support documents or diving into our whitepaper!

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