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

Bean:Eth -> Bean:wStEth Migration #765

Merged
merged 40 commits into from
Feb 23, 2024
Merged

Bean:Eth -> Bean:wStEth Migration #765

merged 40 commits into from
Feb 23, 2024

Conversation

BrendanSanderson
Copy link
Contributor

No description provided.

Copy link
Contributor

@Brean0 Brean0 left a comment

Choose a reason for hiding this comment

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

r

@@ -359,6 +361,7 @@ contract Storage {
bool abovePeg; // | 1 (24)
uint16 stemStartSeason; // | 2 (26)
uint16 stemScaleSeason; //──────────┘ 2 (28/32)
uint32 beanEthStartMintingSeason; //──────────┘ 2 (28/32) NOTE: Reset and delete after Bean:wStEth migration has been completed.
Copy link
Contributor

Choose a reason for hiding this comment

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

fix style

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -121,6 +121,7 @@ contract Account {
* @param isApprovedForAll A mapping of ERC1155 operator to approved status. ERC1155 compatability.
* @param farmerGerminating A Farmer's germinating stalk. Seperated into odd and even stalk.
* @param deposits SiloV3.1 deposits. A mapping from depositId to Deposit. SiloV3.1 introduces greater precision for deposits.
* @param barnRaiseWell The Well that the Barn Raise adds liquidity to
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be in the appStorage natspec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was on natspec of AppStorage and State. Fixed here:
204b580#diff-9314f54b6e0c572c10e8145556daa1904a394fe43008d9ebf3181c618e51bb46L124

@@ -21,7 +21,10 @@ contract Oracle is ReentrancyGuard {
//////////////////// ORACLE INTERNAL ////////////////////

function stepOracle() internal returns (int256 deltaB) {
deltaB = LibWellMinting.capture(C.BEAN_ETH_WELL);
// TODO: Make more dynamic if becomes a bottleneck. Potentially use LibWhitelistedTokens.
Copy link
Contributor

Choose a reason for hiding this comment

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

lets do it now, given all gauge tokens should be included in the minting whitelist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed:
9a39c57

* @dev No protocol should use this function to calculate manipulation resistant Bean price data.
**/
function price() external view returns (Prices memory p) {
p.ps = new P.Pool[](2);
p.ps = new P.Pool[](3);
Copy link
Contributor

Choose a reason for hiding this comment

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

should we generalize this as well? huge developer pain to continously update the beanstalkPrice contract upon a new addition to the silo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Generalized to include all Well tokens assuming that are CP2:
7d11d62

@@ -99,7 +100,7 @@ library LibConvert {
if (tokenOut == C.UNRIPE_BEAN)
Copy link
Contributor

Choose a reason for hiding this comment

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

need to replace urBEANETH to urLP

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here:
4ea7406

newDepositedLPBeans
);

uint256 newLP = IWell(C.BEAN_ETH_WELL).sync(
uint256 newLP = IWell(barnRaiseWell).sync(
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think there's any validity in verifying that sync performs as expected? or up to beanstalk DAO to confirm?

Copy link
Contributor Author

@BrendanSanderson BrendanSanderson Feb 20, 2024

Choose a reason for hiding this comment

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

Removed sync for addLiquidity:
97f905d

using SafeERC20 for IERC20;
using LibSafeMath32 for uint32;

// gauge point factor is used to scale up the gauge points of the bean and bean3crv pools.
Copy link
Contributor

Choose a reason for hiding this comment

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

update comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here:
71930ff

*/
contract InitMigrateUnripeBeanEthToBeanSteth {
using SafeERC20 for IERC20;
using LibSafeMath32 for uint32;
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed here:
71930ff

@@ -79,10 +79,15 @@ library C {
uint256 internal constant WELL_MINIMUM_BEAN_BALANCE = 1000_000_000; // 1,000 Beans
address internal constant BEANSTALK_PUMP = 0xBA510f10E3095B83a0F33aa9ad2544E22570a87C;
Copy link
Contributor

Choose a reason for hiding this comment

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

update to legacy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed BEANSTALK_PUMP from here:
e0a4006

protocol/contracts/mocks/MockInitDiamond.sol Show resolved Hide resolved
@Brean0 Brean0 merged commit 399202a into add-steth-oracle Feb 23, 2024
1 check failed
@Brean0 Brean0 deleted the wsteth-migration branch February 23, 2024 17:01
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