3
I am trying to create a custom transaction. I am using c# and I will code the signature code myself since no library currently allows this. The transaction involves 3 players; a buyer, a seller and an escrow. The transaction must do the following.
Transaction skeleton:
1. The buyer will send 2BTC to the escrow.
2. The seller will sends 2BTC to the escrow.
3. At a later point in time, the buyer may choose to
send 1BTC to the seller, or not.
4. If he does, the BTC placed in the escrow are
returned (2BTC are kept by the escrow
as commission).
5. If he does not, the BTC in the escrow are lost.
To implement this, it gets complicated. The escrow would need to run a daemon in a loop that would check to see which transaction are been placed in order to return the BTCs correctly.
Is there a way to use the advanced scripting and contract capabilities of bit coin to make it so the escrow doesn't have to run a daemon, and to simply the process as much as possible?