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

chore: redeemCream fixed rate elastic increase #261

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/MevEth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,10 @@ contract MevEth is Auth, ERC20, IERC4626, ITinyMevEth {
// Calculate the equivalent mevETH to be redeemed based on the ratio
uint256 mevEthAmount = creamAmount * uint256(CREAM_TO_MEV_ETH_PERCENT) / 1000;

// Convert the shares to assets and update the fraction elastic and base
uint256 assets = convertToAssets(mevEthAmount);
if (assets < MIN_DEPOSIT) revert MevEthErrors.DepositTooSmall();
// Update the fraction elastic and base
if (mevEthAmount < MIN_DEPOSIT) revert MevEthErrors.DepositTooSmall();

fraction.elastic += uint128(assets);
fraction.elastic += uint128(mevEthAmount);
fraction.base += uint128(mevEthAmount);

// Burn CreamEth2 tokens
Expand Down