-
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
281 fix vested staking #82
Conversation
Pull Request Test Coverage Report for Build 11956212792Details
💛 - Coveralls |
@@ -59,6 +59,15 @@ abstract contract VestedStaking is IVestedStaking, Staking, Vesting { | |||
_stake(msg.sender, msg.value); | |||
} | |||
|
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.
IVestedStaking doesn't inherit IStaking
* @inheritdoc IHydraStaking | ||
*/ | ||
function stake() public payable override(IHydraStaking, Staking, VestedStaking) { | ||
VestedStaking.stake(); |
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.
Why not using super here?
* @notice Stakes sent amount. | ||
* @dev If user has active vested position, it will revert. | ||
*/ | ||
function stake() external payable; |
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.
This must be in IStaking
*/ | ||
function stake() public payable virtual override { | ||
if (vestedStakingPositions[msg.sender].isActive()) { | ||
revert StakeRequirement({src: "stake", msg: "IN_ACTIVE_POSITION"}); |
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.
super is not called here
8f8e9c6
to
cb1cc1d
Compare
ebaa88f
to
fbda956
Compare
No top-up is allowed on vested staking.
Now Delegtarts can delegate to the validator even after minStake is changed.
Clear stakingRewardsHistory, before opening vestedStaking.
Handle debt by requiring a staker to provide liquidity tokens, before opening a position!