-
Notifications
You must be signed in to change notification settings - Fork 251
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
Adding/setting rarity points after gems have been staked or moved to vault (deposited). #53
Comments
From the docs regarding rarities: "Those rarity points are summed up and stored on the Vault struct" |
Or perhaps the Vault struct is in fact updated but the front end is not? |
@torbentemp Hey seems like I'm going through this same issue. Did you ever find a fix? My current plan (I know not a great idea) is to temporarily remove the check so they can be unstaked and then add that fix back |
I had this issue the other day and in order for the users to be able to unstake again, I changed back the rarity of all of the NFTs to 1 Sucks tho that there's no way for now to update the staked ones |
Nope. |
@nf0x Thank you for your rarity-configuration script/repo! It saved me a lot of time. Much appreciated! |
@nf0x @torbentemp can you share the repo with me as well? |
I have the same problems now. Updated rarities after some nfts staked. Now user can't unstake, one or more. it depends. Soooooooooooooooooooooooo painful using this!!!!!!!!!!!!!!!!!!!!! @nf0x reset all nfts's rarity all to 1 can't solve all the problem. |
TL;DR: when changing the rarity points of a deposited gem a new total rarity points for the vault isn't calculated/updated. Therefore, the staking reward amount/rate isn't updated. Furthermore, it is not possible to withdraw the gem (due to certain checks for security reasons).
Does anyone know of a way to fix or get around this? (Maybe updating/refreshing the Vault struct will fix it?)
Example/issue:
Two gems, each with rarity points of 1, are moved to the vault (and may also be staked) and while they are in the vault the rarity points of one of them are set/updated to 4.
(The same things apply to a scenario with just a single gem that gets rarity points updated while in the vault)
The amount of tokens rewarded from staking remains unchanged after the update, so it seems as if the calculated total rarity points of the vault isn't updated/refreshed.
Furthermore, trying to withdraw the gem with 4 rarity points now fails with the 0x1770 error as the program tries subtracting 4 from 2 (see attached screenshot) - it appears that the calculated total rarity points of the vault is updated somewhere (but not the place that affects staking rewards).
Question:
Is there any way of "refreshing" the total calculated rarity points of a vault after the rarity points of a gem (or several) in the vault has been changed?
(I.e. is it possible to change/update the rarities if the staking of a collection of gems is already live)
The text was updated successfully, but these errors were encountered: