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

Add initial global protocol fees to the ProtocolFeeController #1330

Merged
merged 4 commits into from
Mar 7, 2025

Conversation

EndymionJkb
Copy link
Collaborator

Description

We had a request to incorporate default fees into the protocol fee controller, so that we don't need to use governance to set them after deployment.

Another issue related to new chains is the fact that the Protocol Fee Controller used to be deployed with the Vault in the Vault factory. This means we'd have to redeploy the Vault factory every time we migrated the fee controller. To avoid this, we pass the fee controller address to the Vault factory, so that it can be deployed externally and these two deployments are decoupled.

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

Copy link
Contributor

@jubeira jubeira left a comment

Choose a reason for hiding this comment

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

LGTM, looks pretty reasonable to me.

This is kinda sensitive so the second review should be as thorough as possible too.

@jubeira
Copy link
Contributor

jubeira commented Mar 6, 2025

great job @EndymionJkb !

@EndymionJkb EndymionJkb requested a review from elshan-eth March 6, 2025 03:01
Copy link
Contributor

@joaobrunoah joaobrunoah left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 114 to 115
// If this passes, we know we can use the targetAddress for the vaultAddress.
if (targetAddress != getDeploymentAddress(salt)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If this passes, we know we can use the targetAddress for the vaultAddress.
if (targetAddress != getDeploymentAddress(salt)) {
// If this passes, we know we can use the targetAddress for the vaultAddress.
if (targetAddress != getVaultDeploymentAddress(salt)) {

Probably, if we change the function name, the comment is not needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes; that's what I had to do to solve the stack-too-deep error

@EndymionJkb EndymionJkb merged commit 7729060 into main Mar 7, 2025
16 checks passed
@EndymionJkb EndymionJkb deleted the global-protocol-fee-defaults branch March 7, 2025 02:58
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