# Staker functionality

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.](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#stake)

**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](https://docs.lido.fi/guides/lido-tokens-integration-guide/#steth-internals-share-mechanics).

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.](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#withdraw)

**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\*10<sup>18</sup>. 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.](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#claim)

**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.](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#lockclaim)

## Receive stake data and multipliers

Use [`getCurrentUserReward`](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#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 = 10<sup>18</sup>.

Use [`getCurrentUserMultiplier`](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#getreferrermultiplier) to receive the power factor. Returns the multiplier, where x1 = 10<sup>25</sup>.

Use [`usersData`](/smart-contracts/documentation/distribution-protocol/v5-protocol/contracts/distributionv5.md#usersdata) to receive the information about user stake, lock periods...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.mor.org/smart-contracts/documentation/distribution-protocol/v5-protocol/get-started/staker-functionality.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
