Atomic Swaps

As discussed earlier, all transactions in Ember are atomic. Meaning, when a user releases their bitcoin collateral, they will receive the loan amount. If a user releases their bitcoin collateral, it is not cryptographically possible that the loan amount doesn’t get released to the user. Similarly, when a user repays the loan, the bitcoin collateral will return back to the user, it’s not possible that it doesn’t. A user interacts with Ember protocol using some client (website/app). A client interacts with Ember Smart Contracts on Ethereum. Operators prepare an atomic swap setup for the client. Adapter signatures are used for atomic swaps.

We want user’s bitcoin collateral to go into a Bitcoin DLC, and loan to release immediately. Either both happen or none. Operators will take the user's eth address, and lock the loan amount. Only users can withdraw these funds within the next 24 hours, once they have a secret “t”. Operators share a ECDSA (Elliptic Curve Digital Signature Algorithm) public key “T” corresponding to this “t” to the client. Client presigns a transaction with this “T”, which sends bitcoin to DLC. Client sends this presignature to the operators. Operators can produce a complete signature using secret “t”, and submit this transaction to the Bitcoin blockchain, but by doing so, they reveal “t”, which the user can use to release the loan amount.

Last updated