Morpho is a peer-to-peer layer built on top of lending pools like Compound or Aave.
It is a lending pool optimizer: it improves the capital efficiency of positions on lending pools by seamlessly matching lenders and borrowers peer-to-peer. By doing so, Morpho enhances your rates while preserving the same experience, liquidity, and parameters (collateral factors, oracles, etc.) as the underlying pool.
This means that by using Morpho, you either receive, in the worst-case scenario, the APY of the underlying pool; or an improved APY thanks to P2P matching. The improved APY is called the P2P APY.
Morpho enables one to supply and borrow crypto assets with optimal capital efficiency and deep liquidity.
Either you have $MORPHO, either someone is delegating its voting power to you.
Only by using the protocols, or contributing to it. They are not transferable at the moment. More information in the doc later.
There is currently no ERC-20 ibToken. However, your position is, of course, recorded in Morpho's smart contracts. For example, you can visualize it on this front end, Etherscan, DeBank, or Zerion.
Similar to Uniswap v3, Morpho users have non-fungible positions. This is because some users are matched, and some others are not. It could be possible to eventually represent a Morpho position as an NFT, but it is currently not the case.
The Morpho Labs team is working on a set of ERC-4626 adapters to facilitate some integrations for the lenders' side. If this is something your use case needs, feel free to contact us directly.
With P2Pool, lenders provide liquidity to a pool of assets, and borrowers borrow liquidity from it. Instead of each party interacting directly with the other, they interact with a commonly shared pool. In that case, yields are socialized, meaning that the lenders share the interests paid by the borrowers proportionally to their share of the pool.
With P2P lending, lenders and borrowers are matched together directly without going through a pool. In that case, yields are not socialized, meaning that each lender gets the interest paid by the borrower(s) he is matched with on the entirety of the capital he lent.
Liquidity mining rewards can reduce the net APY (APY + rewards) spread between the lending and the borrowing side. If rewards campaigns are intense, it can even invert it, i.e., borrow APY < supply APY. In this scenario, Morpho can deactivate peer-to-peer matching to guarantee at least the liquidity mining inflated APY. Still, it will be less likely to have a strictly better APY.
Moreover, Morpho started a $MORPHO reward campaign which comes in the addition of native APY or the $COMP rewards. Hence, Morpho-Compound users are always strictly better than on Compound.
P2P is much more capital efficient than P2Pool. As a P2P layer on top of liquidity pools, Morpho combines the capital efficiency of P2P with the instant liquidity of P2Pool. We explain this in more detail in the core concepts.
You can read more about the concept here and here. You can also deep dive into the topic in the developers' documentation.
Yes. If there are not enough peers to match the total amount that a user deposited/borrowed, it is possible to have some funds matched and the rest sourced through the pool. In this case, the liquidity that matches P2P will earn the P2P APY while the rest of the liquidity will earn the pool's APY.
If a user does not get matched instantly, he will still enjoy the same rates as the underlying pool, plus the $MORPHO rewards. Moreover, the user can be matched later as new users come to Morpho.
Sometimes, the P2P APY is disabled for one of the following reasons:
- The $COMP rewards are more profitable.
- The borrowing cap set up by the underlying protocol has not yet been taken into account in the formal morpho model. As morpho insists on security, governance deactivated it.
- The borrow function is disabled by the underlying pool.
Today, Morpho is deployed on Ethereum Mainnet.
Morpho is currently not generating any revenue.
The ability to turn on protocol fees is present in Morpho's smart contract but is not activated at the moment. Governance decisions can turn it on.
Protocol fees, also called
reserveFactor,include a cut of the improved P2P APY. It comes from the spread between the P2P APY and
poolSupplyRatefor suppliers or
poolBorrowRatefor borrowers. This fee will later be defined by governance.
Remember that protocol fee only apply to P2P matches, meaning that Morpho will not take any fee if you are not matched P2P, ensuring that you still get at least the same APY as if you were directly interacting with the underlying pool.
Even though Morpho's matching engine requires looping the number of users, it is still scalable despite the constraints of blockchain. Indeed, Morpho's algorithm uses a finite for loop delimited by a maximum gas cost value for matching. So, if some liquidity is not matched P2P when the loop ends after reaching the maximum gas cost, whatever value remains unmatched will fall back on the pool. Hence, the full scalability of Morpho.
You've come to the right place! You will find everything you need by browsing this general documentation and the developers' documentation. If you already integrated Aave, switching to Morpho requires a few adjustments. If you still have questions after reading the docs, don't hesitate to contact us.
Morpho is as liquid as the protocol it plugs into. If sufficient liquidity exists in the underlying lending pool, you can withdraw the total amount, even if you were matched P2P. You can find more details in the Fallback mechanism and the Delta mechanism sections.
The P2P APY is calculated as follows:
αis called the peer-to-peer index cursor.
- andcorrespond to the underlying pool's Borrow and Supply rates. Morpho updates this information every time one of Morpho's functions is called by anyone or if someone directly calls the Update function.
Both parameters are defined by governance. In some edge cases, a small spread may be applied on either side due to the delta mechanism. Additionally, governance can decide to activate a small spread to accumulate funds in the reserve.
Morpho is redistributing all COMP accrued to users with a pool position. If a user is matched peer-to-peer, it will receive only the interest of native APY. But, the peer to peer matching is activated only when the COMP rewards are not profitable compared to a matched position.
To allow Morpho contract to spend ERC20-like tokens on your behalf, you first need to approve the Morpho contract to use your tokens. This mechanism is required to supply (deposit underlying asset through morpho) or repay (repay a debt of someone including you, with your token balance) on Morpho. So now, let's assume that you have approved x tokens A to Morpho as a spender (
tokenA.approve(morpho, x)). If you want to approve more (for example to repay more debt), you can call the approve function again. However, it will revert to USDT & CRV since this ERC20 has a specific approval mechanism. In a few words, if you already have given an allowance to morpho (
allowed(yourAddress, Morpho) > 0), you can not approve more tokens. So to unlock your approval to Morpho, you first need to set your approval to 0 (
USDT.approve(Morpho, 0)), and then, you will be able to choose your allowance.
The simplest way to allow 0 to Morpho contracts is to go through Etherscan and for each asset you want to re-approve: (verify the official address).
1- USDT token: 0xdac17f958d2ee523a2206206994597c13d831ec7 then go to the "write contract" section, connect your account, and click on "approve". Set the Morpho address as a spender (0x8888882f8f843896699869179fB6E4f7e3B58888 for Morpho-Compound and 0x777777c9898d384f785ee44acfe945efdff5f3e0 for Morpho-Aave), and enter 0 as the amount.
2- CRV token: (almost the same as USDT) 0xD533a949740bb3306d119CC777fa900bA034cd52 then go to the "write contract" section, connect your account, and click on "approve". Set the Morpho address as a spender (0x8888882f8f843896699869179fB6E4f7e3B58888 for Morpho-Compound and 0x777777c9898d384f785ee44acfe945efdff5f3e0 for Morpho-Aave), and enter 0 as the amount.
USDT token on Etherscan explorer
Then, sign and send the transaction to the blockchain. When the transaction will be validated, you can do the same thing with the desired amount instead of 0, or go through one dApp of Morpho, such as Morpho-Aave or Morpho-Compound