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

Merging existing solutions #13

Open
0x-r4bbit opened this issue Oct 8, 2024 · 0 comments
Open

Merging existing solutions #13

0x-r4bbit opened this issue Oct 8, 2024 · 0 comments

Comments

@0x-r4bbit
Copy link
Collaborator

After we've implemented two different staking solutions,
it's time for us to compose them into something that uses the best properties of both worlds.

Right now there's logos-co/staking and vacp2p/staking-reward-streamer.
We've reached consensus that the latter is the better solution for the problem at hand, as it allows for real-time balance updates in the protocol.

However, the former comes with a few architectural benefits that we'd like to leverage as well.
Namely the composition of StakeVault and StakeManager and its whitelisting capabilities.

This bigger task is putting together a codebase that makes use of the StakeVault <-> StakeManager architecture, while also implementing the multiplier point system from the staking-reward-streamer solution.

@0x-r4bbit 0x-r4bbit added this to the staking-protocol-v1 milestone Oct 8, 2024
3esmit added a commit that referenced this issue Oct 8, 2024
…dsStreamerMP

This commit adds the following changes:
- Add the contract `StakeVault` so funds can be stored safely by the user. #14
- Added the interface `ITrustedCodehashAccess`  and contract `TrustedCodehashAccess` in the `src/access` directory, which implements the `ITrustedCodehashAccess` interface and provides functionality to set or update the trust status for a contract's codehash and implemented it on `RewardStreamerMP`. #15
- added the interface `IStakeManager` and implemented it on `RewardStreamerMP`  #13
These changes are necessary to enforce security measures and restrict access based on the codehash of the caller, and allow for better reuse of code between StakeManager and RewardStreamerMP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment