-
Notifications
You must be signed in to change notification settings - Fork 18
PI-15: Beanstalk shipments #139
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
Open
default-juice
wants to merge
176
commits into
master
Choose a base branch
from
beanstalk-shipments
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ntracts for silo and fert
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…nto beanstalk-shipments
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…nto beanstalk-shipments
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ShipmentPlanner Into Facet
…ng to Foundry framework
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PI-12: Beanstalk shipments
Summary
SiloPayback.sol)BarnPayback.sol)(All assets start to accrue 3% of new Pinto Supply after the 1 billion supply threshold is reached.)
ShipmentPlannerexternal contract to properly account for the newly created Payback contractsSiloPaybackhook that keeps reward accounting for Unripe tokens intact. ( See Generalized Internal Token Hook System #138 )Links
Problem
Pinto honors Beanstalk’s debt by allocating 3% of all future supply issued beyond the first 1 billion to former Beanstalk participants, distributed proportionally based on their holdings at the time of a snapshot taken at Pinto’s deployment. To accomodate this, Pinto's core contracts will need to be upgraded. For more information on the repayment see the official documentation here.
Solution
SiloPayback, a contract acting both as an ERC20 token representation of Beanstalk BDV and as a staking contract that allows old silo holders to claim Pinto yield.BarnPayback, an ERC1155 with the same implementation as the beanstalk fertilizer but with state also contained within it that allows for gradual repayment based on the id of each token identical to the Beanstalk FertilizerTempRepaymentFieldFacet, that will allow an EOA to initialize the state of the repayment field so that the PCM does not have to sign more than one transaction.ShipmentPlannerto differentiate between silo and barn payback contracts and account for repayment of any component.ShipmentPlannerRecipientsfor silo and barn that send the newly minted Pinto to the corresponding contracts and also call external functions on them to update their state every time they receive yield.ContractPaybackDistributorthat will custody the assets of the contract accounts until they are claimed directly or from the L1.L1ContractMessengerthat will enable L1 beanstalk contract accounts that are unable to claim any other way to claim from Ethereum L1 by sending a cross chain message.Rationale
Add rationale
Contract Changes
The following Facets were upgraded with new functionality:
TempRepaymentFieldFacet(Added and later Removed)Added:
0x046c76Aee5D109fBa8708ee58a50d76EEa1f98dCTempRepaymentFieldFacetFunction ChangesREPAYMENT_FIELD_ID0x31f2cd56REPAYMENT_FIELD_POPULATOR0x49e40d6cinitializeReplaymentPlots0x0b678c09SeasonFacetAdded:
0x046c76Aee5D109fBa8708ee58a50d76EEa1f98dCSeasonFacetFunction Changes