Darkcoin developer Evan Duffield is one of the most ingenious developers the world of cryptocurrency and altcoins has ever seen. After delivering some very solid anonymity tech over the past few months, and now, a new featurd called “change contracts using atomic transfers” is in the pipelines. Let’s see what this is all about then, shall we?
This new development comes on the heels of developing an anonymous currency, and then noticing you somehow have to account for dealing with change. Change as in, someone pays for a transaction by using DarkSend. However, the user has overpaid for said transaction, and needs to get change back.
While the funds sent from user A to user B are completely anonymous, the change user A will receive from user B might get recombined with their funds. This type of “transaction link” is called “forward linking”. To put it in regular English : the change can be linked to the original amount being sent, thus removing the anonymous part from the equation.
In order to solve this issue, Mr. Duffield is working on something new : making a cryptocurrency that pays change just like the real world. Keep in mind the entire system of anonymity has to remain trustless, exactly the way it is now. A concept has been proposed which would look as follows :
User A wants to buy a laptop from Merchant B for $96 (in dollars to make it easier).
1: User (A) publishes a message to Merchant (B), saying I’ll pay you $100 if you pay me back $4
2: (B) signs this message, returning it to (A). This is the contract.
3: A makes TX1 (pay $100 to B, only good if B pays A). A provides TX1 to B
4. B makes TX2 (pay $4 to A, only if A pays B). B provides TX2 to A
5. A & B make TX3 (A pays B $96) and TX4 (B pays A $4)
6. A & B publish TX3 & TX4
If TX3 & TX4 are both published, then the change went through.
If either is not published A or B can publish TX1 or TX2 to ensure they receive the money.
Once everything is said and done, change contracts would allow users to receive money in change which has no relationship to the money you sent earlier. In order to achieve this , transactions will be split in two separate unlinkable transactions. Thanks to the high quality of mixing of funds taking place, change contracts are very similar to traditional cash.
These change contracts will take place at a protocol level and, and they will be almost completely automatic. Merchants will receive change contracts and approve them, automatically completing steps 1 through 4 of the aforementioned example.
Furthermore, once the merchant signs the change contract and publishes TX1 and TX2, there is no way to back out of the contract. It is the responsibility of merchants to verify the amount is correct in correlation to the merchandise being purchased.