In any cross-chain protocol, one party must go first.
In the case of Atomic Loans, lenders have already deposited their funds into their agents and stablecoin funds are sitting in the Atomic Loans Funds contract.
But what if a borrower requests a loan, and they don't have any Bitcoin? They could lock up all the lenders funds, without having any capital themselves. This is called griefing.
To avoid this, borrowers first sign a "dummy transaction" which is a transaction with two outputs and is not meant to be broadcast.
Output #1 is the address of your Bitcoin wallet (specifically the next unused address).
Output #2 is an OP_RETURN which includes the parameters of your loan which the lender agent uses to confirm your intention to borrow.
Technical FAQs (For all the technical Bitcoiners out there😎)
What happens if my transaction is broadcast?
Worst case scenario if the lender decides to be malicious, they could broadcast the transaction the borrower signs.
If this happens, then the borrower will simply have those funds transferred to their own Bitcoin address (indicated above as Output #1). They will lose a small amount of funds to transaction fees, and the funds will be tainted by the data in the OP_RETURN (so you may need to coinjoin if you wish to ensure your privacy).
However, all of your Bitcoin will be safe (minus the transaction fees).
Why do I need to sign a transaction, why not just sign a message?
An alternative method for verifying that a user has enough funds to lock as collateral for a loan request, would be to sign a message with the private key where all the Bitcoin funds are stored.
Let's say you wanted to prove that you had 1 BTC to lock as collateral, but this Bitcoin was split up into 0.1 BTC UTXO's, each with a different private key.
Then the user would need to sign 10 times in order to prove that they had the Bitcoin necessary for the loan.
Therefore, for ease of use, we decided to have users create a transaction with two outputs, rather than sign 10 times.