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

feat: make fee collector open and competitive #12

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

marktoda
Copy link
Collaborator

New fee collector implementation where anyone can make any calls from
the collector in return for a specific amount of the fee token.
Searchers can then compete to execute based on the current balance of
tokens and the best route

@marktoda marktoda force-pushed the competitive-fee-collector branch from 05d7e48 to 8c726da Compare April 16, 2024 19:11
@marktoda marktoda marked this pull request as draft April 16, 2024 19:11
New fee collector implementation where anyone can make any calls from
the collector in return for a specific amount of the fee token.
Searchers can then compete to execute based on the current balance of
tokens and the best route
@marktoda marktoda force-pushed the competitive-fee-collector branch from 8c726da to 4409111 Compare April 16, 2024 19:11
@marktoda
Copy link
Collaborator Author

currently this is like $XYZ for the sum balance of all tokens on the fee collector
alternatively we could do $XYZ for the balance of a single token (by transferring the token to the caller and making a callback)

@marktoda marktoda force-pushed the competitive-fee-collector branch from 9c7e13d to 421cf9b Compare April 16, 2024 20:14
@zhongeric zhongeric marked this pull request as ready for review April 25, 2024 20:14
/// @dev as long as they pay `feeTokenAmount` per token taken to the `feeRecipient`
/// this creates a competitive auction as the balances of this contract increase
/// to find the optimal path for the swap
function swapBalances(ERC20[] memory tokens, bytes calldata call) external {
Copy link
Member

Choose a reason for hiding this comment

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

seems unnecessary to pass through this call info, why not just have a shared interface for the callback?

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.

3 participants