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

CIP-52 (EBBO Updates) #432

Merged
merged 10 commits into from
Nov 30, 2024
Merged

CIP-52 (EBBO Updates) #432

merged 10 commits into from
Nov 30, 2024

Conversation

harisang
Copy link
Contributor

This PR updates the documentation to accommodate for the changes proposed in CIP-52, that is currently live and open for voting.

Note that this PR should be merged ONLY if CIP-52 successfully passes.

@harisang harisang requested a review from a team as a code owner November 26, 2024 01:10
Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Nov 30, 2024 0:11am

@harisang harisang changed the title cip_52_ebbo_updates CIP-52 (EBBO Updates) Nov 26, 2024
@harisang
Copy link
Contributor Author

Comment: i attempted a few ways to resolve the issue with hyperlinks but didn't find the right way yet. Will make sure to address this soon.

Copy link
Contributor

@fleupold fleupold left a comment

Choose a reason for hiding this comment

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

Looks good overall, some small clarifying questions


A certificate for an EBBO violation consists of a reference routing on a block (and log index) between the start of the auction and when the settlement happened onchain. A reference routing for a trade at a given block (and index) is an execution of that trade which only uses liquidity from base protocols and routes through base tokens (see [here](/cow-protocol/reference/core/auctions/competition-rules#base-tokens) for the definition of base protocols and base tokens). The surplus received by users in this routing is used as reference surplus. The difference between the reference surplus and the surplus actually received by the user is the size of the EBBO violation. This amount needs to be reimbursed to a user.

A certificate for an EBBO violation can be challenged by the solver who is accused of the EBBO violation by providing a different block (and index), within 72 hours of the notification of the violation. In this case, a reference routing on this block (and index) might be proposed by the core team and used as certificate instead. The new certificate, if any, cannot be challenged again.
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the "in this case" part confusing. In the case of a solver challenging the core team is also proposing another certificate?

Why not allow it to be challenged by anyone?

Also small advice, if you make every sentence it's own line it doesn't change formatting but will make changes later easier to review (since diff doesn't work well on a single line).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the phrasing in the CIP, and the intention was to avoid a lot of back and forth. I think anyone can challenge certificates, the core team should just verify the claim, and this can basically be done once. Which suggests that the solver that is "accused" of an EBBO violation should provide a definitive proof that there was no violation; if that proof can be challenged again, we conclude that there was an EBBO violation.

Not sure if that answers your concern.

2. The core team calculates the (minimum) value lost to users in a given settlement due to the EBBO violation, as described in the section above.

3. The core team requests the involved solver team to reimburse the user directly, by informing them about the amount:
- The reimbursement is to be done in the surplus token and sent from a responsible solver’s submission / owned address for clarity about who issued the refund. If the solver has no access to their submission account (in case this is managed by the core team), then the core team should transfer any desired amount from the submission account to a solver-related address (i.e. their rewards account), if such a request is made from the solver.
Copy link
Contributor

Choose a reason for hiding this comment

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

can we not reference core team owned solver accounts in the docs please.


1. A violation is detected, within 3 months from the incident date.

2. The core team calculates the (minimum) value lost to users in a given settlement due to the EBBO violation, as described in the section above.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the core team need to calculate it? We have established above that anyone can claim and then challenge an EBBO violation. Why isn't the outcome of this permissionless process used as the basis for calculation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I believe this does allow for anyone to provide a certificate of an EBBO violation but i guess this part implies that the core team will lead the discussion on this and verify the calculation. Maybe this is too restrictive, but this is how it was phrased in the CIP

Comment on lines 45 to 49
## Note for non-colocated drivers

For all CoW DAO bonded and non co-located drivers, MEV blocker rebates from trade settlements are accumulated in the CoW DAO owned MEV Blocker Rebates Safe. As per decision of CoW DAO, the rebates from the MEV Blocker Rebates Safe are redirected to the CoW DAO Treasury Core unit (cf. CIP-33), which is also a one-out-of-two owner of the MEV Blocker Rebates Safe next to CoW DAO itself.

With the successful passing of this proposal, the MEV blocker rebate that is directly associated with the execution of the order in question, if any, shall be used to refund the solver (to clarify: if the MEV blocker rebate is smaller than the solver’s reimbursement to the user, it is used fully to refund the solver to that extent. If the MEV blocker rebate is bigger than the solver’s reimbursement to the user, only the actually reimbursed amount is refunded to the solver). Refunds will be handled by the CoW DAO Treasury Core Unit within a few weeks after the reimbursement is made, and will be sent to the solver address from which the reimbursement has happened. For avoidance of doubt, the CoW DAO Treasury Core unit has autonomy on selecting any position to be liquidated for this purpose in case the MEV Blocker Rebates Safe does not have sufficient accumulated funds.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this section needs to be part of the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point. Removed it.

@harisang harisang merged commit edadc31 into main Nov 30, 2024
4 checks passed
@harisang harisang deleted the cip_52_ebbo_updates branch November 30, 2024 00:13
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants