How do you exchange coins to other people? Interested how the algorithm works.
Do you have to trust the person you're exchanging with? How does it ensure that Barry doesn't steal Linda's funds after she sends first?
There isn't a way to to ensure Barry doesn't steal Linda's funds after she sends first. However, When both Linda and Barry created their accounts, they also created a public and private key pair. All data sent between nodes is signed, so Linda knows Barry is really the one who made the offer in the first place. And Barry knows Linda is really the one who accepted the offer. After that, Linda and Barry must trust each other to complete the trade and not run off with each others funds. The public keys are visible in the application, so it's possible to recognize someone by their name and public key.
In the future, I plan to implement a trust system which will allow Linda and Barry to rate how much they trust each other. They can then use that system determine how much they are willing to risk in a trade. With the trust system, Linda may also be able to tell how much she is willing to trust Steve based on Barry's trust rating for Steve.
The specific algorithm for making a trade is:
1. Barry creates an offer. (An offer is created in Dark Exchange)
2. Linda does a search and finds Barry's offer. She then accepts the offer. (A trade is created in Dark Exchange)
3. Barry verifies Linda is someone he wants to trade with, and confirms the trade.
4. Linda sends the payment, then lets Barry know she sent the payment by opening the trade and pressing the Payment Sent button. (updates the trade as payment sent.)
5. Barry verifies Linda sent the payment and updates the trade as payment received.
6. Barry sends his payment to linda, and updates the trade as payment sent.
7. Linda verifies she has received the payment from Barry and updates the trade as payment received.
8. The trade is complete, and it closed.
This is currently a very manual process, but I hope to integrate Dark Exchange better with Bitcoin and services like Dwolla to hopefully make some of the updates automatic.