How pDEX exactly works?

I have seen that all trades take 4 blocks to receive a response. Why?

bildo

2 Likes

Because the team uses centralized accounts to be the middle men in all pdex interactions . As it scales they need to add more accounts and proxies because the codebase cannot handle that much throughput from 1 wallet by design. You as a user have NEVER had a direct interaction with the pdex without your hard earned money going through MANY layers of team controlled wallets (not your keys, not your crypto) thus, the pdex and adding liquidity has always been fraudulently represented and marketed. When the team controlled proxies start breaking down resulting in trades not returning to users, they had to fess up and admit this.

@J053 now if you were the mitm I’d say you can also have the advantage of front running, manipulating trades, manipulating liquidity, trust is lost. Also privacy suffers as you are doxxing your trader address to the team wallet server

1 Like

Thanks for your answer, but I used the RPC, not the app, and even then it takes 4 blocks.
Would you say that, even if I use the RPC, will my trade be managed by a centralized account?

1 Like

Hi @J053,

Thanks for having a good question. Assume that we have many different trading transactions in 8shards, here is the processes:

  • shard validators confirm a block (that have trading tx)
  • beacon confirm shard block, extract trading tx in shard block
  • beacon sort the list of trading transactions, base on pair id and trading fee
  • beacon process approve/reject the list of trading transaction
  • for trading transaction that get approved, beacon create instruction to shard that init the trading transaction, tell that shard to mint buy-token for user (to payment address)

In ideal environment, this process took 2 blocks shard and 1 block beacon. However, to prevent fork and ensure security, the trading tx must be in block has final view (usually need 1 block confirmation). That’s why you see the trade took up to 4 blocks.

Cheers~

5 Likes

And in addition, when you use RPC to issue a trade tx, there’s no centralized temporary account that takes part in the trading process.
However, in privacy v1, trading tx is not privacy, meaning it’s traceable. That’s why the app (for now) has to transfer your fund to a temporary wallet to trade, then transfer it back to your account.
With the upcoming privacy v2, the problem above will be resolved and then we will have the next level of privacy.

2 Likes

Thanks!
This part is interesting.

That makes a lot of sense.

1 Like