Skip to content

Fork System#1042

Open
funderbrker wants to merge 70 commits into
masterfrom
transmission
Open

Fork System#1042
funderbrker wants to merge 70 commits into
masterfrom
transmission

Conversation

@funderbrker

@funderbrker funderbrker commented Aug 20, 2024

Copy link
Copy Markdown
Contributor

Fork System

The Fork System enables an opt-in/out system of upgrading and migration of any Diamond Contract to another compatible Diamond Contract. Anyone, including Beanstalk Farms, can implement descendant forks that allow users to opt into the upgrade by migrating existing parent assets into the child.

RFC

#1036

Design of Destination

A source fork has no knowledge of child forks, however each child fork must specifically whitelist and implement logic for the parent forks it will support. This implementation demonstrates one way that a child fork could be designed to accept migrated assets, however, it is not the only way it can be done. Each child fork is responsible for deciding how to mint assets for migrating users. The possible design space is infinite and is not fully captured by this PR, however destination logic modifications should fit inside of the standardized interfaces demonstrated in this PR.

Implementation notes

Although a decent amount of tech debt had to be addressed throughout the codebase while implementing this system, the core of the changes can be found in

  • TransmitOutFacet.sol
  • LibTransmitOut.sol
  • TransmitInFacet.sol
  • LibTransmitIn.sol
  • TransmitToFork.t.sol

@Brean0 Brean0 mentioned this pull request Sep 23, 2024
Base automatically changed from beanstalk-3 to master October 10, 2024 03:02
Comment thread protocol/test/foundry/sun/Sun.t.sol Outdated
@netlify

netlify Bot commented Oct 16, 2024

Copy link
Copy Markdown

Deploy Preview for basin ready!

Name Link
🔨 Latest commit 304fdf6
🔍 Latest deploy log https://app.netlify.com/sites/basin/deploys/671d51c2ff78840008e24186
😎 Deploy Preview https://deploy-preview-1042--basin.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify

netlify Bot commented Oct 16, 2024

Copy link
Copy Markdown

Deploy Preview for beanstalk-ui ready!

Name Link
🔨 Latest commit 304fdf6
🔍 Latest deploy log https://app.netlify.com/sites/beanstalk-ui/deploys/671d51c2b02ccb0008683c18
😎 Deploy Preview https://deploy-preview-1042--beanstalk-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⛓ Contracts Related to Beanstalk and ecosystem contracts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: Fork Migration System

3 participants