Post
Topic
Board Trading Discussion
Topic OP
Can a P2P digital currency exchange system be built?
by
anaikh
on 06/01/2014, 06:10:25 UTC
P2P digital currency exchange system

Component: Client+Plugins

Client is used for connencting to other clients and calling. Client will connenct to a network like ed2k for information sharing and build a fair price.

Plugin is digital currency specific, meaning different digital currencies will need different plugin to support. The plugin is used for transfering and inquiry currencies.

How does it work?
A: A_BTC->Temp_BTC->B_BTC
B: B_LTC->Temp_LTC->A_LTC

Let's suppose A wants to change 1BTC to 100LTC and B wants to change 100LTC to 1BTC.

A initiates the transaction.
1a. A inputs B's IP address in client and connects to B. A and B clients will send its own MD5 or whatever info to each other to verify that it is not modified.
1b. A and B can search for the bid and ask in the client network.
2. A inputs his BTC address (A_BTC) and his LTC address(A_LTC) and BTC amount and LTC amount, B inputs his LTC address (B_LTC) and his BTC address (B_BTC) and BTC amount and LTC amount. The clients exchange data and lock the transaction.
3. A inputs codes(A_code) in the client and B inputs codes(B_code) in the client.
4. A clients generates temporary BTC address for A to transfer BTC to. B clients generates temporary LTC address for B to transfer LTC to. The private keys of the address are encrypted by the opponent's codes.
5. A transfers BTC to Temp_BTC and B transfers LTC to Temp_LTC.
6. The clients call the plugin to check the amount in the addresses.
7. If the amounts are exactly the same as inputed in step2, the A will send A_codes again to B client and B client will make the transfer from Temp_LTC to A_LTC. B will send B_codes again to A Client and A client will make the transfer from Temp_BTC to B_BTC.
8. After the transaction, A and B client will broadcast the transaction to the client network. Each client received the information will add it to the previous data and form the fair price.