-
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
feat: introduce StakeVault
and IStakeManager
#61
Conversation
d4b25c8
to
c8b8c3e
Compare
StakeVault
and IStakeManager
c8b8c3e
to
714c884
Compare
function MAX_LOCKUP_PERIOD() external view returns (uint256); | ||
function MP_RATE_PER_YEAR() external view returns (uint256); | ||
function MAX_MULTIPLIER() external view returns (uint256); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@3esmit I left out functions that aren't yet compatible with the reward streamer:
- Upgradeability
- Exiting
- Locking after stake
Will address those in future PRs
function amountStaked() public view returns (uint256) { | ||
return stakeManager.getStakedBalance(address(this)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@3esmit In this vault implementation I remove the functions to withdraw ETH.
The reason being is that this contract doesn't have any payable
functions or fallback/receive
implementations, so it can't receive any ETH anyways.
45b2ec5
to
7c18c8b
Compare
This introduces a first version of `IStakeManager`, highly inspired by the changes done in #39. However, in this commit, it only adds the methods that are currently supported by both, `StakeManager` and `RewardStreamerMP`. Future commits will add APIs for locking and leaving.
714c884
to
03e11e8
Compare
These two commits do the following:
StakeVault
which actually works with RewardStreamerMPIStakeManager
that asks for functions that are currently supported by the protocolThis work is highly inspired by @3esmit work in #39 but sliced into smaller chunks for easier review and so that we can start landing some of those changes.
This does currently not add
TrustedCodehashAccess
contract and interface #63lock()
on reward streamer contract #40)And leaving the system. (#66 )
Again, most of this work was done by @3esmit, this PR just makes some of the changes in #39 mergeable
Checklist
Ensure you completed all of the steps below before submitting your pull request:
pnpm adorno
?pnpm verify
?