A Partial Refund in A Smart Contract #9433
-
A smart contract receives a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
The Attn @Chris-Hibbert Why? Curious if you have something specific in mind? |
Beta Was this translation helpful? Give feedback.
-
We've written several auction contracts, and it can be written either so the auction collects all the bids up front (so the bidders don't get offer safety, but the auctioneer has certainty of payment) or so the bidders get offer safety. In the latter case, the auctioneer has to be robust to offers being withdrawn during the auction. If the auctioneer also wants to charge a fee for bidding, it just has to reject offers that don't unconditionally pay the fee. (i.e. if their |
Beta Was this translation helpful? Give feedback.
-
That is generally what we've done, and I do recommend it. But worth noting that the auction can insist on exit terms, such as a deadline shortly after the auction closes, that would enable it to assume bids remain during the auction. |
Beta Was this translation helpful? Give feedback.
I don't see any current contracts that do this, but there's a support library in
zoe/src/contracts/auction
that shows how it would be done. This sell method ensures that the seller can't exit early