-
Notifications
You must be signed in to change notification settings - Fork 5
Feat: USDe before maturity feed with NAV #113
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
Conversation
0xtj24
commented
Mar 12, 2025
- Add tests to use NAV instead of Fixed Price
- Add USDe before maturity feed with NAV and tests
| uint80 answeredInRound | ||
| ) = sUSDeFeed.latestRoundData(); | ||
|
|
||
| uint256 sUSDeToUSDeRate = sUSDe.convertToAssets(1e18); |
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.
if token is capable of taking withdraw fees, .previewRedeem() may be more accurate
| int256 USDeUsdPrice = (sUSDePrice * 1e18) / int256(sUSDeToUSDeRate); | ||
|
|
||
| (,int256 navDiscountedPrice,,,)= navFeed.latestRoundData(); | ||
| int256 usdeDiscountPrice = (USDeUsdPrice * navDiscountedPrice) / 1e18; |
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 believe this particular token is subject to a cooldown.
thus, a simple share price formula may be a somewhat misleading way to get the actual market price as the market should theoretically apply a discount based on time it takes to cool down.
just wanted to highlight this note, though i'm sure you've already considered.
wavey0x
left a comment
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.
LGTM
…iRM into feat/pt-sude
|
Already merged into |