CoW Grant: Automate MEV Blocker Billing

Grant Application: Automate MEV Blocker Billing


Grant Title:

Automate MEV Blocker Billing


Author:

Github: @cowanator


About You:

I’m an experienced blockchain engineer and have been following the development of cowswap since dfusion.


Grant Category:

Other (Operation Automation)


Grant Description:

  • Develop small project responsible for automation of MEV Blocker Billing process.

Milestones:

Milestone 1: Submit the billing data for period on chain

  • Execute the relevant Dune queries (Fee per Block & Payment Due found in project linked below) for the prescribed billing period and retrieve the execution results.

  • Combine the query results and write the billing data to the MEVBlockerFeeTill contract by invoking its bill function.

This is to be containerized and run on a weekly schedule.

Note that Milestone 1 is already complete and can be found at GitHub - cowanator/mb-billing: Automated Builder Billing for MEV Blocker under release tag v0.0.0.

Milestone 2: Check Payment Status of Builders

  • At some point after the billing date (and before the next), verify that the requested fees have been paid.
  • If not paid, invoke the draft function to deduct the fees from the builder’s bond.

Milestone 3 [Optional]: Professionalize query maintenance and transaction submission

  1. Store and maintain the relevant queries in the project repo, whenever they are updated on main, the “Dune Query Updater” workflow is triggered to save the changes.
  2. Instead of direct contract call from EOA, propose a Safe transaction along with an approval notification.

Funding Request:

Funding request summary: 4500 COW + (optional 2250 COW for Milestone 3) paid as 2250 COW per milestone.


Gnosis Chain Address (to receive the grant):

gno:0x1ac70B075D431379c3eaF18C130764B2f609C503


Referral:

@banana1


Terms and conditions:

By applying for this grant, I agree to be bound by the CowDAO Participation Agreement and the COWDAO Grant Terms and Conditions.

1 Like

Hey @cowanator and welcome to the cow forum! This proposal looks great and the code already linked for the first milestone appears to be in good shape.

Since you are new to the forum, I’m guessing you were capped by a limit of 2 URLS in your first post. There appears to be a copy of this very same proposal with other relevant references in this github gist on your profile.

Based on the account you’ve linked and its owners, you will likely also run into an issue creating the snapshot for this proposal. I’d be happy to create the snapshot for you if you’re interested. Just let me know!

1 Like

Thanks @bh2smith - I managed to post the snapshot:

https://snapshot.org/#/cowgrants.eth/proposal/0x97d51bb1e8ed7b7fb5a48b8d81d0e053251f11bdf68419d3e6c1b2751f971cf8

Project Status Update:

Milestone 2 is now ready:

Will review tomorrow, merge and release a new image. Note to devOps that the image now requires a runtime argument of either billing or drafting.

1 Like

This is great, we’ll add the corresponding payment to the upcoming Grants payment cycle.
@cowanator we’d like to ask you to transfer the repository to cowdao-grants · GitHub, as a standard procedure with any software developed under CoW DAO’s Grants Program, thanks!

1 Like

Hey that’s great news. I can transfer the repo, but have not yet completed Milestone 3 and might have some trouble editing the repo once moved. Is this something to be continued or would you like to see if done first?

Also it has come to my attention that there is an additional caveat, not mentioned in the original project description, that the drafting should be executed “with Role” through a safe module.

Project Update Milestone 3

Originally, milestone 3 outlined some “bonus features” of the project (to Professionalize query maintenance and transaction submission). However,

  • “professionalize query management” was replaced with “slack notifications”
    and
  • “propose a safe transaction” was replaced with an “execWithRole call to a zodiac module”

The first replacement being a slightly easier task and a must have while query mangement is takes should have priotiry.

The second replacement was much more involved and also a must have since an the draft and fine functions on MevBlockerFeeTill contract are restricted to onlyOwner which happens to be an m/n safe with m > 1 so an EOA can’t call it anyway.

Note that the need for this Zodiac module wasn’t mentioned in the original specification.

Anyway, all the contents for Milestone 3 are released under release tag v0.1.0 (forum wouldn’t allow me to post a link to the release).

Summary of Features Introduced in Milestone 3

  1. Draft & Fine executable as Multisend through Zodiac Roles Modifier
  2. Configurable Dynamically Evaluated Fines
  3. Slack Notifications:
    • After Successfull Run of Billing and Drafting
    • On Insufficient Bonds after Drafting
  4. Updated Instructions
    • Zodiac Role Modifier Installation
    • [DevOps] How to Configure Drafting

All that remains to add Query Management for which I would propose an optional 4th milestone.

2 Likes

Hi, thanks, can you please reach out on the Discord and we can co-ordinate repository transfer (and ensure that permissions are in place so that you can also maintain it). :pray:

2 Likes

Sure thing. Sorry for the late reply - I’ve posted in the discord.

Repo transfer completed and now located at in the cowdao-grants github org.

4 Likes