Referral system
Overview
The protocol referral system is a fully on-chain mechanism designed to incentivize community-driven growth. It enables existing users (referrers) to invite new stakers (referees) to stake into the protocol and rewards both parties accordingly. This guide outlines how the system works from a technical and user interaction standpoint.
The referral system allows a user (referrer) to share their address with others. When a new user (referee) stakes with that referral address, the referee receives a 1% bonus, and the referrer can receive up to 5% in MOR tokens depending on the total amount deposited by their referees.
The system is implemented directly in the DepositPool
contract and uses storage mappings to track referral tiers, user deposits, and accumulated rewards. ReferrerLib
uses for the internal calculations.
Mechanics
Referral Address Creation
Any wallet address can be used as a referral address. Except for the zero address — the zero address indicates that the referee is not set.
No separate registration is required — the referrer simply provides their address to others.
Staking with a referral
When a new user (the referee) wants to participate in staking, they use the stake
function of the DepositPool
contract. As part of this call, they provide the wallet address of the person who referred them by passing it as the referrer_
parameter.
The contract then stores this address as the user’s associated referrer and updates internal referral data accordingly. This includes tracking the total staked amount associated with that referrer, which can impact the referrer’s bonus tier.
As an immediate benefit, the referee (staker) receives a 1% bonus on their deposit, increasing their virtual stake and potential MOR rewards.
Referrer rewards
The referrer earns MOR rewards based on the total deposits made by referees using their referral address. The rewards are tiered based on cumulative virtual stETH deposits. Tier updates are performed automatically in _applyReferrerTier
function.
0
< 3.5 stETH
3%
1
≥ 3.5 stETH and < 35 stETH
4%
2
≥ 35 stETH and < 350 stETH
4.5%
3
≥ 350 stETH
5%
To retrieve information about referral tiers and the current tier of a user (referrer), the DepositPool
contract provides public view functions and structured storage that can be accessed on-chain or via a blockchain indexer.
Referral tiers for a given reward pool (bucket) are stored in the referrerTiers
mapping, which maps a rewardPoolIndex
to an array of ReferrerTier
structs. Each ReferrerTier
contains two fields:
Required amount of stETH deposited by referees (amount) in wei.
Corresponding multiplier that determines the MOR bonus the referrer receives, where
<multiplier> / 10^23 = <bonusPercent>
To determine which tier a specific user (referrer) currently belongs to, we can use referrersData
. This struct contains a field virtualAmountStaked
which reflects the total staked amount attributed to that referrer from all referees. By comparing this value with the thresholds defined in referrerTiers
, you can determine the user’s active tier and associated bonus multiplier.
For convenience, the function getReferrerMultiplier
can be used to get the current effective multiplier for a specific referrer, accounting for their tier status.
Lock Compatibility
Referrer rewards are not blocked by the referee’s lock conditions. This means a referrer can claim their MOR bonus even if the referee’s MOR is still locked under a Power Factor curve.
No Referral Provided
If a referee does not provide a referral address when staking, no referral bonuses are distributed.
Claim
Referee claim process
Referees — users who staked tokens (e.g., stETH) and may have used a referral address — can claim their accumulated MOR rewards by calling the claim
function.
Referrer Claim Process
Referrers — users whose referral address was used during staking — accumulate MOR bonuses based on the total amount of deposits made by referees and the tier multiplier they qualify for.
uint256 referrerVirtualAmount = totalStakedByRefereeVirtualAmount * bonus;
To claim their referral rewards, a referrer calls claimReferrerTier
. This mechanism ensures that both types of participants — referees and referrers—can transparently and securely access their rewards, with all lock periods enforced and yield data synchronized across chains.
Last updated
Was this helpful?