Quantillon Protocol

IMockMorphoVault

Git Source

Functions

depositUnderlying

Deposits underlying assets into the mock Morpho vault.

Test-only vault interface used by the adapter in localhost simulations.

Notes:

  • security: External dependency call; trust model is environment-specific.

  • validation: Reverts on invalid amount or vault-side checks.

  • state-changes: Updates vault share/asset accounting.

  • events: Vault implementation may emit deposit events.

  • errors: Reverts on vault-side failures.

  • reentrancy: Interface declaration only.

  • access: Access control defined by vault implementation.

  • oracle: No oracle dependencies.

function depositUnderlying(uint256 assets, address onBehalfOf) external returns (uint256 shares);

Parameters

NameTypeDescription
assetsuint256Amount of USDC to deposit.
onBehalfOfaddressAccount credited with vault shares.

Returns

NameTypeDescription
sharesuint256Vault shares minted for the deposit.

withdrawUnderlying

Withdraws underlying assets from the mock Morpho vault.

Test-only vault interface used by the adapter in localhost simulations.

Notes:

  • security: External dependency call; trust model is environment-specific.

  • validation: Reverts on insufficient balance or vault-side checks.

  • state-changes: Updates vault share/asset accounting.

  • events: Vault implementation may emit withdrawal events.

  • errors: Reverts on vault-side failures.

  • reentrancy: Interface declaration only.

  • access: Access control defined by vault implementation.

  • oracle: No oracle dependencies.

function withdrawUnderlying(uint256 assets, address to) external returns (uint256 withdrawn);

Parameters

NameTypeDescription
assetsuint256Amount of USDC requested.
toaddressRecipient of withdrawn USDC.

Returns

NameTypeDescription
withdrawnuint256Actual USDC withdrawn.

totalUnderlyingOf

Returns underlying assets held for an account.

Read helper used by the adapter for principal/yield accounting.

Notes:

  • security: Read-only helper.

  • validation: No input validation required at interface level.

  • state-changes: No state changes.

  • events: No events emitted.

  • errors: May revert if implementation cannot service read.

  • reentrancy: Not applicable for view function.

  • access: Public view at implementation level.

  • oracle: No oracle dependencies.

function totalUnderlyingOf(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressAccount to query.

Returns

NameTypeDescription
<none>uint256Underlying USDC-equivalent amount for account.