-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow for data retrieval of individual users #70
Milestone
Comments
Hi @0x-r4bbit , I have thought of a few solutions for this problem.
If you like any of these suggestions, I can create a PR for implementing it. |
3 tasks
@TheMarvelFan Hey man! Thank you for showing your interest in contributing to this project. Feel free to take a look and leave your feedback there! |
0x-r4bbit
added a commit
that referenced
this issue
Oct 25, 2024
This commit introduces changes related to vault registrations in the stake manager. The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user. The `StakeVault` now comes with a `register()` function which needs to be called to register itself with the stake manager. `StakeManager` has a new `onlyRegisteredVault` modifier that ensures only registered vaults can actually `stake` and `unstake`. Closes #70
0x-r4bbit
added a commit
that referenced
this issue
Oct 30, 2024
This commit introduces changes related to vault registrations in the stake manager. The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user. The `StakeVault` now comes with a `register()` function which needs to be called to register itself with the stake manager. `StakeManager` has a new `onlyRegisteredVault` modifier that ensures only registered vaults can actually `stake` and `unstake`. Closes #70
0x-r4bbit
added a commit
that referenced
this issue
Nov 29, 2024
This commit introduces changes related to vault registrations in the stake manager. The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user. The `StakeVault` now comes with a `register()` function which needs to be called to register itself with the stake manager. `StakeManager` has a new `onlyRegisteredVault` modifier that ensures only registered vaults can actually `stake` and `unstake`. Closes #70
0x-r4bbit
added a commit
that referenced
this issue
Dec 1, 2024
This commit introduces changes related to vault registrations in the stake manager. The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user. The `StakeVault` now comes with a `register()` function which needs to be called to register itself with the stake manager. `StakeManager` has a new `onlyRegisteredVault` modifier that ensures only registered vaults can actually `stake` and `unstake`. Closes #70
0x-r4bbit
added a commit
that referenced
this issue
Dec 3, 2024
This commit introduces changes related to vault registrations in the stake manager. The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user. The `StakeVault` now comes with a `register()` function which needs to be called to register itself with the stake manager. `StakeManager` has a new `onlyRegisteredVault` modifier that ensures only registered vaults can actually `stake` and `unstake`. Closes #70
0x-r4bbit
added a commit
that referenced
this issue
Dec 3, 2024
This commit introduces changes related to vault registrations in the stake manager. The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user. The `StakeVault` now comes with a `register()` function which needs to be called to register itself with the stake manager. `StakeManager` has a new `onlyRegisteredVault` modifier that ensures only registered vaults can actually `stake` and `unstake`. Closes #70
github-project-automation
bot
moved this from In Progress
to Done
in Tasks - Smart Contracts
Dec 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #62 we made a change that underlined the fact that the staking protocol doesn't really know anything about users.
However, we've realized that there's an issue:
XPNFTToken
which usesXPToken
to render any given user's XP balanceStakeVault
sStakeVault
sIf some user X wants to see their XP token balance in their XP NFT, they'll have a balance of 0 because it's not their EOA (or smart account) that is registered with the staking system, but rather the
StakeVault
s.We want the users to be able to see their XP balance that is also determined by their stake amount, so somewhere in the system, there has to be a connection between the users and the vaults they are creating/registering with the system.
One way to go about this is to reintroduce some notion of
VaultOwner
in the staking protocol that keeps track of each vault that an owner has created:Something along those lines.
The
StakeVault
could then register itself during instantiation:One thing that could potentially be an issue here is that an account could create many stake vaults and register them without actually staking.
With enough vaults,
getUserTotalMP
could run into a block gas limit.One thing we could do to reduce the likelyhood is to only register with the
StakeManager
when a vault is actually callingstake()
as this would require users to also add stake into the system.The text was updated successfully, but these errors were encountered: