a solution for the thirsty_men_problem#47
Conversation
|
first host should not be involved "Any guest who deviates from the rotation is excluded from all future rounds is flawed! if we could apply such rule why not just ran a dice and force people to put their cup! |
|
Forget about rounds, |
|
To prevent cheating, these guests deposit something valuable (e.g., an item or promise worth up to a cup’s value) as collateral, which they only reclaim after fulfilling their sharing obligation. Who would manage the deposit? |
|
To ensure a fair and self-regulating distribution of the limited water, the guests agree to use money - or something similarly valuable, like bitcoin :) - to represent the value of a cup of water. The two guests who manage to place their cups in the first and last positions—the only ones that will be filled—must commit to sharing their water in exchange for compensation. Each of these two "prime position" guests offers just the value of their cup as a form of collateral. But instead of handing this money to a third party, the system works without a central monitor or controller. Here's how: each of the two prime guests individually negotiates with the remaining N-2 guests. In return for a fair portion of their water (which is 1 / (N-2) of a cup), they receive a proportional share of the cup’s value in money—specifically, (1 / (N–2)) × [cup value]. This peer-to-peer exchange ensures that each prime guest recovers the full value of their cup by the end, and each guest receives their fair share of the water. Because every transaction is handled directly and independently, no trust is required in a central authority—only in rational self-interest. Example Walk‑Through (N = 5)
Q&A:
How to estimate “Value of a Cup” (V)
How to Prevent Cheating & Deadlocks Atomic Swap: Use hashed time‑locked contracts (HTLC) so that either the water is received and payment released, or everything reverts. Commit‑Reveal for Receipts: Guests first commit to a receipt hash on‑chain, then reveal after receiving water, preventing repudiation. Timeout Mechanism: If a guest stalls beyond X days, the smart contract automatically refunds collateral to the prime guest and releases nothing to the staller. |
a solution for the thirsty_men_problem