Arwen Testnet User Guide v0.1

Arwen is a non-custodial cryptocurrency-to-cryptocurrency trading platform. With Arwen, you can access the liquidity of a centralized exchange without trusting the exchange with custody of your coins. Instead, trading is backed by on-blockchain escrows, where each coin’s native blockchain acts as the agent of escrow. Trades are fast because they happen off blockchain, and secure, because they are executed via off-blockchain atomic swaps. Arwen ensures that even a compromised exchange cannot steal your coins, even as you trade.

Download Arwen for Testnet:
Arwen for MacOS
Arwen for Windows
Arwen for Linux
Important Note: Remember to only trade using testnet coins

This guide shows you how to use Arwen on testnet. For instructions on getting testnet coins and wallets, scroll to the bottom of this post.

Setting up Arwen Escrows

When you trade with Arwen, you don’t need to deposit your coins at the exchange. Instead, you lock your coins in an on-blockchain user escrow. Below, we show how to lock 0.1 bitcoins in an escrow with our fictional testnet exchange “Coinboss” using the Arwen App.

Each user escrow has an expiry time. If the exchange is behaving normally, you will be able to close this escrow at any time, even before it expires. But if the exchange gets hacked or becomes unresponsive, you will be able to close your escrow once the escrow expires.

Closing the escrow will release coins to your Bitcoin wallet.

When you create a User Escrow, you must decide which exchange to trade with, what coin you want to sell/use to purchase other coins with, the amount of that coin to escrow, and the expiration date of the escrow. You also need to enter a wallet address where you want your coins to be transferred when escrow closes.
Now you need to fund the user escrow. To do this, you just need to send coins 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.

Once your user escrow is confirmed on the blockchain, you can ask the exchange to fund an exchange escrow for you.

The exchange escrow is funded by the exchange.

The exchange escrow proves that the exchange has sufficient collateral to back any trades you make on the exchange, and protects you when the exchange becomes unresponsive or hacked.

To open an exchange escrow, you have to pay the exchange an escrow fee. This compensates the exchange because the exchange is locking up its coins for you. The escrow fee is proportional to the number of coins in the exchange escrow, and the expiry time of the exchange escrow.

If you close your exchange escrow early, before it expires, you will receive a rebate of a portion of your escrow fee.

To ensure that your coins are protected in case the exchange becomes hacked or unresponsive, you should always close your exchange escrows before they expire. If you forget to close an exchange escrow before it expires, an honest exchange will close your exchange escrow for you, but your coins could be at risk if the exchange is hacked.

Your exchange escrow should be for a different coin than your user escrow. You can’t trade BTC for BTC! 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.
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 before it expires at 9:45 AM on Jan 19, 2019, then we will get a rebate of a portion of the escrow fee.

Trading with Arwen

Now that we have a user escrow and an exchange escrow, we’re ready to start trading.

Arwen’s trades are off-blockchain atomic swaps. Trades happen instantly, because nothing is posted to the blockchain during a trade. Instead, trading only involves cryptographic messages sent between the user and the exchange. Because these messages are visible to no other party, each trade is protected from front running and griefing.

Atomic swap of 1 BTC for 100 LTC cryptographically guarantees that: (1) if the user transfers her 1 BTC to the exchange, even a compromised or malicious exchange cannot prevent the user from claiming her 100 LTC, and (2) if the exchange transfers its 100 LTC to the user, even a malicious user cannot prevent the exchange from claiming its 1 BTC.

This is a higher standard of security than the “second send’’ approach (used by ShapeShift and many OTC desks) where the user first transfers her 1 BTC to the exchange and claims her 100 LTC second. In the “second send’’ approach, a compromised or malicious exchange can accept the user’s 1 BTC but then refuse to send the user her 100 LTC.

To trade, we need to pair a user escrow and an exchange escrow. Each trade uses the RFQ (Request for Quote) trading instrument.

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 ask the exchange for a quote for trade buying 0.5 LTC in exchange for some BTC.
The exchange provides us with a quote: “0.5 LTC can be bought for 0.00350999 BTC”. The exchange can’t hold a quote forever, since prices fluctuate, so the quotes expire. If you like the quote, you can place the order and make the trade. The exchange commits to executing the trade at exactly the quoted price.

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

Here we’ve done three off-blockchain RFQ trades against this pair of 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.

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

To try Arwen on testnet, you need a wallet that supports testnet coins. Here are some wallet apps:

You can get testnet coins at any of these faucets.

Questions? Faucets not working? Email!