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

feat: add Wrapped Staked Eth hook #451

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: add Wrapped Staked Eth hook #451

wants to merge 3 commits into from

Conversation

marktoda
Copy link
Contributor

Related Issue

Which issue does this pull request resolve?

Description of changes

@dianakocsis
Copy link
Contributor

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) {
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

@marktoda marktoda requested a review from dianakocsis February 20, 2025 17:56

/// @notice Required to receive ETH from unwrapping operations
/// @dev Needed for protocol integrations that might send ETH to this contract
receive() external payable {}
Copy link
Contributor

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?

Copy link
Contributor Author

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

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.

2 participants