How to withdraw liquidity from pDEX V2 (after pDEX V3 released)

Hi Incognito liquidity providers,

Since pDEX v3 and a new version of Incognito-Wallet were released, it no longer interacts with the previous version pDEX v2.

The following instructions are for withdrawing your liquidity contributed to pDEX v2, by using the new Incognito command-line tool (a.k.a incognito-cli).

We know this is pretty technical that some of you won’t feel comfortable with, so don’t hesitate to create a ticket for @Support, we will definitely help you with every step to make sure you can get your added liquidity back.

Common Token IDs

PRV 0000000000000000000000000000000000000000000000000000000000000004
USDT 716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0
BTC b832e5d3b1f01a4f0623f7fe91d6673461e1f5d37d91fe78c5c2e6183ff39696 
XMR c01e7dc1d1aba995c19b257412340b057f8ad1482ccb6a9bb0adce61afbf05d4
DAI 3f89c75324b46f13c7b036871060e641d996a24c09b3065835cb1d38b799d6c1
USDC 1ff2da446abfebea3ba30385e2ca99b0f0bbeda5c6371f4c23c939672b429a42
ETH ffd8d42dc40a8d166ea4848baf8b5f6e912ad79875f4373070b59392b1756c8f
BNB(BSC) e5032c083f0da67ca141331b6005e4a3740c50218f151a5e829e9d03227e33e2
LTC 7450ad98cb8c967afb76503944ab30b4ce3560ed8f3acc3155f687641ae34135
DASH 447b088f1c2a8e08bff622ef43a477e98af22b64ea34f99278f4b550d285fbff
ZEC a609150120c0247407e6d7725f2a9701dcbb7bab5337a70b9cef801f34bc2b5c
BUSD(BSC) be02b225bcd26eeae00d3a51e554ac0adcdcc09de77ad03202904666d427a7e4
BNB b2655152784e8639fa19521a7035f331eea1f1e911b2f3200a507ebb4554387b

Instruction overview

  1. Download incognito-cli tool
  2. Get token balances by private key
  3. Get a share of a pair in pDEX v2
  4. Withdraw share
  5. Withdraw earned trading fee

Step by step to withdraw pDEX v2 liquidity

The example below shows steps to withdraw liquidity from the PRV - USDT pair by using the incognito-cli on Windows. You can apply a similar process for other pairs on other operating systems like Linux or MacOSX too.

Note: In the following commands, you should replace PRIVATEKEY with a string you find in the Incognito app (under Keychain > Private key). Similarly, replace ADDRESS with a string you find under Keychain > Your incognito address.

0/ Download incognito-cli tool
Please download the pre-built executable binary of the incognito-cli here or follow this instruction to build your own. NOTE: if you want to withdraw pDEX v2 liquidity or rewards, in Step 4 of Part 1, check out this COMMIT instead of development.

Once the CLI tool is downloaded, you can run it from your command line program as follows:

1a/ Get PRV balance (note: this may take up to 20 minutes for the first run)

PS C:\Users\khanhj\Documents\repo\incognito-cli> .\incognito-cli.exe -c 1 -d 1 balance -p PRIVATEKEY

1b/ Get USDT balance

PS C:\Users\khanhj\Documents\repo\incognito-cli> .\incognito-cli.exe -c 1 -d 1 balance -p PRIVATEKEY --tokenID 716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0

2/ Get your share of a pair

PS C:\Users\khanhj\Documents\repo\incognito-cli> .\incognito-cli.exe -c 1 -d 1 pdeshare --address ADDRESS --tokenID1 0000000000000000000000000000000000000000000000000000000000000004 --tokenID2 716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0

3/ Withdraw your share

In the following command, please replace AMOUNT with a share amount returned from previous step.

PS C:\Users\khanhj\Documents\repo\incognito-cli> .\incognito-cli.exe -c 1 -d 1 pdewithdraw --privateKey PRIVATEKEY --amount AMOUNT --tokenID1 0000000000000000000000000000000000000000000000000000000000000004 --tokenID2 716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0

After 5 minutes, call the get balance command again to see your balance changes or check history on the wallet app.

image

image

4/ Withdraw earned trading fee

  • get the earned fees amount.
PS C:\Users\khanhj\Documents\repo\incognito-cli>  .\incognito-cli.exe -c 1 -d 1 pdelpfee --address ADDRESS --tokenID1 0000000000000000000000000000000000000000000000000000000000000004 --tokenID2 716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0
  • withdraw the earned fees.
PS C:\Users\khanhj\Documents\repo\incognito-cli> .\incognito-cli.exe -c 1 -d 1 pdefeewithdraw --privateKey PRIVATEKEY --tokenID1 0000000000000000000000000000000000000000000000000000000000000004 --tokenID2 716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0
  • check PRV balance again.

image


That’s it.
Thank you for your patience and happy New Year!

6 Likes

Sincerely, up till now I am still wondering why you are allowing us to be passing through this kind tedious stuff.

Something you can simply tell us to withdraw our liquidity before the move, the way you announced to us last year that we shouldn’t do some stuffs when you’re trying to move Provision to pDEX v3!

My question are: are we all developers, are we all have access to PC? Some on this space only have access to mobile phone not PC.

I can’t just vividly understand why we should be passing through stress just because we provide liquidity on this crypto community!

This supposed to be the work of the developers since they failed their duty of announcing to us to remove our liquidity before the final upgrade!

This is not the first Blockchain programme some of us will join and it will not be the last, let’s be nice to ourselves by all means please!

1 Like

@KingOfCrypto,

We have a support ticket open with you and we are awaiting your reply to assist you in the removal of pDEX v2 liquidity.