Two composable primitives around Morpho:
- WMORPHO — a liquid, transferable wrapper for the (originally non-transferable) MORPHO token.
- Omnipool — an ERC4626 meta-allocator that spreads one asset across several MetaMorpho vaults, inspired by Conic Finance.
Update (2026). When this was built (mid-2024) the MORPHO token was non-transferable — holders could accrue rewards but not move the token. Morpho only shipped its own official "Wrapped MORPHO" in November 2024. WMORPHO here anticipated that move: wrap the illiquid token into a freely-transferable receipt while the underlying stays escrowed, and let claimed rewards accrue to holders.
An ERC4626 receipt over MORPHO:
- Wrap 1:1.
wrap(amount)escrows MORPHO and mints transferablewMORPHO. - Rewards accrue to holders.
claimRewards(claimable, proof)pulls MORPHO rewards from the distributor into the wrapper; the extra MORPHO raises the share price, so every holder's wMORPHO appreciates (wstETH-style, no per-user bookkeeping). - Gated redemption. Unwrapping to the underlying is disabled until
enableTransfers()is called — mirroring MORPHO's own non-transferability, the wrapped token trades even while the underlying cannot yet leave the wrapper. - Inflation-attack resistant via OpenZeppelin's virtual-shares ERC4626.
An ERC4626 vault that allocates a single underlying across multiple ERC4626 child vaults (e.g. MetaMorpho) by governance-set weights:
- One deposit, diversified. Depositors get one receipt share for the whole basket; deposits are routed across children by target weight, withdrawals pull them back.
- Weights & rebalancing. Weights sum to
ONE(1e18);rebalance()shuffles funds toward targets net-neutrally (totalWithdrawn == totalSupplied), also deploying idle. - Reward integral. Multiple incentive tokens are distributed to shareholders via an
accRewardPerShareintegral, checkpointed on every transfer so the share token stays freely transferable while staying reward-exact. - Curated & timelocked. Roles (
owner/curator/allocator/guardian); enabling a vault or loosening a cap is timelocked and can be vetoed by the guardian, while de-risking (tightening a cap, removing an emptied vault) is instant. - Safety. Per-vault caps, an idle buffer for cheap small withdrawals, reentrancy guards, and OpenZeppelin virtual shares against inflation/donation attacks.
src/
├── Omnipool.sol ERC4626 meta-allocator over child vaults
├── WMORPHO.sol liquid MORPHO wrapper
└── interfaces.sol external interfaces (rewards distributor, MetaMorpho)
script/Deploy.s.sol deployment script
test/
├── Omnipool.t.sol omnipool unit tests
├── WMORPHO.t.sol wrapper unit tests
├── Integration.t.sol end-to-end scenarios
└── utils/ mock ERC20, mock ERC4626 vault, mock distributor
Requires Foundry.
git clone --recurse-submodules <repo-url>
cd wMORPHO
forge build
forge testThe suite is fully self-contained (mock collateral, mock vaults, mock distributor) and runs in CI without any RPC or secrets.
See SECURITY.md. This is research-stage, unaudited code; external audits are planned before any production use.
Released under the MIT License.