Opinionated bundle contracts wrapping Morpho protocols. Each bundle exposes a small set of high-level entry points that chain several protocol calls into a single transaction. Entry-points are user-facing: they should be usable out of the box and are not meant to be called by other contracts. Compared to bundler3, bundles are not modular, but are meant to reproduce its identified core functionalities with greater safety. Notably, there is no crafting of bundles offchain, instead the way calls are chained is fixed and this can be audited. Users are still expected to look at the inputs of the entry-points, to decide whether they want to sign it or not.
MidnightBundlesV1 contains:
midnightBundlesV1BuyWithUnitsTargetAndWithdrawCollateral— buy a target number of units across offers, then withdraw collateral.midnightBundlesV1BuyWithAssetsTargetAndWithdrawCollateral— buy a target loan-asset amount across offers, then withdraw collateral.midnightBundlesV1SupplyCollateralAndSellWithUnitsTarget— supply collateral, then sell a target number of units across offers.midnightBundlesV1SupplyCollateralAndSellWithAssetsTarget— supply collateral, then sell a target loan-asset amount across offers.midnightBundlesV1RepayAndWithdrawCollateral— repay debt and withdraw collateral.
BlueBundlesV1 contains:
blueBundlesV1SupplyCollateralAndBorrow— supply collateral and borrow.blueBundlesV1RepayAndWithdrawCollateral— repay debt (optionally by shares) and optionally withdraw collateral.blueBundlesV1Supply— supply loan assets to a market.blueBundlesV1Withdraw— withdraw supplied loan assets (optionally by shares).blueBundlesV1MigrateBorrowPosition— move a full borrow position (collateral and debt) from one market to another.
VaultBundlesV1 contains:
vaultBundlesV1Deposit— deposit assets into a vault.vaultBundlesV1Withdraw— withdraw assets from a vault.vaultBundlesV1Migrate— migrate assets from one vault to another.
VaultExitBundlesV1 contains:
vaultExitBundlesV1InKindRedemptionVaultV1— in-kind redeem from an illiquid Vault V1.vaultExitBundlesV1InKindRedemptionVaultV2— in-kind redeem from an illiquid Vault V2.vaultExitBundlesV1ForceWithdrawVaultV2— force withdraw from a liquid Vault V2.
Audits can be found in the audits folder.
Files in this repository are publicly available under license GPL-2.0-or-later, see LICENSE.