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

Suggestion: include claim taxes on total skill assets calculations #18

Closed
rodipm opened this issue Jul 31, 2021 · 4 comments
Closed

Suggestion: include claim taxes on total skill assets calculations #18

rodipm opened this issue Jul 31, 2021 · 4 comments

Comments

@rodipm
Copy link

rodipm commented Jul 31, 2021

Hi, very helpful project. Keep going!

Wouldn't it be interesting to add current claim taxes on total skill assets for a more accurate daily value projection?

@rodipm
Copy link
Author

rodipm commented Jul 31, 2021

I think you could get claim tax with these code snippets:

library.js:

const getOwnRewardsClaimTax = address => conCryptoBlades.methods.getOwnRewardsClaimTax().call({ from: address });

core.js:

const claimTax = await getOwnRewardsClaimTax(address);
const unclaimedTaxed = unclaimed*(1-convertClaimTax(claimTax))
function convertClaimTax(value) {
    return value*0.15/2767011611056432742
}

@ed3ath
Copy link
Owner

ed3ath commented Jul 31, 2021

can you make a PR?

@rodipm
Copy link
Author

rodipm commented Jul 31, 2021

Yes, for sure.

Not sure if I came up with the best UI for it, but here it is. #29

@ed3ath
Copy link
Owner

ed3ath commented Aug 1, 2021

merged

@ed3ath ed3ath closed this as completed Aug 1, 2021
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

2 participants