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

add support for wrapped hyperdrive tokens #37

Merged
merged 10 commits into from
Dec 15, 2024

Conversation

mcclurejt
Copy link
Contributor

This enables support for hyperdrive instances with rebasing tokens since yearn is unable to support rebasing tokens.

This enables support for hyperdrive instances with rebasing tokens since
yearn is unable to support rebasing tokens
@mcclurejt
Copy link
Contributor Author

Leaving this in draft since I'm getting some very confusing approval reverts, will investigate more tomorrow

@mcclurejt mcclurejt marked this pull request as ready for review December 14, 2024 07:38
@mcclurejt mcclurejt force-pushed the mcclurejt/feat/wrapped-tokens branch from 7f56771 to 2724d8e Compare December 14, 2024 22:14
@mcclurejt mcclurejt force-pushed the mcclurejt/feat/wrapped-tokens branch from 2724d8e to abcc575 Compare December 14, 2024 22:15
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

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

I'm going to go ahead and approve since I left all of the comments that I have. I know you said that you want to add some more testing, which I think would be a good addition in a follow-up. We should also talk to Sheng about fuzzing with rebasing tokens.

@mcclurejt
Copy link
Contributor Author

@jalextowle I created a separate PR for the conversion issues we were seeing (will be needed for tests to pass on this one)

#38

Happy to do whatever you think is best with it

Some values received from hyperdrive are denominated in base tokens.

These must be converted to vault shares token denominated values when `asBase==true || isWrapped==true` in the strategy
@mcclurejt mcclurejt added this pull request to the merge queue Dec 15, 2024
Merged via the queue into main with commit 32e9c70 Dec 15, 2024
2 checks passed
@mcclurejt mcclurejt deleted the mcclurejt/feat/wrapped-tokens branch December 15, 2024 03:53
uint256 aliceShares = depositWrapped(alice, depositAmount);

// Alice should have non-zero share amounts.
assertGt(aliceShares, 0);

Choose a reason for hiding this comment

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

Since you're starting with a specific fork block number in VaultTest, you should be able to assert on an exact number consistently here.

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