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.
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.
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.
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.
Multiple trades can be executed against a given escrow. Also, we can pair different escrows, as long as they are at the same exchange.
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.
Arwen on Testnet
To try Arwen on testnet, you need a wallet that supports testnet coins. Here are some wallet apps:
- Copay: https://copay.io
Available on iOS, Mac, Windows, and Linux
Supports BTC testnet and BCH testnet
- Bitpay: https://bitpay.com/wallet
Available on iOS, Mac, Windows, Linux, Android
Supports BTC testnet and BCH testnet
- Electrum: https://electrum.org
Available on Android, Mac, Windows, and Linux
Supports only BTC testnet
- Electrum LTC: https://electrum-ltc.org
Available on Mac, Windows, and Linux
Supports only LTC testnet
You can get testnet coins at any of these faucets.
- BTC: https://coinfaucet.eu/en/btc-testnet/
- BTC: http://bitcoinfaucet.uo1.net
- LTC: http://testnet.litecointools.com
- LTC: https://faucet.xblau.com
- BCH: https://testnet.wormhole.cash/faucet/
- BCH: https://coinfaucet.eu/en/bch-testnet/
- BCH: https://developer.bitcoin.com/faucets/bch/
Questions? Faucets not working? Email email@example.com!