Skip to main content
On Morpho Blue markets, you can charge your own fee on loans opened through your integration: on the collateral a user supplies, on the amount they borrow, or both. Fees are taken on-chain by Yield.xyz fee contracts that sit between the user and Morpho Blue. The position always stays on the user’s own address, so liquidation works exactly as it does on Morpho. Fees are available on Morpho Blue markets today. Aave V3, SparkLend and Lista carry no fee contract, and their markets’ fee fields are always zero.

How fees are configured

Fee contracts are configured per project, and per integration, with the Yield.xyz team. Each fee is set in basis points, as a default and optionally per market, and is capped on-chain at 500 bps (5%) per operation. Commercial terms are on Plans. Read the fees on a market before you build an action: A configured contract can still charge 0: the address tells you a contract is in place, and the bps tells you the current rate.

Fee on collateral: the supply wrapper

The supply-collateral fee is charged on supply. When the wrapper applies, the action’s APPROVAL targets the wrapper instead of Morpho, and the wrapper deducts its fee before the rest reaches Morpho as collateral. A supply of amount leaves amount × (1 − feeBps / 10000) as collateral. The action previews the fee in metadata.feeAmount, in raw units of the supplied token, and metadata.feeBps. predictedHealthFactor and predictedLtv already reflect the collateral after the fee. When you size a supply by borrowAmount and targetLtv on a first deposit, the API grosses up the collateral so the target LTV still holds after the fee.

Fee on borrowed capital: the borrow allocator

The borrow allocator charges an origination fee on the borrowed amount. This is usually the natural place to charge, because the fee scales with the loan the user takes. When the allocator applies, a borrow routes through it:
  1. AUTHORIZE lets the allocator borrow on the user’s behalf on Morpho. It is added only when the user has not already authorized it.
  2. BORROW goes through the allocator. It borrows from Morpho against the user’s own position, sends the fee to your fee recipient and sends the rest to the user. The API grosses up the principal so the user receives the amount they asked for, and the recorded debt is correspondingly higher.
  3. DEAUTHORIZE revokes the authorization, when your project is configured to leave no standing authorization. A DEAUTHORIZE is also added when a withdraw, or a repay with a collateral leg, takes all remaining collateral and closes the user’s last Morpho Blue position on that network.
Supply, repay and withdraw go straight to Morpho; the allocator is only in the path when a fee is taken. The action previews the fee in metadata.originationFeeBps, metadata.originationFeeAmount and metadata.effectivePrincipalAmount.

Next steps

Core concepts

Actions and the preview metadata that reflects these fees before you sign.

Borrow objects

Every fee field on markets and actions.

Borrow API guide

How fees change the transactions and amounts an action returns.