Skip to content

feat: introduce templates for vaults upgrade and revenue share opt in#1257

Merged
maurelian merged 56 commits into
ethereum-optimism:mainfrom
defi-wonderland:sc-feat/revshare-setup
Nov 17, 2025
Merged

feat: introduce templates for vaults upgrade and revenue share opt in#1257
maurelian merged 56 commits into
ethereum-optimism:mainfrom
defi-wonderland:sc-feat/revshare-setup

Conversation

@0xDiscotech
Copy link
Copy Markdown
Contributor

@0xDiscotech 0xDiscotech commented Oct 20, 2025

Description

This PR contains a new RevShareContractsUpgrader on-chain contract containing all the upgrade logic for deploying and upgrading revenue sharing, and also one template to execute it using multiple chains as inputs.
Currently, we only have a template for the main flow, which is inside the upgradeAndSetupRevShare() function. The template for the setupRevShare() will be added in another PR. This flow has lower priority since it is not a flow we need to cover now, but the logic is there in the contract because it will probably be needed in the future.

Tests

We added comprehensive unit test coverage for the contract, and most importantly, we wrote some integration tests using Supersim to check the state in L2 when deposits arrive there, combining the template and the upgrader contract.

Metadata

Authors

@0xChin @0xiamflux @0xDiscotech

Comment thread src/doc/simulate-l2-deposit-transactions.md Outdated
Comment thread src/doc/simulate-l2-deposit-transactions.md
Comment thread src/doc/simulate-l2-deposit-transactions.md
Comment thread src/template/DeployFeesDepositor.sol Outdated
Comment thread test/integration/tenderly/RevenueShareSimulations.md Outdated
Comment thread src/doc/simulate-l2-deposit-transactions.md Outdated
Comment thread src/doc/simulate-l2-deposit-transactions.md Outdated
Comment thread src/RevShareContractsUpgrader.sol
Comment thread test/tasks/example/eth/016-revshare-upgrade-and-setup/config.toml
Comment thread test/libraries/Utils.t.sol Outdated
Comment thread test/integration/RevShareContractsUpgraderIntegration.t.sol
maurelian
maurelian previously approved these changes Nov 14, 2025
Comment thread src/doc/simulate-l2-deposit-transactions.md
Comment thread test/tasks/example/eth/016-revshare-upgrade-and-setup/.env Outdated
Comment thread src/RevShareContractsUpgrader.sol
Comment thread src/libraries/RevShareCommon.sol
@maurelian maurelian added this pull request to the merge queue Nov 17, 2025
Merged via the queue into ethereum-optimism:main with commit db3f78f Nov 17, 2025
20 checks passed
@0xDiscotech 0xDiscotech deleted the sc-feat/revshare-setup branch November 18, 2025 15:23
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.

7 participants