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

IDLE Staking: Share is calculated using idle, but should stkIDLE #1

Open
asafsilman opened this issue Jun 19, 2021 · 0 comments
Open

Comments

@asafsilman
Copy link

On the IDLE staking dashboard, the staking share relative to total deposits is calculated using the IDLE deposit amount, but it should be calculated using the stkIDLE balance.

Since stkIDLE is time weighted, users who stake for longer have a larger share of the rewards.

this.functionsUtil.genericContractCall(this.props.contractInfo.name,'supply'),

const stakedBalance = lockedInfo && lockedInfo.amount ? this.functionsUtil.fixTokenDecimals(lockedInfo.amount,this.props.tokenConfig.decimals) : this.functionsUtil.BNify(0);

These lines should be changed to use the StakedIDLE contract totalSupply(), and balanceOf(addresss) to calculate the users share.

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

No branches or pull requests

1 participant