Contracts

Protocol architecture

Ethereum core contracts

The central smart contract of the protocol, responsible for calculating, allocating, and emitting MOR tokens to predefined user buckets. These buckets represent different participant groups within the ecosystem: Capital, Providers, Builders, Compute, Coders, and Protection. The contract’s reward mechanism is based on user stake amounts (denominated in stETH) and is influenced by various multipliers, including time locks and referral bonuses. It features a linear emission decay model powered by the LinearDistributionIntervalDecrease library, ensuring a controlled and gradually decreasing token distribution over time. This supports long-term sustainability and prevents over-inflation. The contract integrates with L1Sender to relay reward and staking data to L2, and it uses LogExpMath and ReferrerLib libraries to perform advanced reward calculations and referral logic.

Handles cross-chain messaging from Ethereum (L1) to Arbitrum (L2). It sends reward data to the L2MessageReceiver via LayerZero, triggering the minting of MOR tokens. Additionally, it transfers stETH-based yield earned by the Morpheus protocol to L2TokenReceiverV2 using the Arbitrum Bridge. This ensures that both reward data and actual assets flow securely to the L2 environment for distribution and liquidity support.

Arbitrum One core contracts

The contract acts as the trusted endpoint for receiving messages from L1 via LayerZero. Its primary role is to securely handle incoming data about MOR rewards sent from L1Sender. Once a valid message is received, the contract processes the payload and execute the token minting logic. It ensures seamless and verifiable communication between the two chains, preserving trust and synchronization of reward distribution.

The contract responsible for handling inbound token transfers from L1, specifically the yield earned in stETH. This contract works in tandem with Arbitrum Bridge to securely receive cross-chain token bridged assets. Once received, these assets (typically wstETH) can be swapped or utilized within the L2 environment—for example, converted into MOR tokens and added to liquidity pools like Uniswap to support the protocol’s token economy. It serves as a bridge landing point for real yield, enabling efficient liquidity flow into the L2 network.

Libs

LinearDistributionIntervalDecrease

This library manages the linear emission decay mechanism used to gradually reduce the amount of tokens distributed over time. It defines how the available reward amount decreases with each interval (e.g., daily, weekly), allowing the protocol to implement a predictable emission schedule. Used by the DistributionV5 contract to calculate how many MOR tokens can currently be distributed based on the time elapsed since the start of the distribution schedule.

LockMultiplierMath

This library provides logic to compute multipliers based on how long a user locks their staked tokens (stETH). The longer the lock duration, the higher the multiplier — encouraging users to stake for longer periods and reinforcing long-term alignment with the protocol.

LogExpMath

Provides high-precision mathematical functions for logarithmic and exponential operations, which are crucial in many DeFi reward calculations (e.g., bonding curves, APY adjustments, dynamic pricing). Solidity lacks native high-precision log/exp functions, so this library ensures safe and accurate computations.

ReferrerLib

Implements referral program logic, enabling the protocol to reward stakers for inviting others. It tracks referral relationships, determines the eligibility of rewards.

Periphery

Uniswap V3

Used to manage MOR token liquidity on Arbitrum. These contracts allow the protocol to add/remove liquidity, perform swaps, and rebalance pools efficiently.

Used contracts:

  • SwapRouter - facilitates MOR/ETH or MOR/stETH token swaps (and vice versa) within the Uniswap V3 ecosystem.

  • NonfungiblePositionManager - manages liquidity positions represented as NFTs in Uniswap V3.

Links:

Layer Zero V1

Cross-chain messaging protocol used to connect Ethereum (L1) and Arbitrum (L2).

Used contracts:

  • EndpointV1 - acts as the primary messaging interface between L1 and L2.

Links:

Arbitrum Bridge

Used to transfer native or ERC-20 tokens between Ethereum and Arbitrum.

Used contracts:

  • L1GatewayRouter - sends token bridging instructions from Ethereum.

  • L2GatewayRouter - receives tokens on Arbitrum and finalizes transfer.

Links:

OpenZeppelin

Used extensively across contracts to support secure access control and upgradeability:

  • OwnableUpgradeable – enables ownership access control.

  • UUPSUpgradeable – facilitates contract upgradeability via the UUPS (Universal Upgradeable Proxy Standard) pattern.

Links:

Last updated

Was this helpful?