Oh wow, lots of memories from Morpho Optimizer. This made me want to share a few stories about the original story, vision, and name of Morpho.
Morpho Optimizer was Morpho’s first version (now deprecated). It grew to $ 1B in deposits and kicked everything off for us.
The idea was simple: we built a peer-to-peer matching layer on top of existing lending pools to optimize rates for lenders and borrowers, while piggybacking their liquidity.
At the time, the vision was to progressively evolve the Morpho Optimizer matching engine so it would rely less and less on the pool model as a fallback, but on active participants, until one day it could metamorphose: from the little caterpillar living inside the apple into a beautiful independent butterfly flying on its own.
That was already in the original 2021 whitepaper. And yes, that is why we are called Morpho (at least the main reason).
That said, we had to pause that vision because we had one big realization: the biggest problem in lending markets was not just capital efficiency. It was resiliency.
As one of the largest integrators of lending pools, we got to experience firsthand what it meant to build a multibillion-dollar integration on top of DeFi infrastructure. And honestly, it felt to risky to support global financial infra.
That is why we built Morpho Blue: immutable and simple code, isolated lending markets, infrastructure that gives integrators control, and a lending stack that can actually scale safely.
BUT: Morpho Midnight brings us back to the original vision of Morpho Optimizer: becoming fully free from legacy constraints and building a true market for credit.
Midnight also has a very powerful feature called callbacks: it lets lenders and borrowers use pools "as they wait for a peer-to-peer match"
This is what I was secretly most proud of in Morpho Midnight: it is both the ultimate vision of both Morpho Optimizer and Morpho Blue at the same time
Who remembers Morpho Optimiser?
Here's how you'd build a better one on Euler today. 👇
And create an interest rate swap market on top.
What does an Optimiser do?
On most lending protocols there's a spread between the lend and borrow rate. It emerges primarily because of the target 90% utilisation rate, which leaves breathing room for lenders to withdraw, and partly because of the protocol fee on borrower interest (typically 10% if the fee switch is on).
Borrowers pay 5%.
Lenders earn 0.9 * (1 - 10%) * 5% = 4.05%.
An Optimiser matches lenders and borrowers peer-to-peer somewhere in the middle where possible, and reverts to the variable rate pool when not.
Borrowers pay 4.5% (10% cheaper).
Lenders earn 4.5% (11% more yield).
Both are strictly better off if they can lend and borrow peer-to-peer.
Extra yield
It can get even better for borrowers on Euler than on a vanilla Morpho market.
The collateral they deposit sits in an Euler vault rather than idle, and can earn yield via cross-collateralisation when there's demand to borrow it.
For example, a borrower posting WETH as collateral for a USDC loan can have that WETH lent out to wstETH holders looping to capture LST yield. The WETH interest then offsets the cost of the USDC loan.
If that yield runs at even 1%, the effective borrow cost drops to 3.5%, a 30% reduction over regular Morpho market borrowing. 🤯
How to build
So how do you build this on Euler today?
Lenders deposit USDC into an Euler Earn vault. The Earn vault has two strategies: Morpho USDC/WETH (variable rate), and an Euler USDC/WETH P2P vault.
We'll call the P2P vault's shares eUSDC-P2P.
When a borrower takes out a new loan they always borrow from the P2P vault, which pulls deposits just-in-time from the Morpho market.
Similarly, when lenders withdraw, liquidity is preferentially pulled from the Morpho market.
The P2P vault gets its rate (call this the matched rate) by reading the IRM on the Morpho market and splitting the spread between lenders and borrowers.
It can do this because it's designed to be 100% utilised at all times. Effectively a pool of P2P loans. When a borrower repays, the excess deposits are pushed back into the Morpho market.
Parasitic?
The Optimiser and its host have a parasitic relationship. A rational lender or borrower should always migrate to the Optimiser, all else equal including risk. The host becomes wholesale backstop liquidity while the Optimiser captures the prime matched flow. Its economics degrade and the pool drifts towards full utilisation, where it becomes structurally fragile.
Morpho Optimiser was originally built on top of Aave's monolithic pool. Morpho's own isolated markets are now liquid enough to be vulnerable to the same dynamic. I say vulnerable, because parasites can kill their host given a long enough time frame.
When Morpho first built on Aave, the Aave team were delighted they had a new integration. They didn't realise Morpho Optimiser was silently hurting them. Every matched borrower was a borrower whose interest no longer flowed into Aave's pool. Utilisation drifted up, rates got more volatile, and Aave was carrying the tail risk while Morpho Optimiser took the benefits.
It's a vulnerability all variable rate pool models share.
The fix: a secondary market for pool exits
The solution, in my opinion, is liquid secondary markets for pools. You need an interest rate swap market, so people can exit a variable rate pool via a swap instead of a withdrawal, just like exiting a bond early.
Fortunately you can build this on Euler too, thanks to a feature that allows any ERC-4626 compatible vault on Euler to be accepted as collateral for any other.
Introduce a new Euler variable vault, call it eUSDC-variable, that cross-collateralises the P2P vault. You can deposit eUSDC-P2P shares and borrow USDC from eUSDC-variable, or vice versa. Since the underlying asset is identical (USDC on both sides, with eUSDC-P2P just being a yield-bearing USDC claim), the LTV can be set extremely high. 95% is realistic.
The main difference is duration risk: matched and variable rates can diverge, so the share values drift apart.
Two things become possible.
First, anyone stuck in the P2P pool can borrow themselves out without waiting for a withdrawal. They deposit eUSDC-P2P as collateral, which earns the matched rate, and borrow USDC from eUSDC-variable, which pays the variable rate. Net carry per second is matched minus variable. They've swapped an illiquid matched position for a liquid variable one, paying only the spread.
Second, anyone with a view on the spread can take a highly leveraged position on it, going long or short, by swapping into and out of the two pools on leverage. You're trading the interest rate market directly.
Pretty neat, huh?
I left Euler back in January and my understanding is that the Euler team have plenty to be getting on with right now, so I don't expect this to be built by them any time soon.
But if anyone fancies giving it a go, I have a vibe-coded prototype ready to share.
Matched vault, custom IRM, EVC borrow router. About 30 lines of actually novel code on top of existing Euler and Morpho infrastructure.
DM me if you want a look.
The original Morpho Optimiser is what put Morpho on the map. No reason a successor couldn't do the same for someone else.