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

[NES-265] [N5] [Critical] ERC4626 preview function override is incorrect #114

Merged
merged 2 commits into from
Dec 10, 2024
Merged
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
6 changes: 3 additions & 3 deletions nest/src/ComponentToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ abstract contract ComponentToken is
bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");
/// @notice Base that is used to divide all price inputs in order to represent e.g. 1.000001 as 1000001e12
uint256 internal constant _BASE = 1e18;

// Events

/**
Expand Down Expand Up @@ -527,7 +527,7 @@ abstract contract ComponentToken is
if (_getComponentTokenStorage().asyncDeposit) {
revert Unimplemented();
}
assets = super.previewDeposit(shares);
assets = convertToAssets(shares);
}

/**
Expand All @@ -554,7 +554,7 @@ abstract contract ComponentToken is
if (_getComponentTokenStorage().asyncRedeem) {
revert Unimplemented();
}
shares = super.previewWithdraw(assets);
shares = convertToShares(assets);
}

/// @inheritdoc IERC7540
Expand Down
Loading