Liquidations - AtomicLoans/atomicloans-rfc GitHub Wiki

  1. Dave kicks off liquidation, providing funds to the Sales contract and providing a hash of a secret D and his Bitcoin address.
  2. Alice/Bob/Carol use a 2-of-3 multisig move funds to collateral swap script(s).
  3. Alice and Bob create “back” signatures. (Next few steps are “modulo Carol”... only 2 out of 3 of them have to do this stuff.)
  4. Alice reveals A after being satisfied with Bob’s “back” signature.
  5. Bob reveals B after being satisfied with Alice’s “back” signature.
  6. Dave can now retrieve the collateral by using 2 of A,B,C and revealing D.
  7. 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:

  1. 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.)
  2. 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:

  1. The “back” signatures are used to protect Alice and Bob from Dave claiming the collateral later.
  2. D is never revealed, so Alice and Bob don’t get paid, and Dave will receive a refund.

If all else fails:

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