Staking ProtocolwithdrawalVariationslockCheckerWithdrawalVariationFacet
LockCheckerWithdrawalVariationFacet
This facet implementation enables withdrawal variations that allow for perpetual rewards but restricts both partial and full unstaking until the specified unlocking timestamp is reached.
Manages user withdrawal operations within the context of the staking campaigns in which they participate.
CannotUnstakeYet
Thrown when an attempt is made to unstake a position before its unlock timestamp is reached.
handleUnstake
Verifies that the unlockTimestamp
for a specified position has expired, then returns
the specified amounts of reward and input packets without applying penalties.
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The unique identifier of the NFT associated with the staking position. |
amountOfRewardPackets | uint256 | The total number of reward packets to be returned. |
amountOfInputPackets | uint256 | The total number of input packets to be returned. |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The total number of reward packets returned. |
[1] | uint256 | The total number of input packets returned. |
handleReward
Returns the specified number of reward packets without applying penalties.
Parameters
Name | Type | Description |
---|---|---|
uint256 | ||
amountOfRewardPackets | uint256 | The total number of reward packets to be returned. |