Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
Update info on how to add a new token pair with dx-contracts script
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sánchez committed Feb 14, 2019
1 parent f0e33dc commit e067a55
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions source/add-token-pair.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ of the deployed [**DutchExchangeProxy.sol**](https://github.com/gnosis/dx-contra

## SUMMARY of the process of adding a token
> **IMPORTANT**: Before you add a token
> * It is recomended to add it in Rinkeby first (See
> * It is recomended to add it in Rinkeby first (See
> [Rinkeby contract addresses](https://dutchx.readthedocs.io/en/latest/smart-contracts_addresses.html#rinkeby))
> * Make sure there's market makers and arbitrage bots before adding a market
> * Make sure there's market makers and arbitrage bots before adding a market
> (See [Run your own bots on the DutchX](https://dutchx.readthedocs.io/en/latest/bots-market-making.html))
> * You can do this process manually, interacting directly with the contracts,
> * You can do this process manually, interacting directly with the contracts,
> however, we provide a CLI and truffle scripts that will make it simpler and they
> will do some validations before sending the transaction.
> * If you require help, check out this section on
> * If you require help, check out this section on
> [market makers](./market-makers.html#looking-for-market-makers).
To add a token pair, follow this steps:
* Make sure you have the address of the [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md)
token and `$10.000` worth of [WETH](https://weth.io/) (it'll be used for
token and `$10.000` worth of [WETH](https://weth.io/) (it'll be used for
the first auction, so you'll get it back after is cleared)
* Set an allowance for the DutchX (proxy), so it can take the required amount of
WETH when you call the deposit function (call `approve` function in WETH contract)
* Deposit the WETH into your DutchX balance (call the `deposit` function in the DutchX proxy)
* Add token pair (call the `addTokenPair` function in the DutchX proxy)
* Make sure now your token is listed, for example using the API [https://dutchx.d.exchange/api/v1/markets](https://dutchx.d.exchange/api/v1/markets)
* 🎉Celebrate
* 🔈Spread the work so sellers/bidders participate in the new market
* 🔈Spread the work so sellers/bidders participate in the new market
* 📈 Run bots and arbitrage bots to ensure there's a market

## 1. Get the information for adding a token pair
Expand Down Expand Up @@ -175,8 +175,7 @@ npm run restore

**2. Create a file with the information required for the operation**
* Read the required information in the previous section
* You can use [01_RDN-WETH.js](https://github.com/gnosis/dx-contracts/blob/master/test/resources/add-token-pair/mainnet/01_RDN-WETH.js)
and [WETH_RDN.js](https://github.com/gnosis/dx-contracts/blob/master/test/resources/add-token-pair/mainnet/WETH_RDN.js)
* You can use [WETH_RDN.js](https://github.com/gnosis/dx-contracts/blob/master/test/resources/add-token-pair/mainnet/WETH_RDN.js)
as an example on how to provide the information.
* Save your config file in the current directory, for example `ABC-WETH.js`

Expand All @@ -197,6 +196,9 @@ If everything went smoothly, you should now be able to execute it for real.
Otherwise, the command will tell you what is the problem and what you need to
do in order to solve it.

> Please make sure that you provide the correct route to your token pair file.
> This route should be relative to project root `dx-contracts`
**4. Run the script without the dry-run**:
```bash
MNEMONIC="your secret mnemonic ..." npm run -- add-token-pairs -f ./ABC-WETH.js --network mainnet
Expand Down

0 comments on commit e067a55

Please sign in to comment.