Idea for wallet functionality

I was thinking about the structure and functionality of the incognito wallet/pdex/dapp and about all the potential possibilities that it offers. So I had an idea that the wallet could offer it’s users that not many other wallets can offer. That is the ability to swap currencies on-chain. So we already know that we can send and receive ptokens in-network to other incognito wallet users privately. But what if someone is paying you but you don’t want the coin that they want to pay you in? Normally you might tell them to swap it for a coin that you do want before sending it, or you would receive the coin and then do the swap yourself. What if there was a option to set your wallet to have preferred coins? A setting that whenever you received a payment, the wallet automatically converted the payment into another coin that you prefer or, even better, a certain preset percentage of multiple coins? This would be a really cool and time-saving function that I’m sure a lot of people would appreciate.

What do you guys think?

3 Likes

The theory is nice, but would it work in practice?
Say I need to pay you 3 ETH, but you only want BTC.
I send you 3 ETH. The system uses PDEX(?) to swap the ETH for BTC, not taking in account the current rate or liquidity. You could lose money on a trade like that.

Or how would you take care of that?

3 Likes

If you wanted to implement a feature like this, perhaps automatically converting to PRV might be the option. However for smaller non mainstream coins, if its all automatic, you would definitely end up losing money without large amounts of provided liquidity for that coin.

I think you could probably add this as a special shielding feature. When you shield a coin, you could have the option to generate an automatic trading contract instead. The temporary shielding address would send the crypto directly to a (pCoin -> PRV) trade request instead of your wallet. This could save a lot of time when your trying to swap and move money around. Your wallet would then receive the shielded funds as PRV.

Another feature would also be automatic cross coin trades. If you want to trade pETH for pBTC all you have to do is request the trade. Your pETH would be automatically traded for PRV, and then that PRV would automatically be traded for pBTC. It would be much better if you didn’t have to do it manually all the time. The fees could be higher for a trade like this. Though before execution of trade, you would have to calculate all the fees and slippage for both trades, but I think it’s doable.

I believe that to be what we call cross pool trading, it is in the works and mentioned in the latest newsletter post.

1 Like