Cross-pair trading is live!

Thank you for your patience – Trade is officially back in your app, along with one of our favorite features to date…

Cross-pair trading :fire:

Previously, if users wanted to trade a non-PRV pair, they needed to conduct 2 trade transactions, e.g. Token 1 -> PRV, then PRV -> Token 2.

Cross-pair trading now allows users to trade Token 1 directly to Token 2, making the PRV intermediary step invisible. This means expanded trading options for users and a much simpler process for non PRV pairs. Starting now, users can trade across pDEX pools to tap into larger liquidity while still enjoying low network fees.

Of course, this is just the beginning. We’ll be continuing to work towards bigger liquidity to deliver better prices, less slippage, and all that good stuff.

We hope you enjoy the new Trade. Let us know if you have any questions!

45 Likes

Awsome news! Things are coming along so well. Thanks for all your hard work! Lmk if you want to brainstorm on ui stuff.

UX thoughts:
I know there’s reasons for not showing dollar amounts yet. But when I’d trade on other wallets I hate having to go google to double check exchange rates to make sure I’m getting a good trade.
If I see a few dollars dropping in The app I may or may not use it for one specific trade, but certainly ill use it other times, no big deal because everything is transparent.

But if I find out that I am getting a bad deal because I checked the numbers against coin market cap because the app is unclear, then I will feel like things are being hid from me -and I will loose trust in the app.

I’ve been telling all my friends to use this app. I’m so happy with all the progress being made!

10 Likes

JoyRaptor hit it right on the head big time…

The more transparent then indeed the less work in a way the end user has to do as to being confident about the numbers and therefore the greater the trust in the app… :sunglasses:…and indeed it will be nice to see the finished product

2 Likes

Super! :slight_smile: This implementation will make the users experience easier!
We can also attract a bigger audience in this way…

5 Likes

Hey @ning, I think this is a bug/feature of Discourse. You have updated the post to announce that the cross-pair trading is live. However, its visibility is low since this update is not seen after tapping ‘Latest’ or ‘New’ menu item. This is not specific just to this post. This situation makes following the forum difficult for the people using ‘Latest’ menu item like me :slight_smile: If there was a setting and you modified it, I would be so glad. Thanks.

2 Likes

ah yes - topic edits don’t bring it to the top of latest, but new posts do. (so thanks for yours!). there’s no easily modifiable setting, but i suppose it would be pretty hectic if edits always registered as new topics in latest, so this feature generally makes sense.

for situations like this though (official announcements/important news), the simplest fix would be for us to also write a brief post drawing attention to the update, or just create a new topic entirely. will let the team know.

thanks!

5 Likes

Hey @ning, could you share RPC API for the cross-pair trading? If possible, an example with its parameters filled in? Thanks.

1 Like

Hi @abduraman, you can find the payload examples for pdex trading RPC as follows:

  • PRV -> pToken
    Screen Shot 2020-08-31 at 6.58.18 AM

  • pToken -> pToken
    Screen Shot 2020-08-31 at 7.01.02 AM

Sorry, it looks like Discourse doesn’t support something like code embedding so for better appearance, I was taking screenshots and pasting here…

Btw for security reasons, we should not make API calls to these RPCs directly but should create transactions at client-side by using Incognito SDK and then broadcast to the network (unless you have your own fullnode)

5 Likes

No problem. I had already found it but you replied first :slight_smile:

Could you share a sample code on how to embed it into Incognito SDK? https://sdk-docs.incognito.org does not have enough documentation or I cannot find the related part. There is just requestTrade function. Does it work for all cases (I mean cross-pair trading)? @duc

Since mainnet.incognito.org/fullnode runs on SSL, couldn’t we assume that we have at least SSL-level security? I mean my RPC calls aren’t just plain texts, are they?

1 Like

SSL just protects your data on the wire but how do you know a fullnode owner doesn’t log your payload on his server?
Regarding Incognito SDK, you can DM @binh, he is tech lead of app team, he will support you on this much better than i will.

3 Likes

Oh, see. Please say “we do not log them” to me :joy:

1 Like

Is the team working toward making the pDex independant of other protocols like uniswap and kyber? Don’t get me wrong, I love that I can use the app to shield my interactions with said protocols but with the tx fees currently skyrocketing on those platforms it would be awesome to have the option for people to provide liquidity on the pDex and perhaps attain the level of liquidity of uniswap so we can trade without the fees. I guess I’m just wondering if this the goal of the pDex by continuously adding more coins to provide v2?

5 Likes

Hey @duc,

About this, I’ve found the related part in SDK code. However, one point is stuck in my mind. SDK encodes tx requests (authorized ones) but I can send un-encoded tx requests as well. The full node forwards them to the validator nodes. In that case, do the validator nodes understand both forms, or do the full node encode the unencoded ones and then forward to the validator nodes? Thanks.

2 Likes

hey @abduraman, if you create a raw tx at the client-side (by using SDK) then you don’t need to attach your private key to the request, just broadcast the newly created raw tx to the network through a fullnode. Otherwise, a private key would be required for creating raw tx on fullnode then broadcast it to the network.

3 Likes

What do you mean by “it would be awesome to have the option for people to provide liquidity on the pDex”

Something different from what is already available by use of the “Add” feature?

2 Likes

Hi guys, I have success sending trade transactions using SDK2 (javascript), but only between PRV and others tokens and back to PRV. If a try to trade, for example, pBTC-pUSDT, I can see a transaction submmited, the pBTC balance reduces, but then all values are reverted. I have set only “nativeFee” and keep zero for “privacyFee” and “tradeFee”. How can I verify a transaction status by it txId ?

transaction output:
Privacy token b832e5d3b1f01a4f0623f7fe91d6673461e1f5d37d91fe78c5c2e6183ff39696 sent trade request ({“tokenIdBuy”:“716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0”,“sellAmount”:“62945”,“minimumAcceptableAmount”:“0”,“nativeFee”:“40”,“privacyFee”:“0”,“tradingFee”:“0”})

1 Like

Hi @pfrp, currently cross trade in SDK is not updated, we will do it soon and report again later. Thanks.

1 Like

SDK has been updated. Please update sdk to the latest version (1.3.1).

4 Likes

Hi Tien,

I have tried with "yarn add https://github.com/incognitochain/sdk-v2#develop" and " `yarn add https://github.com/incognitochain/sdk-v2". Both versions are returning error on "nativeToken.requestTrade":

Invalid info param!
[Error]2021-01-20T19:35:35.122Z - Native token sent trade request failed (Can not init transaction)
error: Error: Can not init transaction
at Object. (/home/paulo/Projects/IncWallet2/node_modules/incognito-js/build/node/index.js:2:177694)
at /home/paulo/Projects/IncWallet2/node_modules/incognito-js/build/node/index.js:2:173688
at Object.next (/home/paulo/Projects/IncWallet2/node_modules/incognito-js/build/node/index.js:2:173793)
at o (/home/paulo/Projects/IncWallet2/node_modules/incognito-js/build/node/index.js:2:172506)
at process._tickCallback (internal/process/next_tick.js:68:7)

Please send me the params you passed to the requestTrade.

1 Like