Waivio

Recommended Posts

Preventing Future Problems By Pretending to be Bad

0 comments

leprechaun433.529 months agoPeakD2 min read

https://media.tenor.com/CqlRPTAlPcIAAAAC/tom-and-jerry-tom.gif

My previous article here, sets up an atomic swap between Hive dollars and Bitcoin. However, there were several problems with it. Nobody commented or pointed them out to me. Using A, B, D and C, is what is used in the Hearn algorithm source but it isn't as easy to follow as using Alice, Bob, David and Carmen. There is a practical benefit to having an even mix of male and female names. The pronouns allow the description to be less wordy. Unfortunately, There were errors that were made when I re-indexed the transactions, so I had put TX3 when I meant to have TX5.

Apart from these problems there were logical errors. The traders could steal the account and Alice could defraud Bob.
 Alice and Bob could conspire to steal the borrowed Carmen Hive account by changing its active keys while they borrow it. The transaction meant to return Carmen to David would fail should they do that. So it seems they should leave David a deposit to prevent this or use a 3 of 3 multisig where David is included for whatever Carmen does. So now it is atomic but there is a kind of escrow-agent with Carmen here. In step 2, the TX5 transaction which would send the HBD to Bob cannot be verified to be a valid Hive transaction until Bob has already lost his coins to Alice. By making David be a partner in Carmen, he can at least verify the transaction is valid for Bob.

With these modifications, Neither Alice nor Bob can runaway with the funds. David cannot run away with the funds. Alice and Bob cannot conspire to steal the account of David. Alice and David would have to conspire to create an invalid transaction for TX5 defrauding Bob of the HBD he is supposed to get. Of course, the HBD would eventually be captured by David, as Carmen would return back to him. As mentioned previously Carmen shouldn't have a recovery account because that way the old owner key could be used to recapture Carmen and steal the dollars from the traders.

Comments

Sort byBest
AI
Waivio Assistant
Welcome to Waivio AI Assistant!
How can I assist you today?