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

Script for creating an order for CoWSwap Burner on Sepolia #1232

Closed
wants to merge 10 commits into from

Conversation

elshan-eth
Copy link
Contributor

@elshan-eth elshan-eth commented Jan 15, 2025

Description

This PR adds CowSwapBurner and IFeeController. CowSwapBurner will be used as one of the mechanisms for burning fees. Additionally, the PR includes a script for deploying and testing CowSwapBurner on the Sepolia network.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Optimization: [ ] gas / [ ] bytecode
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests have 100% code coverage
  • The base branch is either main, or there's a description of how to merge

Issue Resolution

@elshan-eth elshan-eth changed the title [DRAFT] Smoke test for CoWSwapBurner on Sepolia Script for creating an order for CoWSwap Burner on Sepolia Jan 17, 2025
@elshan-eth elshan-eth marked this pull request as ready for review January 20, 2025 11:33
Copy link
Collaborator

@EndymionJkb EndymionJkb left a comment

Choose a reason for hiding this comment

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

It looks fine, but we have the fundamental decision of whether we're forking or rewriting. The interfaces don't match now (if the feeCollector is supposed to be the sweeper?) The collector in the Vyper contract has a "keeper" fee, deals with epochs and deadlines, and whether a token can be traded: things that seem like they should be the burner's responsibility.

If the collector is the sweeper, the interfaces could be adapted, I guess.

Current sweeper interface:
burn(pool, feeToken, withdrawnTokenBalance, targetToken, _feeRecipient);

Vyper interface:
burn(feeToken[], recipient);

It calls target on the collector, so we could change getTargetToken to just target and accommodate that, so that we don't need to pass that into burn. I suppose it could use the balance instead of having it passed into the burn call, like Vyper does... but what about asynchronous ones where it might have balance from other unsettled trades?

The Vyper contract also doesn't emit any events (which is why I'm passing in the pool address).

Have we decided to fork, in which case we need to try to adapt the sweeper, or can we go the other way and write a new solidity burner that matches the sweeper?

@elshan-eth elshan-eth closed this Jan 24, 2025
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.

2 participants