# v7 Protocol

## Introduction

Distribution v7 is a modular and scalable protocol designed to aggregate real yield from multiple asset sources, calculate user rewards, and distribute its native token, MOR, across various categories of protocol participants. Its architecture is centered around isolated `DepositPools`, reward generation and distribution logic.

Protocol enables users to stake supported tokens (e.g., stETH, USDC, USDT, cbBTC, wBTC, wstETH, wETH) and earn MOR tokens as rewards. The amount of MOR earned is based on real yield generated through integrated protocols (like Aave) and is influenced by factors such as stake amount, lock duration, and user role within the ecosystem.

## Main concepts

### Staking

Users deposit supported tokens into specific `DepositPool` contracts. Each `DepositPool` supports a single asset and maintains isolated accounting, multipliers, and reward logic. Staked tokens are immediately transferred to the `Distributor`, which manages all yield generation and ensures consistent application of reward mechanics.

### Yield generation

The `Distributor` deposits yield assets such as wBTC, USDC and other into integrated DeFi protocols like Aave to generate real yield. For stETH, however, yield is not derived from lending markets — instead, it relies on Lido’s native rebasing mechanism, which increases the stETH balance over time as staking rewards accrue.

To accurately track and normalize this yield across different token types, the protocol uses the `ChainLinkDataConsumer` contract. This contract fetches real-time price feeds for all supported assets and converts yield into a unified base value (e.g., USD). This ensures fair and transparent reward distribution, regardless of which asset the user stakes.

### MOR reward calculation

The `Distributor` calculates the total MOR reward value for each `DepositPool`. It queries the `RewardPool` contract to determine the amount of MOR to emit over a given time frame, using pre-defined emission curves. Then, it passes that reward amount to each `DepositPool`, which handles reward splitting among its stakers using local multipliers (e.g., power factor, referrals).

### Cross-chain messaging and bridging

The `L1SenderV2` contract manages all cross-chain transfers from Ethereum to Arbitrum:

* It sends MOR reward data to `L2MessageReceiver` on Arbitrum via LayerZero, triggering minting of MOR tokens.
* It transfers real yield (e.g., wstETH) to `L2TokenReceiverV2` via the Arbitrum Bridge.
* It uses Uniswap v3 to swap yield-denominated tokens into wstETH before bridging.

### L2 execution and liquidity management

On Arbitrum, `L2MessageReceiver` and `L2TokenReceiverV2` handle reward minting and liquidity provisioning. MOR tokens can then be distributed to users, added to Uniswap liquidity pools, or used in further reward programs.
