|
2 | 2 |
|
3 | 3 | <Zoe-Version/> |
4 | 4 |
|
5 | | -**Definition**: _Offer safety_ means that the user is guaranteed to either |
6 | | -get what they wanted or get back a full refund of what they offered. |
| 5 | +**Definition**: _Offer safety_ means that the user is guaranteed to either |
| 6 | +get **at least what they wanted**, or get back a **full refund** of what they offered — and **never worse**. |
| 7 | +They can receive more than they asked for, but never less than promised, and they will never lose more than they offered. |
7 | 8 |
|
8 | 9 | For Zoe to enforce offer safety, the user must |
9 | 10 | give Zoe a `proposal`. This is a description of both what they want and what |
@@ -32,8 +33,15 @@ escrow my offer, as Zoe immediately escrows the `give:`-specified payment. |
32 | 33 |
|
33 | 34 | After the user escrows, they get a promise for a payout from Zoe. |
34 | 35 | This is the payout that offer safety is enforced over. The payout _must_ |
35 | | -be either what the user wanted (an event ticket in the above example) |
36 | | -or a full refund of what they escrowed ($100 in this example). |
| 36 | +include either at least what the user wanted (an event ticket in the above |
| 37 | +example) or a full refund of what they escrowed ($100 in this example). |
| 38 | +Sometimes the contract will provide _more_ than I asked for (e.g., an |
| 39 | +upgraded ticket or an additional item). |
| 40 | + |
| 41 | +Zoe doesn't allow the contract to take any of the `give` amount from the user |
| 42 | +unless the user receives at least their `want` amount. The contract could |
| 43 | +also return the entire payment, along with a general admission ticket if |
| 44 | +the requested ticket isn't available. |
37 | 45 |
|
38 | 46 | We can enforce offer safety because Zoe controls the payout. In the example, |
39 | 47 | if I try to buy my event ticket using a smart contract on Zoe, the contract |
|
0 commit comments