Morpho V2 To Morpho V2 Policy
The Morpho V2 To Morpho V2 Policy is a base contract for Morpho V2 to Morpho V2 policies that provides common fee logic and rate determination functionality.
Summary
- Abstract contract (cannot be deployed standalone), must be extended by a policy contract
- Specifically designed for Morpho V2 to Morpho V2 rolling
- Fee charged based on duration between terms
- Fee calculation:
feeAmount = repaidDebt × duration × feeRate- Where
duration = targetMaturity - sourceMaturity
- Where
- Maximum fee: 100% APR (expressed per second)
beforeRoll: Snapshots fee recipient balanceafterRoll: Validates fee payment- Includes
previewFeefunction for off-chain simulation - Requires concrete implementations to define
getRate()function for auction rate curves
Linear Rate Policy (extends Morpho V2 To Morpho V2 Policy)
The Linear Rate Policy implements a simple linear auction rate curve with one kink point.
Rate Curve

Parameters
kink: Percentage of auction duration where rate reaches maximum (max 100%)- Inherited:
fee,feeRecipient
Target Rate Policy (extends Morpho V2 To Morpho V2 Policy)
The Target Rate Policy implements a multi-kink auction rate curve.
Rate Curve

Parameters
kink1: When target rate is reachedkink2: When target rate plateau endskink3: When max rate is reachedtargetRate: Intermediate rate level (max 100% APR)maxRate: Maximum acceptable rate (max 100% APR)- Inherited:
fee,feeRecipient