Liquidations - AtomicLoans/atomicloans-rfc GitHub Wiki
- Dave kicks off liquidation, providing funds to the
Salescontract and providing a hash of a secret D and his Bitcoin address. - Alice/Bob/Carol use a 2-of-3 multisig move funds to collateral swap script(s).
- Alice and Bob create “back” signatures. (Next few steps are “modulo Carol”... only 2 out of 3 of them have to do this stuff.)
- Alice reveals A after being satisfied with Bob’s “back” signature.
- Bob reveals B after being satisfied with Alice’s “back” signature.
- Dave can now retrieve the collateral by using 2 of A,B,C and revealing D.
- Alice and Bob can now collect Dave’s payment because 2 of A,B,C plus D have all been revealed.
If Alice, Bob, and Carol fail to reveal secrets A, B, C in time:
- If no secrets were revealed, then the collateral can stay where it is. (For the next sale attempt, Alice and Bob will move it with a multisig.)
- If any secrets were revealed, then the “back” signatures must be used to protect the party who revealed. (Otherwise Dave can collect his refund and then collude with the non-revealing party to grab the collateral.)
If Dave fails to claim the collateral in time:
- The “back” signatures are used to protect Alice and Bob from Dave claiming the collateral later.
- D is never revealed, so Alice and Bob don’t get paid, and Dave will receive a refund.
If all else fails:
- After the liquidation has fully expired, Alice and Bob can get the collateral (refundable to Alice and seizable to Bob).
- “back” just has to mean moving collateral to somewhere Dave can’t get at it.