Basic Escrow contract
- There are two parties Alice and Bob, Alice want to buy something from Bob.
- Following terms are agreed upon-
abitrator
: address of the arbitratoramount_payable
: price of good/servicearbitration_fee
: fees to be paid to arbitrator by loosing party in case of disputetime_to_raise_dispute
: time given to Alice(payer) to raise dispute after activation of contract
- Alice make the payment for good/service + arbitration fee to the smart-contract using pay
payment_by_payer
function. - Bob pay arbitration fee to the smart-contract using pay
payment_by_payee
function. - When both parties pay fees, the contract is activated and a timer starts.
- If Alice(payer) is satisfied with the delivery, she can settle the contract. The money of good is sent to Bob, and the arbitration fees of respective parties are returned.
- If Alice doesn't raise dispute in
time_to_raise_dispute
, Bob can callforce_settle
to settle the dispute, and payments are made same as when settled by Alice. - If Alice raise dispute in given time, the Arbitrator decides whom to send the money. The arbitration fee of the loosing party in dispute is confisticated and sent to arbitrator. The winner gets the money and his arbitration fee.
- The arbitrator has no incentive to act honestly
- The parties need to send the proof of their case using other channels(maybe email, or upload on website hosting front-end)