-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This enables support for hyperdrive instances with rebasing tokens since yearn is unable to support rebasing tokens
Leaving this in draft since I'm getting some very confusing approval reverts, will investigate more tomorrow |
7f56771
to
2724d8e
Compare
2724d8e
to
abcc575
Compare
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 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.
Co-authored-by: Alex Towle <jalextowle@gmail.com>
@jalextowle I created a separate PR for the conversion issues we were seeing (will be needed for tests to pass on this one) 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
uint256 aliceShares = depositWrapped(alice, depositAmount); | ||
|
||
// Alice should have non-zero share amounts. | ||
assertGt(aliceShares, 0); |
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.
Since you're starting with a specific fork block number in VaultTest, you should be able to assert on an exact number consistently here.
This enables support for hyperdrive instances with rebasing tokens since yearn is unable to support rebasing tokens.