Staker functionality

The page describes what a staker can do as part of the protocol.

All of the functions described below are executed on the DistributionV5 smart contract.

Stake

The stake function allows users to deposit stETH into the protocol from the Ethereum network, then the staker will get a share of the rewards. Available only for capital stakers.

The function interface here.

Notes

The user can optionally pass a claimLockEnd_ timestamp during staking, which sets a period before which claiming is not allowed. In return, this provides an additional multiplier to the effective stake, increasing the user’s MOR reward potential. The multiplier is recalculated every time a user stakes. If the claimLockEnd_ timestamp remains unchanged, the multiplier will gradually decrease over time according to a predefined curve. If claimLockEnd_ was previously set, it does not need to be provided again.

Additionally, the staker may specify a referrer_ address. This also grants a multiplier to the stake. The user is allowed to pass their own address as the referrer, which still qualifies for the bonus.

The final amount of stETH tokens received by the smart contract may be less than what the staker initially specified. This is due to the internal mechanics of how stETH transfers work — part of the transfer might be rebased or adjusted by the Lido protocol.

The withdrawal of stETH will be locked for a specific period, as defined in the smart contract parameters. This lock duration is reset after each new stake, meaning the withdrawal timer starts over every time the user stakes additional tokens.

Staked stETH remains in the DistributionV5 contract.

Recommendations for a successful transaction

  • The smart contract performs a transferFrom of stETH from the caller’s address. Therefore, make sure the DistributionV5 contract has sufficient allowance for the stETH token. The allowance must be greater than or equal to the amount being staked.

  • poolId_ must be 0, since direct staking is only allowed for the capital bucket.

  • amount_ must be greater than 0 and at least equal to the minimum stake amount defined in the DistributionV5 contract.

  • claimLockEnd_ must be either 0 (i.e. not setting a lock), or a timestamp greater than the current block timestamp (i.e. in the future).

Withdraw

The withdraw function allows users to retrieve their staked stETH after a withdraw lock period. Available only for capital stakers.

The function interface here.

Notes

Users can only withdraw after the minimum staking period has passed or minimum withdraw timestamp has passed (defined in the smart contract parameters). This does not affect already accrued MOR rewards — users still retain the right to claim them.

If the staker wants to withdraw all of their tokens, they can pass a value greater than their current stake, such as 999,999,999*1018. The contract will interpret this as a request to withdraw the full amount, without requiring the user to specify the exact number of staked tokens.

Recommendations for a successful transaction

  • The lock period has ended.

  • The withdrawal amount must be greater than zero. The user cannot withdraw 0 tokens.

  • If partially withdrawing, the remaining stake after withdrawal must not fall below the minimum stake amount defined in the smart contract parameters.

Claim

The claim function enables stakers to receive the MOR tokens they’ve accrued.

The function interface here.

Notes

The MOR tokens are minted on the Arbitrum network. Claims can be done multiple times and don’t require withdrawing the stake.

Calling this function requires sending additional native ETH, as it utilizes LayerZero and cross-chain communication. The required amount of ETH can be estimated through the LayerZero interface. It is possible to send more than necessary—any excess will be refunded to the user’s account.

Recommendations for a successful transaction

  • Make sure that the user has rewards available to claim.

  • Verify that the claim is unlocked—meaning the lock period after staking and after the last claim has passed. Also ensure that claiming is currently enabled for the Capital bucket.

  • Ensure that you are sending a sufficient amount of ETH to cover the LayerZero cross-chain messaging cost.

Lock claim

The function enables stakers to lock rewards and receive claim lock multiplier (power factor). Used when a user has an active stake and wants to receive a multiplier without triggering a new staking transaction.

The function interface here.

Receive stake data and multipliers

Use getCurrentUserReward to receive the total claimable MOR token rewards for a given user within a specific bucket, based on their current stake and multipliers. Where 1 MOR = 1018.

Use getCurrentUserMultiplier to receive the power factor. Returns the multiplier, where x1 = 1025.

Use usersData to receive the information about user stake, lock periods...

Last updated

Was this helpful?