-
Notifications
You must be signed in to change notification settings - Fork 24
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 Idle finance strategy #99
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
function syncBalance() external view override returns (uint256) { | ||
uint256 iTokenPrice = IIdleToken(iToken).tokenPrice(); |
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.
Hey, I'm one of the founders and lead dev of Idle finance. I stumbled upon this integration, and I would like to suggest in general to always use tokenPriceWithFee
instead of the plain tokenPrice
. See here for more info https://developers.idle.finance/methods/tokenpricewithfee . In this way you can calculate your 'real' balance (ie with fee already counted, so you will have a net token price)
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.
In this way you can also substitute the getRedeemPrice
potentially (Here the ref of the method https://github.com/Idle-Labs/idle-contracts/blob/develop/contracts/IdleTokenGovernance.sol#L340 )
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.
Hi, bugduino. L2 finance will also integrate IDLE risk adjusted token which does not have tokenPriceWithFee
method so I replace the getReedmPrice
with above ref method. Thank you for your advice!
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 ok ok, sorry was thinking about the Best yield! Nice catch then 👍
No description provided.