Skip to content

feat: auto-mint ERC-4626 vault shares as collateral #413

@starksama

Description

@starksama

Summary

For markets where collateral is an ERC-4626 vault token, allow users to deposit the underlying asset and auto-mint vault shares in one flow — instead of manually minting shares first, then supplying as collateral.

Example

Market: vault-USDC (collateral) / USDC (loan)

  • User has USDC
  • Monarch auto-deposits USDC into the vault, mints shares, then supplies shares as collateral
  • No need to interact with the vault contract separately

Requirements

  • Detect markets where collateral is an ERC-4626 vault
  • Resolve the vault's underlying asset
  • Allow input in underlying asset terms (e.g. USDC) instead of vault shares
  • Bundle: deposit underlying → mint shares → supply as collateral (via Morpho bundler)
  • Works standalone and combined with leverage looping (feat: leverage looping for borrowers #354)

Context

User request from institutional user — manual minting + approval flow is especially painful with multisig wallets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Do this quarter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions