Conversation
| } | ||
|
|
||
| function syncBalance() external view override returns (uint256) { | ||
| uint256 iTokenPrice = IIdleToken(iToken).tokenPrice(); |
There was a problem hiding this comment.
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.
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.
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.
Oh ok ok, sorry was thinking about the Best yield! Nice catch then 👍
No description provided.