Skip to content

ERC4626EarnPool

Contract: ERC4626EarnPool.sol Implements: IEarnPool

Overview

ERC4626EarnPool is a generic adapter for any yield source that itself implements the ERC-4626 standard. In King's Vault Stage 1, this is used to connect to Morpho Steakhouse vaults.

Target Allocation: 20% of total ETH-side deployed capital (Stage 1 default).


Interface

Function Signature Description
deposit deposit(uint256 amount) Deposit USDC into the target ERC-4626 vault (vault.deposit()). Receives vault shares.
withdraw withdraw(uint256 amount) Redeem shares from the target ERC-4626 vault (vault.redeem()). Returns USDC.
valuesOf valuesOf() → uint256 Returns current USDC value: vault.convertToAssets(vault.balanceOf(this)).

External Dependencies

Contract Description
Morpho Steakhouse Vault ERC-4626 vault wrapping Morpho Blue lending positions

Security Considerations

  1. ERC-4626 Compliance: The target vault must be fully ERC-4626 compliant. Non-standard implementations may cause incorrect valuesOf() readings.
  2. Morpho Risk: Morpho Blue positions carry lending/borrowing risks. If borrowers default or the protocol has a vulnerability, deposited funds are at risk.
  3. Share Redemption: valuesOf() uses convertToAssets() for real-time valuation. This function's accuracy depends on the target vault updating its internal accounting correctly.
  4. Composability: Since the adapter uses standard ERC-4626 calls, it can be reused for any compliant vault in future stages (e.g., additional Morpho strategies, Yearn vaults, etc.).