On this page

Morpho V1 Vaults

Supply USDC to the Steakhouse V1 fork vault, account for 18-decimal shares and handle redemption or direct share withdrawal.

Set up the Steakhouse V1 fork#

The Morpho route uses the Steakhouse USDC MetaMorpho V1 vault and a MorphoV1SteakhouseAdapter deployed for Queue chain 31350. The constructor checks that chain and the vault's identity. Allocation queues and Morpho Blue stay under the external protocol's control.

Set FUYU_QUEUE_MORPHO_V1=1 when preparing a fresh authorized Linux fork fixture; the default bootstrap leaves the pair off. This adapter supports that V1 vault and underlying. Add another vault, V2 deployment or network through a separate route review or the ERC-4626 manifest workflow.

Pending, Active and Settled notes
Pending, Active and Settled notes

Check the vault, factory and core#

At the quote block, the runtime validator checks code hashes, factory registration, asset(), MORPHO() and decimals(). The adapter constructor checks vault and factory hashes, isMetaMorpho(vault), the Morpho core and eighteen-decimal shares. Compare these values with the fixture rather than identifying the vault by its display label.

The same vault code can have different queues, caps, allocations and available liquidity over time. Check capacity at the quote block and again before execution. Show the vault name and share balance in the app, with an underlying estimate that reflects its accounting and redemption availability.

ContractEthereum address in the fixture
Steakhouse USDC V10xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB
MetaMorpho factory0xA9c3D3a366466Fa809d1Ae982Fb2c46E5fC41101
Morpho Blue0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb
USDC underlying0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

Keep USDC units and share units separate#

morpho-usdc-supply uses operation 0 to turn USDC into steakUSDC shares. morpho-usdc-redeem uses operation 1 for the reverse. Supply takes six-decimal input and an eighteen-decimal output floor; redemption reverses those units. Keep amounts as integers and read display decimals from the token configuration.

Store the share count as the private balance. Use previewRedeem for a separately labeled approximate USDC value. For example, parseUnits('10', 6) is 10 USDC, while parseUnits('10', 18) is 10 steakUSDC shares. They are different positions, even if the UI displays the same number.

typescript
// Read-only historical quote; ethers v5.
const vault = new ethers.Contract(
  '0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB',
  [
    'function asset() view returns (address)',
    'function MORPHO() view returns (address)',
    'function decimals() view returns (uint8)',
    'function previewDeposit(uint256) view returns (uint256)',
    'function previewRedeem(uint256) view returns (uint256)',
  ], provider,
);
const usdcInput = ethers.utils.parseUnits('10', 6);
const shareQuote = await vault.previewDeposit(usdcInput, { blockTag: 26038058 });
console.log(ethers.utils.formatUnits(shareQuote, 18));
// This preview is not complete Pool execution or a capacity guarantee.

Simulate the share amount you want to redeem#

maxRedeem(Pool) can round below a share count that a redemption would accept. The Morpho quote path therefore simulates redeem for the requested shares at the quote block. Use that result instead of deriving a quote from an approximate displayed balance.

The simulation skips the adapter's share transfer and other Pool checks. Estimate the complete transaction afterwards, including its gas requirements and settlement. The browser and relay recheck route identity and output at the head; the callback still compares actual USDC received with the proof's positive minimum.

Register supply and redeem#

Admit USDC and steakUSDC, then register the two adapter/operation/input/output tuples. The Pool stores the adapter runtime hash. The proof commits to the route, input, minimum, deadline and settlement owner. Calls use zero actionData and must come from the adapter's Pool.

On supply, the adapter pulls USDC and sends vault shares to the Pool. On redeem, it pulls shares and sends USDC there. The supply allowance is cleared after use. Stage 1 reserves the result; finalization and a private scan recover the spendable note. One-transaction and two-stage submission expose the same external venue calls.

Withdraw shares when the redeem route is unavailable#

A screened withdrawal can send steakUSDC to a permitted EOA if the redeem queue closes, liquidity runs out or governance revokes the action. The recipient gets shares and manages redemption through Morpho. Offer this as a share withdrawal with the correct token label.

The fork test revoked the redeem route and closed a queue, then transferred the shares successfully. That checks the transfer fallback in the fixture. Before offering the same fallback elsewhere, check asset admission and recipient rules; the recipient may still have to wait for underlying liquidity.

Find the failed check#

InvalidDeployment can mean chain ID differs from 31350, a code hash changed, factory registration is missing or a constructor link is wrong. Quote failures can come from cash or allocation constraints instead. InsufficientOutput reverts without spending the input note. If submission status is uncertain, check receipts before using those notes again.

Keep queue-morpho-v1.cjs, the adapter artifact, block/hash and route registrations with your Linux test results. For another vault, create a separate manifest and test supply, redeem, share withdrawal and account recovery. Changing the existing constructor checks would change which vault this adapter supports.