You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
O-->>Winner: claimDisputedReward() -> reward + both bonds - decider fee
439
+
O-->>Winner: claimDisputedReward() -> reward + bond refund
440
440
end
441
441
end
442
442
```
@@ -453,7 +453,7 @@ sequenceDiagram
453
453
454
454
⏳ Then if no one **disputes** the proposal before the dispute window is over then the proposal is considered to be true, and the proposer may claim the reward and their bond. The dispute window should give anyone ample time to submit a dispute.
455
455
456
-
⚖️ If someone does **dispute** during the dispute window then they must also post a bond equal to the proposer's bond. This kicks the assertion out of any particular timeline and puts it in a state where it is waiting for a decision from the **decider**. Once the decider contract has **settled** the assertion, the winner can claim the reward and both of the bonds that were posted, subtracting a small fee that goes to the decider.
456
+
⚖️ If someone does **dispute** during the dispute window then they must also post a bond equal to the proposer's bond. This kicks the assertion out of any particular timeline and puts it in a state where it is waiting for a decision from the **decider**. Once the decider contract has **settled** the assertion, the winner can claim the reward and their posted bond. The decider gets the loser's bond.
457
457
458
458
🧑⚖️ Now, as we mentioned earlier, this oracle has a role called the **decider**. For this example it is just a simple contract that anyone can call to settle disputes. One could imagine in a live oracle you would want something more robust such as a group of people who vote to settle disputes.
459
459
@@ -475,7 +475,7 @@ sequenceDiagram
475
475
476
476
* 📣 This function allows users to assert that an event will have a true/false outcome
477
477
478
-
* 💸 It should require a minimum reward `msg.value` (`MINIMUM_REWARD`) to be included with the transaction. If it is not enough, revert with `NotEnoughValue`
478
+
* 💸 It should require that the reward (`msg.value`) is greater than 0 . If it is not then revert with `NotEnoughValue`
479
479
480
480
* ⏱️ It should accept 0 for `startTime` and set it to `block.timestamp`
481
481
@@ -498,7 +498,7 @@ sequenceDiagram
498
498
Here are more granular instructions on setting up the EventAssertion struct:
499
499
- asserter should be `msg.sender`
500
500
- reward should be `msg.value`
501
-
- bond should be `FIXED_BOND`
501
+
- bond should be the reward x 2 (You will know why as you understand the economics and game theory)
502
502
- startTime = `startTime`
503
503
- endTime = `endTime`
504
504
- description = `description`
@@ -512,7 +512,7 @@ Here are more granular instructions on setting up the EventAssertion struct:
if (msg.value < MINIMUM_REWARD) revert NotEnoughValue();
515
+
if (msg.value == 0) revert NotEnoughValue();
516
516
517
517
// Set default times if not provided
518
518
if (startTime == 0) {
@@ -532,7 +532,7 @@ Here are more granular instructions on setting up the EventAssertion struct:
532
532
proposedOutcome: false,
533
533
resolvedOutcome: false,
534
534
reward: msg.value,
535
-
bond: FIXED_BOND,
535
+
bond: msg.value * 2,
536
536
startTime: startTime,
537
537
endTime: endTime,
538
538
claimed: false,
@@ -716,7 +716,7 @@ Very similar to the last function except this one allows the winner of the dispu
716
716
717
717
* 📝 Set the `claimed` property on the assertion to `true`
718
718
719
-
* 💸 Transfer fixed decider fee first (`DECIDER_FEE`), then send remaining reward to the winner - this should be *both* of the bonds (proposer and disputer) plus the reward
719
+
* 💸 Transfer the loser's bond to the decider, then send the reward and bond refund to the winner
720
720
721
721
* 📣 Emit `RewardClaimed`
722
722
@@ -725,8 +725,8 @@ Very similar to the last function except this one allows the winner of the dispu
@@ -1115,4 +1115,4 @@ Oracles are fundamental infrastructure for the decentralized web. They enable sm
1115
1115
1116
1116
🚀 As you continue your blockchain development journey, you'll encounter many variations and combinations of these patterns. Understanding the fundamental trade-offs will help you choose the right oracle design for your specific use case.
1117
1117
1118
-
🧠 Remember: the best oracle is the one that provides the right balance of security, speed, and cost for your application's needs!
1118
+
🧠 Remember: the best oracle is the one that provides the right balance of security, speed, flexibility and cost for your application's needs!
0 commit comments