Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wiki: Update wiki to reflect current DEX client account creation flow #2538

Merged
merged 4 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 18 additions & 95 deletions docs/wiki/Client-Installation-and-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ several blocks.
Windows, `dexc-tray.exe` may be run instead. If using Decrediton instead of
**dexc**, just click the "DEX" tab and skip to step 3.

**Note**: You can start dexc with another network via a command line flag:
`--testnet` or `--simnet`, the default is `mainnet`.

2. In your web browser, navigate to <http://localhost:5758>. Skip this step if
using Decrediton.

Expand All @@ -95,109 +98,29 @@ several blocks.
NOTE: Checking the "Remember my password" box only applies to the current
session. It is easiest for most users to have it checked.

4. Choose the DEX host that you would like to use. Either click one of the
pre-defined hosts, or enter the address of a known host that you would like
to use.

<img src="images/add-dex-reg.png" width="320">

NOTE: If you just want to view the markets without being able to trade, check
the "No account" box. You will have an opportunity to create an identity
later, but the remaining steps assume you are preparing to trade.

5. The DEX host will show all offered markets, and a choice of assets with which
you can lock in a bond to enable trading. Select the asset you wish to use.

<img src="images/choose-bond-asset.png" width="400">

NOTE: A dedicated wiki page describing time-locked fidelity bonds will be
created, but in short, fidelity bonds are funds redeemable only by you, but
in the future. Having a potential trader lock some amount of funds before
placing orders is an anti-spam mechanism to combat disruptive behavior like
backing out on swaps.

6. Choose the type of wallet to use. In this screenshot, we choose a native BTC
wallet and click "Create!". The wallet will begin to synchronize with the
asset's network.

<img src="images/create-btc.png" width="360">

NOTE: This is your own **self-hosted** wallet. The wallet's address keys are
derived from the DEX application's "seed", which you may backup from the
Settings page at any time. Further, no central wallet backend service is
involved, only the nodes on the coin's decentralized network.

7. The next form will show you synchronization progress, and give you the first
deposit address for the wallet and the minimum amount you should deposit to
be able to create your first bond in the next step, which is required to
place orders. **This is your wallet**, so deposit as much as you like! After
sending to your address, the transaction **must confirm** (i.e. be mined in a
block) before the form will update your balance. This form will be skipped if
the wallet is already funded and synchronized.
4. After creating your app password, you'll be taken to the `Quick Configuration` form:

<img src="images/sync-fund-btc.png" width="360">
<img src="images/quick-config.png" width="350">

**IMPORTANT**: This is your own local wallet, and you can send as much as you
like to it since *only* the amount required for the bond will be spent in the
next step. The remaining amount, minus a small reserve for future bond
transactions, will be in your available balance. For example, you can send
yourself 5 BTC and only the required amount (0.0014 BTC in the case pictured
above) will be spent to create the bond in the next step, with an equivalent
amount plus fees in reserves. The remainder goes to your available balance,
which can then be traded, sent, or simply held in the wallet.
The selected native wallets will be created for you and you'll be connected
to the selected DEX server when you submit the form.

You may disable future bonds at any time by changing the "Target Tier" to 0
in the "Update Bond Options" form accessible from DEX host settings form
accessible from the Settings page. This will return any reserves to the
available balance. Any active bonds will automatically be refunded when their
lock time expires (currently 2 months after creation).
**Note**: If you encounter an error about not being able to connect to the
selected DEX server during the quick configuration, you can manually [add the DEX server](https://github.com/decred/dcrdex/wiki/DEX-Trading-Account-Management#adding-a-dex-trading-account). You will see a list of known DEX server(s) you can choose from.

NOTE: The native Litecoin and Bitcoin Cash wallets connect to full nodes on
the blockchain network that have "compact block filters" enabled. It may take
time for the wallet to crawl the network until it finds such nodes. Be
patient; otherwise you can bootstrap the process using a known seed node such
as the Litecoin nodes on [this list](https://gist.github.com/chappjc/d0f26b12258f8531bb78b37f38d080a0).
5. Backup your app seed. This seed is used to restore your DEX accounts and any
native wallets, so keep it safe.

8. Once the wallet is synchronized and has at least enough to create your
time-locked fidelity bond, the form will update, and you should click the
button to create and broadcast your bond transaction.

<img src="images/register-button.png" width="360">

After proceeding, the available balance will be the amount you deposited
in the previous step minus this bond amount and transaction fees.

9. You will then be taken to the **Markets** page, where you must wait for
confirmations on your bond transaction:

<img src="images/wait-for-confs.png" width="360">

While waiting, you may create additional wallets either directly from the
displayed market or on the Wallets page accessible from the navigation bar at
the top. This is also a good time to retrieve your application "seed", as
described in the next step.

After the transaction is confirmed, the application will submit the bond for
validation and you will be ready to trade:

<img src="images/bond-accepted.png" width="360">

It is recommended to export bond information whenever they are created since
they are not automatically restored from just the application seed. Do this
using the "Export Account" button of the DEX host settings accessible from
the Settings page. If you restore from seed in the future: create the same
wallets, add the same DEX host, and *then* import the bonds from this backup.

10. At any time you can go to the Settings page via the "gears" icon in the top
navigation bar to retrieve the application seed that was generated when
initializing the application in the first dialog. This seed is used to
restore your DEX accounts and any native wallets, so keep it safe.
If you skip this step now (not recommended), you can go to the Settings view
via the "gears" icon in the top navigation bar to retrieve your application
seed later.

<img src="images/view-seed.png" width="360">

11. That's it! Use the Buy/Sell form on the Markets page to begin placing
orders. Go to the Wallets page to obtain addresses for your wallets so that
you can send yourself funds to trade.
6. That's it! You'll be redirected to the wallets page after step 4 above.

7. To start trading, follow the guide to [Setting Up Your DEX Trading
Account](https://github.com/decred/dcrdex/wiki/DEX-Trading-Account-Management).

## Advanced Client Installation

Expand Down
140 changes: 111 additions & 29 deletions docs/wiki/DEX-Trading-Account-Management.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,123 @@ In this guide, we will discuss how you can manage your DEX Trading Account.

Let's get started!

## Prerequisites

This guide requires that you've followed the steps in the [Initial Setup
Guide](https://github.com/decred/dcrdex/wiki/Client-Installation-and-Configuration#initial-setup)
or you've already setup your DEX client. If not, please do before proceeding.

## Setting Up Your DEX Trading Account

Before you can start buying and selling on Decred DEX, you'll need a DEX trading
account. If you've already followed all the steps in the [Initial Setup
Guide](https://github.com/decred/dcrdex/wiki/Client-Installation-and-Configuration#initial-setup), you're all
set. If not, let's create your DEX trading account together:
account.

1. Go to the `Markets` Page.
2. Find the `Create Account` button and click it.

<img src="./images/create-account-market-page.png" width="300">

3. Follow the steps in the [Initial Setup Guide](https://github.com/decred/dcrdex/wiki/Client-Installation-and-Configuration#initial-setup) from step 4.
3. The DEX host will show all offered markets, and a choice of assets with which
you can lock in a bond to enable trading. Select the asset you wish to use.

<img src="images/choose-bond-asset.png" width="400">

**NOTE**: A dedicate wiki page describing time-locked fidelity bonds will be
created, but in short, fidelity bonds are funds redeemable only by you, but
in the future. Having a potential trader lock some amount of funds before
placing orders is an anti-spam mechanism to combat disruptive behavior like
backing out on swaps.

4. If you already created the selected asset wallet, you'll **skip this step**.
Choose the type of wallet to use. In this screenshot, we choose a native BTC
wallet and click "Create!". The wallet will begin to synchronize with the
asset's network.

<img src="images/create-btc.png" width="360">

5. The next form will show you synchronization progress, and give you the
deposit address for your wallet and the minimum amount you should deposit to
be able to create your first bond in the next step, which is required to
place orders. After sending to your address, the transaction **must confirm**
(i.e. be mined in a block) before the form will update your balance. This
form will be skipped if the wallet is already funded and synchronized.

<img src="images/sync-fund-btc.png" width="360">

**IMPORTANT**: This is your own wallet, and you can send as much as you
like to it since *only* the amount required for the bond will be spent in the
next step. The remaining amount, minus a small reserve for future bond
transactions, will be in your available balance. For example, you can send
yourself 5 BTC and only the required amount (0.0014 BTC in the case pictured
above) will be spent to create the bond in the next step, with an equivalent
amount plus fees in reserves. The remainder goes to your available balance,
which can then be traded, sent, or simply held in the wallet.

You may disable future bonds at any time by changing the "Target Tier" to 0
in the "Update Bond Options" form accessible from DEX host settings form
accessible from the Settings view. This will return any reserves to the
available balance. Any active bonds will automatically be refunded when their
lock time expires (currently 2 months after creation).

**NOTE**: The native Litecoin and Bitcoin Cash wallets connect to full nodes on
the blockchain network that have "compact block filters" enabled. It may take
time for the wallet to crawl the network until it finds such nodes. Be
patient; otherwise you can bootstrap the process using a known seed node such
as the Litecoin nodes on [this list](https://gist.github.com/chappjc/d0f26b12258f8531bb78b37f38d080a0).

**IF** you've already created the wallet you plan to use and funded it with the
required bond amount, you can skip steps 6 and 7 of the [Initial Setup
Guide](https://github.com/decred/dcrdex/wiki/Client-Installation-and-Configuration#initial-setup).
6. Once the wallet is synchronized and has at least enough to create your
time-locked fidelity bond, the form will update, and you should click the
button to create and broadcast your bond transaction.

<img src="images/register-button.png" width="360">

After proceeding, the available balance will be the amount you deposited
in the previous step minus this bond amount and transaction fees.

7. You will then be taken to the **Markets** page, where you must wait for
confirmations on your bond transaction:

<img src="images/wait-for-confs.png" width="360">

While waiting, you may create additional wallets either directly from the
displayed market or on the Wallets page accessible from the navigation bar at
the top.

After the transaction is confirmed, the application will submit the bond for
validation and you will be ready to trade:

<img src="images/bond-accepted.png" width="360">

It is recommended to export bond information whenever they are created since
they are not automatically restored from just the application seed,
[Exporting your DEX Trading Account](#exporting-your-dex-trading-account)
section will show you how to. If you restore from seed in the future: create
the same wallets, add the same DEX host, and *then* import the bonds from
this backup.

That's it! Use the Buy/Sell form on the Markets page to begin placing
orders. Go to the Wallets page to obtain addresses for your wallets so that
you can send yourself funds to trade.

## Exporting your DEX Trading Account

If you want to use your DEX trading account on another device, you'll need to
export it. Here's how you can do it:
If you want to use your DEX trading account bond(s) on another device, you'll
need to export it. Here's how you can do it:

1. Go to the `Settings` Page.
2. Click on the DEX account in the `Registered Dexes` list. In this example, it
will be `dex.decred.org:7232 ⚙️`

<img src="./images/dex-account-settings.png" width="300">

3. On the DEX account settings page, click `Export Account`.
4. Select the directory where you want to save the `.json` file.
<img src="./images/dex-account-settings.png" width="360">

**Note**: Make sure to keep your exported account file safe. Anyone with access
to this file can use your DEX trading account.
3. On the DEX account settings view, click `Export Account`.
4. Select the directory where you want to save the `.json` file. Make sure to
keep your exported account file safe.

## Adding an existing DEX Trading Account
## Importing an existing DEX Trading Account

If you have an existing DEX account that you want to use with a new setup, here's how you can do it:
If you have an existing DEX account that you want to use with a new setup,
here's how you can do it:

1. Go to the `Settings` Page.
2. Click on `Import Account`.
Expand All @@ -61,44 +140,47 @@ Easy as that!
If you want to temporarily disable your DEX trading account, follow these steps:

1. Visit the DEX account settings as in [Exporting your DEX Trading Account](#exporting-your-dex-trading-account)(**Step 1 and 2**).
2. On the selected DEX account settings page, click on the `Disable Account`.
2. On the selected DEX account settings view, click on the `Disable Account`.
3. Confirm the action with your app password.

If successful, the DEX trading account **will not be listed until it is added again**.

**Note**: Keep in mind that you can't disable your account if you have active
orders or unspent bonds.

## Re-enabling a DEX Trading Account
## Adding a DEX Trading Account

If you disabled your account but want to re-enable it:
To add a new DEX server:

1. Go to the `Settings` page.
2. Click on `Add a DEX`.

<img src="./images/add-dex-account.png" width="300">

3. Choose the DEX host you previously disabled. You can click on a pre-defined
host or enter the address of the host after clicking on the `add a different
server` button.
3. Enter the address a known DEX server that you would like to use. and select
the DEX server TLS file after clicking on `add a file`.

<img src="images/add-dex-reg.png" width="320">
<img src="images/add-dex.png" width="320">

Your old account will be automatically discovered and enabled.
**NOTE**: If you just want to view the markets without being able to trade,
check the "No account" box. You will have an opportunity to create an
identity later, but if you are ready to trade [follow the remaining
steps](#setting-up-your-dex-trading-account).

**Note**: Remember, after re-enabling, you'll need to create fidelity bonds to
use your account again.
If you had an account with the newly added DEX server, it'll be automatically
discovered and enabled but you you'll need to create fidelity bonds to trade
with your account.

## Managing your DEX Trading Account Tier

To manage your DEX trading account tier, here's what you need to do:

1. Visit the DEX account settings as in [Exporting your DEX Trading Account](#exporting-your-dex-trading-account)(**Step 1 and 2**).
2. On the DEX account settings page, click `Update Bond Options`.
2. On the DEX account settings view, click `Update Bond Options`.
3. Choose the asset for your fidelity bonds and set your `Target Tier`.
4. Click `Submit` to update your bond options.

**Note**: Make sure you have enough funds to cover your desired `Target Tier`.
**Note**: Make sure you have enough funds to cover your `Target Tier`.

## Wrapping Up

Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/Native-BTC-Wallet-Recovery-and-Rescanning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Opening the BTC Wallet Settings

In this guide, we will be using the Native BTC wallet that is built into DEX and you should learn how to navigate to the settings page. The settings page is where you can reinitialize the wallet, rescan the wallet, etc.
In this guide, we will be using the Native BTC wallet that is built into DEX and you should learn how to navigate to the settings view. The settings view is where you can reinitialize the wallet, rescan the wallet, etc.

1. Navigate to the `Wallets` page (`/wallets`) and select the Bitcoin wallet if it is not already selected.
2. Click the `Settings` button that has a gears icon to open the settings dialog.
Expand Down
Loading
Loading