Leprechaun avatar

Preventing Future Problems By Pretending to be Bad

leprechaun

Published: 30 Oct 2023 › Updated: 30 Oct 2023Preventing Future Problems By Pretending to be Bad

Preventing Future Problems By Pretending to be Bad

untitled.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.

Leave Preventing Future Problems By Pretending to be Bad to:

Written by

An Economist, a Coder and a Carbonist. Author of https://Steemfiles.com, Author of https://ProofofBrain.blog Carbonist community admin (https://www.proofofbrain.blog/created/hive-139995). Discord: leprechaun#2185 Email: theleprechaun2022@steemfiles.com Lover of freedom

Read more #atomic posts


Best Posts From Leprechaun

We have not curated any of leprechaun's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Leprechaun