-
Notifications
You must be signed in to change notification settings - Fork 533
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
feat: add Wrapped Staked Eth hook #451
base: main
Are you sure you want to change the base?
Conversation
no license identifier in this file
|
/// @param wrappedAmount Desired amount of wstETH | ||
/// @return Amount of stETH required | ||
/// @dev Uses current stETH/wstETH exchange rate for calculation | ||
function _getWrapInputRequired(uint256 wrappedAmount) internal view override returns (uint256) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i might just be thinking about this differently, but wouldn't it make more sense if this was called _getUnwrapInputRequired
instead? Because you are specifying the amount of wrapped token that you want and this function is calculating how much of the unwrapped token you need to input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of it as - we're calling the operation wrap
and want the result to be wrappedAmount
. What's the input required to wrap
operation to get wrappedAmount
-> thus get wrap input required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i see: its the input to the wrap
function
|
||
/// @notice Required to receive ETH from unwrapping operations | ||
/// @dev Needed for protocol integrations that might send ETH to this contract | ||
receive() external payable {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last question: when would this be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oop leftover from weth hook
Related Issue
Which issue does this pull request resolve?
Description of changes