I'm not a developer and I haven't seen anything like it described anywhere. I believe it is a concept that could potentially solve some of the problems regarding anonymity, centralized coin exchanges, trust and cost of exchange listings for new coins and tokens. The idea would work great as an open source creative commons project.
WalletSwap could work as an alternative to atomic swaps. Atomic swaps use a method of hashed timelock transaction and is a brilliant idea and would have applications beyond what wallet swap would be capable of.
WalletSwap literally swaps the wallets and also removes the need for trust. It has one key advantage - it is super simple. It eliminates the need for actual wallets - since the keys can potentially be imported to a private wallet.
It is not intended as a solution for every situation. It would be an easy to deploy peer to peer vending machine for coins.- supplementary to other exchanges.
The users only receive the private keys if they cancel the wallet or a completed sale is confirmed by the network as well as both the buyer and the seller.
The application can be built to be part of a blockchain or a side chain.
How “WalletSwap” works:
Each party has an client application that generates public and private keys.
Each party application sends a signed message and public key to the network to initiate the process.
A wallet is created by the network. The wallet address is disclosed to the party that initiates the transaction and this address is used to deposit coins.
The client application allows the user to set the sale price. It also contains funtions to “alter price’, “purchase from dex (buy)”,“withdraw and cancel” and “confirm sale”. More functions could be added.
Rather than have a fee based on the size of the transaction – each message sent carries a small fee.
Party “A” sends the required amount to the wallet that was initiated by his client application and generated by the network. and “sets the price”.
Party “B” agrees to the price and sends the required amount to the wallet that was initiated by his client application and generated by the network.
The network checks for network confirrmations on each blockchain and when confirmed sends a message to the users to “confirm” the transaction. The application can be set to “auto cornfirm” and rely on the network check or the user can manually check the transaction of the other party on the blockchain. (This could be set to manually confirm as well in a simple setup)
Once both client applications confirm the transaction the client application process is locked and the transaction can no longer be cancelled.
Party “A” receives the private key to party “B”s wallet from the network.
Party “B” receives the private key to party “A”s wallet from the network.
If however prior to confirmation either party cancels the transaction – cancelling the transaction allows the party to withdraw the funds from their wallet. The process is locked and the party receives their wallet private key.
So if party “A” cancels their transaction before it is confirmed by both parties. Party “A” receives the private key to party “A”s wallet. Wallets are once only use. Once a private key is disclosed it is no longer available for use on the system.
The user can use the public key on the integrated wallet of the client application or export the private key data to an external wallet.
Funding for the Dex process can be from a user token wallet that requires payment for “generating a wallet address”, “altering price”, “confirming the sale” or “cancelling the transaction”. Each being a signed and encrypted message sent to the network.
A wallet swap dex can have a smart contract that allows coin developers to set up their own vending system. This allows the wallet swap dex to operate as a vending machine for new coins and tokens.
A coin developer would set the prefix of their wallets and nodes for their block explorer. It would make coin developers responsible for their own coin network. It would also eliminate issues for coin developers where exchanges are sometimes slow to update their wallets.
The client application could contain a custom coin wallet or it can just provide a private key that can be imported into the coins own developed private wallet.
It could be used for lots of other potential purposes as well.
Escrow of crypto securities
Derivative trading
Wallet swap would allow the “vending machine” to be integrated into any coin networks website. Allowing new coins or tokens to have their own instant exchange site.
Because the exchange only requires a wallet address to be generated – it would automatically be able to be used by the majority of coins that use a qt wallet.
WalletSwap could take the form of a clunky basic service that just swaps the private keys or more elaborate form that incorporates its own wallet for each coin it is capable of exchanging.
For the purpose of the illustration I have called the blockchain that performs the WalletSwap process "dexcoin".
I have some other variations of this model as well but I was keen to see if there was any interest in such a process.