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

Allow users to create staking vaults #3

Closed
0x-r4bbit opened this issue Jan 9, 2025 · 5 comments · Fixed by #8
Closed

Allow users to create staking vaults #3

0x-r4bbit opened this issue Jan 9, 2025 · 5 comments · Fixed by #8

Comments

@0x-r4bbit
Copy link
Collaborator

Once the wallet connection from #2 is implemented, the next step is to allow users to create vaults for the protocol.
There are various ways to do this:

  • Either use the vault factory we've deployed on a testnet (this is the easier version as it would be a simple function call), or
  • Implement the deployment "from scratch" via just the front-end

For starters, the first option will likely yield results faster.
The second option however, should probably be the final version of this.

@0x-r4bbit
Copy link
Collaborator Author

One thing to add here:

Vaults have to be registered with the staking manager proxy.
When the second option is implemented, this can be abstracted away nicely via UI.

@mart1n-xyz
Copy link
Contributor

Pleasem, can you link/share the testnet deplyment addresses and ABI?

@0x-r4bbit
Copy link
Collaborator Author

@mart1n-xyz

Here are the contract addresses (Sepolia):

SNT:
https://sepolia.etherscan.io/address/0xE452027cdEF746c7Cd3DB31CB700428b16cD8E51#writeContract

VaultFactory:
https://sepolia.etherscan.io/address/0xef5edc2c16413efafb1d8e5f2e4a25b16eb7480d#code

StakeManagerProxy:
https://sepolia.etherscan.io/address/0xd302bd9f60c5192e46258028a2f3b4b2b846f61f#code

ABIs you can find on the Etherscan links.

@0x-r4bbit
Copy link
Collaborator Author

One thing to be aware of is that there's currently a bug in the reward system: vacp2p/staking-reward-streamer#102

This will be fixed and the contract will be upgraded, so the addresses will stay the same.

@mart1n-xyz
Copy link
Contributor

I might need some clarification here @0x-r4bbit. Getting the first vault ready for staking:

  1. deploying the vault contract
  2. registering it with the staking manager

Only then can the user stake. Is that correct?


With this being rather tedious you are proposing:

Implement the deployment "from scratch" via just the front-end

Can you be more specific? I am not sure what that means. Are you saying there would be some router that I would call and it would deploy the vault and register it in one transaction? Why can't the register function be called from the factory? Ideally, we'd also want the stake transaction bundled with this.

@mart1n-xyz mart1n-xyz linked a pull request Jan 15, 2025 that will close this issue
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 a pull request may close this issue.

2 participants