πŸ›‘-How-to Close Shop
This guide is written for anyone looking to "close shop", to withdraw all funds from an opendex environment.

Close Shop

Enter your environment via:
1
bash ~/opendex.sh
2
1) Simnet
3
2) Testnet
4
3) Mainnet
5
Please choose the network: 3
Copied!
Stop arby to prevent it from issuing orders:
1
stop arby
Copied!
Close all BTC & LTC channels:
1
lndbtc-lncli closeallchannels
2
lndltc-lncli closeallchannels
Copied!
Check your ETH/ERC20 channel balances with getbalance and close channels using the full channel balance in the following command:
1
closechannel ETH --amount 0.5234
2
closechannel USDT --amount 124.12
Copied!
getbalance should now show all channel balances as 0. Once your ETH/ERC20 channel balances are available as Wallet Balance (Not Tradable), you can import your seed/private key into a wallet like metamask. To do this, run the following command and follow the instructions:
1
getethmnemonic
Copied!
Once your BTC and LTC channel balances are available as Wallet Balance (Not Tradable), run:
1
lndbtc-lncli sendcoins --sweepall --addr <YOUR_EXTERNAL_BTC_ADDRESS>
2
lndltc-lncli sendcoins --sweepall --addr <YOUR_EXTERNAL_LTC_ADDRESS>
Copied!
One more check that all balances are indeed 0 with getbalance and you can safely down and delete your environment.
Last modified 1mo ago
Copy link
Contents
Close Shop