> For the complete documentation index, see [llms.txt](https://liq-3.gitbook.io/stake.liq/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liq-3.gitbook.io/stake.liq/staking-module/staking.md).

# Staking

Components

LiQ’s staking model is designed to maximize yield for MNT holders by leveraging DeFi strategies. Staked MNT is deployed into these strategies to generate returns. Stakers receive stMNT, a liquid staking token that represents their staked MNT and accrued rewards.

## Key Components

1. Staking Pool:\
   The staking pool is a smart contract where users deposit their MNT tokens. These tokens are then deployed into DeFi strategies to generate yield.
2. stMNT (Staked MNT):\
   Upon staking, users receive stMNT, a liquid staking token that represents their share of the staking pool. stMNT is transferable and can be used in other DeFi protocols while still earning staking rewards.
3. DeFi Strategies:\
   LiQ employs a variety of DeFi strategies to generate yield, including: High performing yield vaults on Mantle and across other chains

&#x20;     **Yield Farming**: Depositing assets into yield farming protocols to earn additional rewards.&#x20;

&#x20;     **Lending**: Lending MNT to borrowers on lending platforms to earn interest.

4. **Rewards Distribution**:\
   Rewards generated from DeFi strategies are distributed to stakers in the form of additional stMNT. The value of stMNT increases over time as rewards are accrued.

## Staking Process

**Step 1:** Deposit MNT Users deposit their MNT tokens into the LiQ staking pool. This is done through a simple transaction on the Mantle Network.

```solidity
// function stakeMNT(uint256 amount) external {
    require(amount > 0, "Amount must be greater than 0");
    require(MNT.transferFrom(msg.sender, address(this), amount), "Transfer failed");

    uint256 stMNTAmount = amount;
    if (totalStaked > 0) {
        stMNTAmount = (amount * totalStMNT) / totalStaked;
    }

    _mint(msg.sender, stMNTAmount);
    totalStaked += amount;
    totalStMNT += stMNTAmount;

    emit Staked(msg.sender, amount, stMNTAmount);
}
```

**Step 2**: Receive stMNT Upon depositing MNT, users receive stMNT tokens at a 1:1 ratio initially. The value of stMNT increases as rewards are accrued.

**Step 3:** DeFi Strategy Deployment The staked MNT is deployed into various DeFi strategies by the LiQ protocol. These strategies are carefully selected to balance risk and reward.

**Step 4:** Accrue Rewards Rewards generated from DeFi strategies are automatically reinvested into the staking pool, increasing the value of stMNT over time.

```solidity
// function accrueRewards(uint256 rewards) external onlyStrategy {
    uint256 stMNTRewards = (rewards * totalStMNT) / totalStaked;
    totalStMNT += stMNTRewards;
    totalStaked += rewards;

    emit RewardsAccrued(rewards, stMNTRewards);
}
```

**Step 5:** Redeem MNT Users can redeem their stMNT for MNT at any time. The amount of MNT received is proportional to the current value of stMNT, which includes accrued rewards.

```solidity
// function redeemMNT(uint256 stMNTAmount) external {
    require(stMNTAmount > 0, "Amount must be greater than 0");
    require(balanceOf(msg.sender) >= stMNTAmount, "Insufficient stMNT balance");

    uint256 mntAmount = (stMNTAmount * totalStaked) / totalStMNT;
    _burn(msg.sender, stMNTAmount);
    totalStaked -= mntAmount;
    totalStMNT -= stMNTAmount;

    require(MNT.transfer(msg.sender, mntAmount), "Transfer failed");

    emit Redeemed(msg.sender, stMNTAmount, mntAmount);
}
```
