[ARM] Deploy 044 USDC ARM Morpho Vault V2 market on mainnet - #334
[ARM] Deploy 044 USDC ARM Morpho Vault V2 market on mainnet#334clement-ux wants to merge 3 commits into
Conversation
naddison36
left a comment
There was a problem hiding this comment.
The ARM now uses convertToAssets on the lending market to calculate the economic value in totalAssets.
The ARM uses maxWithdraw to get the redeemable amount which can be lower when the market is highly utilized in allocate, claimRedeem and getReserves.
The lending market's maxRedeem is used in allocate.
So we want the wrapper's max functions to be the redeemable and not economic values.
|
Closing this PR for now because Morpho Vault V2 cannot be safely integrated through our generic ERC-4626 market wrapper. Vault V2 deliberately returns zero from |
Description
Add a Morpho Vault V2 market wrapper for the USDC ARM targeting the Wintermute USDC Prime vault. The target currently routes USDC through a direct, loss-aware
MorphoMarketV1AdapterV2; it is not a wrapper around MetaMorpho V1 or V1.1.Morpho Vault V2 returns zero from all ERC-4626 max functions.
MorphoVaultV2Markettherefore exposes the wrapper's full economic position throughmaxWithdrawandmaxRedeemso the ARM can account for and manage the position. These values are not liquidity guarantees: downstream liquidity, gates, caps, or pauses can still make a withdrawal revert.The wrapper documents the target's accounting assumptions, including the incompatibility with a future
MorphoVaultV1Adapterover MetaMorpho V1.1 and the need to monitor adapter changes while the ARM market is active.No mainnet deployment transaction has been broadcast yet.
Deployment
Script
script/deploy/mainnet/044_DeployUSDCMorphoMarketScript.s.solThe script:
ProxyandMorphoVaultV2Marketimplementation;Configuration
arm0x9E3A7026E5767F2d7Ff5e83b0ed011005f45a170market0x5dc53a23AdC9f2Bed98de6F59F7F309a7c71FF2Basset0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB480xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d8990x4FF1b9D9ba8558F5EAfCec096318eA0d8b541971merkleDistributor0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9AeThe target Vault V2 currently has one adapter,
0x6189aF51677419D81F334837075f7A1aE7c50db9, which holds direct USDC supply positions in three Morpho Blue markets backed by WBTC, cbBTC, and wstETH collateral at 86% LLTV. All four Vault V2 gates and both Vault V2 fees are currently disabled.Governance
No
GovernorSixproposal is required. The mainnet 5/8 multisig directly owns the USDC ARM and will perform the market registration after deployment.Required post-deployment actions (5/8 multisig)
USDC_ARM.addMarkets([MORPHO_MARKET_USDC_ARM]).The script intentionally does not call
setActiveMarket.Operational constraints
25,738,828, the Vault V2 had about 20.494 million USDC of total assets and 20.478 million USDC allocated under its 100% relative adapter cap, leaving only about 15,962 USDC of one-transaction headroom. The USDC ARM held about 82,164 idle USDC with a zero buffer, so activation under that configuration is expected to revert.maxWithdrawandmaxRedeemexpose the full economic position, not a revert-free liquidity bound. Operators must verify downstream liquidity before relying on immediate withdrawal.Tests
forge fmt --check— passed.git diff --check— passed.forge build— passed.forge test --match-contract Fork_PaxosARM_Smoke_Test --match-test 'test_morphoMarket.*' -vvv— 2/2 tests passed.