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 Idle finance strategy #99

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Add Idle finance strategy #99

wants to merge 9 commits into from

Conversation

thashimoto1998
Copy link
Contributor

No description provided.

}

function syncBalance() external view override returns (uint256) {
uint256 iTokenPrice = IIdleToken(iToken).tokenPrice();

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)

Copy link

@bugduino bugduino Aug 16, 2021

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 )

Copy link
Contributor Author

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!

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 👍

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.

None yet

2 participants