Skip to content

Instantly share code, notes, and snippets.

@netsamir
Created September 30, 2021 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netsamir/17bb460a85ea1e702d8f3addd496af94 to your computer and use it in GitHub Desktop.
Save netsamir/17bb460a85ea1e702d8f3addd496af94 to your computer and use it in GitHub Desktop.
Escrow2
When
[Case
(Deposit
(Role "Seller")
(Role "Buyer")
(Token "" "")
(ConstantParam "Price")
)
Close ]
(SlotParam "Buyer's deposit timeout")
Close
{"valueParameterDescriptions":[["Price","Amount of Lovelace to be paid by the *Buyer* for the item."]],"slotParameterDescriptions":[["Buyer's deposit timeout","Deadline by which the *Buyer* must deposit the selling *Price* in the contract."],["Buyer's dispute timeout","Deadline by which, if the *Buyer* has not opened a dispute, the *Seller* will be paid."],["Seller's response timeout","Deadline by which, if the *Seller* has not responded to the dispute, the *Buyer* will be refunded."],["Timeout for arbitrage","Deadline by which, if the *Arbiter* has not resolved the dispute, the *Buyer* will be refunded."]],"roleDescriptions":[["Arbiter","The party that will choose who gets the money in the event of a disagreement between the *Buyer* and the *Seller* about the outcome."],["Buyer","The party that wants to buy the item. Payment is made to the *Seller* if they acknowledge receiving the item."],["Seller","The party that wants to sell the item. They receive the payment if the exchange is uneventful."]],"contractType":"ES","contractName":"Simple escrow","contractDescription":"Regulates a money exchange between a *Buyer* and a *Seller*. If there is a disagreement, an *Arbiter* will decide whether the money is refunded or paid to the *Seller*.","choiceDescriptions":[["Confirm problem","Acknowledge there was a problem and a refund must be granted."],["Dismiss claim","The *Arbiter* does not see any problem with the exchange and the *Seller* must be paid."],["Dispute problem","The *Seller* disagrees with the *Buyer* about the claim that something went wrong."],["Everything is alright","The transaction was uneventful, *Buyer* agrees to pay the *Seller*."],["Report problem","The *Buyer* claims not having received the product that was paid for as agreed and would like a refund."]]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment