Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIP-0080: Optimistic EBO #53

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

0xShaito
Copy link

@0xShaito 0xShaito commented Oct 23, 2024

GIP-0080: Implement Optimistic EBO

This PR introduces the Optimistic Epoch Block Oracle (EBO), replacing the current EBO with a decentralized, optimistic oracle design outlined in GIP-0080.

Key Changes:

  • Decentralizes the EBO using an optimistic oracle approach.
  • Integrates with Prophet, allowing permissionless EBO updates.
  • Introduces an escalating bond mechanism for efficient dispute resolution.

This update enhances security and aligns with The Graph's goal of progressive decentralization.

@0xShaito 0xShaito marked this pull request as draft October 23, 2024 07:24
@pcarranzav pcarranzav changed the title GIP: Optimistic EBO GIP-0080: Optimistic EBO Nov 27, 2024
@pcarranzav
Copy link
Member

(Edited the PR title to show the GIP number)


- Any staked actor can propose an update for the EBO, which is published in a contract and remains open for a set period to allow for potential disputes.
- Any staked actor can also challenge the proposed update. If a dispute arises, the initial proposal is discarded, and a new one can be submitted.
- If a dispute occurs, the resolution mechanism is triggered, and the winner of the dispute will receive the counterparty’s bond as a reward.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid certain attack vectors, this should be not the full bond, but half of it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which attack vectors? What do we do with the other half?

- After each dispute, the original update gets deleted and can be answered again, even before resolution. This option makes the process quicker for the requestor. This answer can be disputed using the same method as described above.
- An honest proposer will be rewarded more for the won resolution than the original update.
- Disputers are incentivized to post the new answer, as they have already computed the query.
- The payment from the requester will end up going to the proposer with the correct answer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Term 'requester' is used just twice (with different spellings) and not defined. Is the requester the dispute raiser (might be simpler to say disputer)?

I believe that this should not be the entire payment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requester is the one who requests data from Prophet and also sets the rewards for proposers to submit responses. The disputer monitors the proposals and challenges them if they are invalid.


- **Bond threshold**: The amount of stake that triggers a call to the Arbitrator (virtual bond in the escalation system), set at 100K GRT.
- **Round**: The maximum number of rounds a dispute can escalate, set at 5.
- **Min Bond**: Minimum amount required for five rounds of escalations to reach the Bond threshold, set at 11111 GRT.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I missed it, how much higher does bond need to be relative to previous bond? (Or is that in Prophet docs?)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little confusing and I'm rewriting this section.

MinBond is the amount you need to initiate a dispute. Then the proposers must overtake the minbond by doubling the bond until the proposer or disputer stops answering or the total amount bet exceeds the bond threshold and calls the arbitrator. In this case it would look like this:

Round 0 - (start dispute): 11111
Round 1- proposer 22222
Round 2- disputer 22222
Round 3- proposer 22222
Round 4- disputer 22222
Round 5- proposer 22222 -> call arbitrator

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RembrandtK The bond gets increased by 1 bond unit (configured in the request) for every escalation. So if we set 11111 GRT as the bond, every escalation increases it by that amount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants