Docs

Integrate Rewards for Earn Products

Display and claim Morpho Vault rewards in an earn product, from fetching campaign data to presenting claimable incentives.

Vault users on Morpho can earn rewards beyond base lending yield. Integrating rewards display and claiming is essential for providing competitive APY and maximizing user returns.

What's Unique for Earn Products

When building earn products, understand that vault users earn rewards from two sources:

  1. Direct Vault Campaigns: Rewards distributed directly to vault users
  2. Forwarded Market Campaigns: Rewards from underlying markets where the vault allocates liquidity

Critical integration requirement:

Net APY = Native Vault APY + Vault Campaign APR + Forwarded Market Campaign APR - Performance Fee - Management Fee

This schematic formula starts from a gross native vault rate. The fee terms represent their effect on yield, not the configured fee percentages.

Do not deduct fees again from Read API data.apy. The Vault V1 APY endpoint explicitly returns post-fee APY. The Vault V2 APY endpoint measures share-price evolution, which reflects fee shares minted to recipients. For these realized rates, use:

netApyApproximation = readApiNativeApy + directRewardApr + forwardedRewardApr

Follow APY (Native + Rewards) for direct vault campaigns plus allocation-weighted market rewards using the Read API and Merkl. Market campaign types beyond MORPHOSUPPLY and nesting deeper than one level are not included, so the result can remain below the app. The example uses current allocations with averaged APRs, not historical allocation weights.

Integration Steps

Follow the centralized rewards tutorials with vault-specific considerations:

Step 1: Fetch Vault Rewards Data

Follow: Fetch the reward APR of a vault or market

Vault-specific notes: Use the Read API for native APY and allocations, and Merkl for direct vault and market reward APRs. The linked recipe weights forwarded market APR by the vault allocation before combining the rates.

Step 2: Display Rewards in Your UI

Follow: Integrate Rewards Display

Vault-specific notes:

  • Prominently display Net APY (native + all rewards)
  • Show breakdown: base yield vs. rewards
  • List reward tokens with their respective APRs
  • Optionally show which markets contribute to forwarded rewards

Step 3: Enable Reward Claiming

Follow: Claim Rewards

Important: The claiming process is identical for all Morpho users (vault users, borrowers, market suppliers). Merkl handles all reward claims.

Quick Reference

TaskMain TutorialVault-Specific Consideration
Understanding rewardsReward CampaignsUnderstand forwarding mechanism
Distribution systemDistribution SystemsMerkl for all users
Fetch rewardsFetch Rewards DataRetrieve claimable rewards from Merkl
Display rewardsIntegrate DisplayShow total APY breakdown
Claim rewardsClaim RewardsSame process for all users

Need Help?