The EventsLib library defines all events emitted by the Morpho Vault V2 system.
ERC20 events
Approval
event Approval(address indexed owner, address indexed spender, uint256 shares);
Emitted when an approval is set.
The address granting the approval
The address receiving the approval
The amount of shares approved
Transfer
event Transfer(address indexed from, address indexed to, uint256 shares);
Emitted when shares are transferred.
The address sending the shares
The address receiving the shares
The amount of shares transferred
AllowanceUpdatedByTransferFrom
event AllowanceUpdatedByTransferFrom(address indexed owner, address indexed spender, uint256 shares);
Emitted when the allowance is updated by transferFrom (not when it is updated by permit, approve, withdraw, or redeem because their respective events allow tracking the allowance).
The address whose allowance is updated
The address spending the allowance
Permit
event Permit(address indexed owner, address indexed spender, uint256 shares, uint256 nonce, uint256 deadline);
Emitted when a permit is executed.
The address granting the permit
The address receiving the permit
The amount of shares approved
The nonce used for the permit
The deadline for the permit
ERC4626 events
Deposit
event Deposit(address indexed sender, address indexed onBehalf, uint256 assets, uint256 shares);
Emitted when assets are deposited.
The address initiating the deposit
The address receiving the shares
The amount of assets deposited
The amount of shares minted
Withdraw
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed onBehalf,
uint256 assets,
uint256 shares
);
Emitted when assets are withdrawn.
The address initiating the withdrawal
The address receiving the assets
The address whose shares are burned
The amount of assets withdrawn
The amount of shares burned
Vault creation events
Constructor
event Constructor(address indexed owner, address indexed asset);
Emitted when the vault is created.
The initial owner of the vault
The asset token of the vault
Allocation events
Allocate
event Allocate(address indexed sender, address indexed adapter, uint256 assets, bytes32[] ids, int256 change);
Emitted when assets are allocated to an adapter.
The address initiating the allocation
The adapter receiving the allocation
The amount of assets allocated
The IDs affected by the allocation
Deallocate
event Deallocate(address indexed sender, address indexed adapter, uint256 assets, bytes32[] ids, int256 change);
Emitted when assets are deallocated from an adapter.
The address initiating the deallocation
The adapter being deallocated from
The amount of assets deallocated
The IDs affected by the deallocation
ForceDeallocate
event ForceDeallocate(
address indexed sender,
address adapter,
uint256 assets,
address indexed onBehalf,
bytes32[] ids,
uint256 penaltyAssets
);
Emitted when assets are force deallocated.
The address initiating the force deallocation
The adapter being force deallocated from
The amount of assets force deallocated
The address on whose behalf the force deallocation is performed
The IDs affected by the force deallocation
The amount of penalty assets charged
Fee and interest events
AccrueInterest
event AccrueInterest(
uint256 previousTotalAssets,
uint256 newTotalAssets,
uint256 performanceFeeShares,
uint256 managementFeeShares
);
Emitted when interest is accrued.
The total assets before accrual
The total assets after accrual
The shares minted as performance fee
The shares minted as management fee
Timelock events
Revoke
event Revoke(address indexed sender, bytes4 indexed selector, bytes data);
Emitted when a timelocked operation is revoked.
The address revoking the operation
The function selector of the revoked operation
The data of the revoked operation
Submit
event Submit(bytes4 indexed selector, bytes data, uint256 executableAt);
Emitted when a timelocked operation is submitted.
The function selector of the submitted operation
The data of the submitted operation
The timestamp when the operation becomes executable
Accept
event Accept(bytes4 indexed selector, bytes data);
Emitted when a timelocked operation is accepted and executed.
The function selector of the accepted operation
The data of the accepted operation
Configuration events
SetOwner
event SetOwner(address indexed newOwner);
Emitted when the owner is changed.
SetCurator
event SetCurator(address indexed newCurator);
Emitted when the curator is changed.
SetIsSentinel
event SetIsSentinel(address indexed account, bool newIsSentinel);
Emitted when an account’s sentinel status is changed.
The account whose sentinel status is changed
SetName
event SetName(string newName);
Emitted when the vault name is changed.
SetSymbol
event SetSymbol(string newSymbol);
Emitted when the vault symbol is changed.
SetIsAllocator
event SetIsAllocator(address indexed account, bool newIsAllocator);
Emitted when an account’s allocator status is changed.
The account whose allocator status is changed
SetReceiveSharesGate
event SetReceiveSharesGate(address indexed newReceiveSharesGate);
Emitted when the receive shares gate is changed.
The new receive shares gate address
SetSendSharesGate
event SetSendSharesGate(address indexed newSendSharesGate);
Emitted when the send shares gate is changed.
The new send shares gate address
SetReceiveAssetsGate
event SetReceiveAssetsGate(address indexed newReceiveAssetsGate);
Emitted when the receive assets gate is changed.
The new receive assets gate address
SetSendAssetsGate
event SetSendAssetsGate(address indexed newSendAssetsGate);
Emitted when the send assets gate is changed.
The new send assets gate address
SetAdapterRegistry
event SetAdapterRegistry(address indexed newAdapterRegistry);
Emitted when the adapter registry is changed.
The new adapter registry address
AddAdapter
event AddAdapter(address indexed account);
Emitted when an adapter is added.
The adapter address being added
RemoveAdapter
event RemoveAdapter(address indexed account);
Emitted when an adapter is removed.
The adapter address being removed
DecreaseTimelock
event DecreaseTimelock(bytes4 indexed selector, uint256 newDuration);
Emitted when a timelock duration is decreased.
The function selector whose timelock is decreased
The new timelock duration
IncreaseTimelock
event IncreaseTimelock(bytes4 indexed selector, uint256 newDuration);
Emitted when a timelock duration is increased.
The function selector whose timelock is increased
The new timelock duration
Abdicate
event Abdicate(bytes4 indexed selector);
Emitted when a function is abdicated (permanently disabled).
The function selector being abdicated
SetLiquidityAdapterAndData
event SetLiquidityAdapterAndData(
address indexed sender,
address indexed newLiquidityAdapter,
bytes indexed newLiquidityData
);
Emitted when the liquidity adapter and data are changed.
The address initiating the change
The new liquidity adapter address
event SetPerformanceFee(uint256 newPerformanceFee);
Emitted when the performance fee is changed.
event SetPerformanceFeeRecipient(address indexed newPerformanceFeeRecipient);
Emitted when the performance fee recipient is changed.
newPerformanceFeeRecipient
The new performance fee recipient address
SetManagementFee
event SetManagementFee(uint256 newManagementFee);
Emitted when the management fee is changed.
SetManagementFeeRecipient
event SetManagementFeeRecipient(address indexed newManagementFeeRecipient);
Emitted when the management fee recipient is changed.
newManagementFeeRecipient
The new management fee recipient address
DecreaseAbsoluteCap
event DecreaseAbsoluteCap(address indexed sender, bytes32 indexed id, bytes idData, uint256 newAbsoluteCap);
Emitted when an absolute cap is decreased.
The address initiating the decrease
The ID whose cap is decreased
The new absolute cap value
IncreaseAbsoluteCap
event IncreaseAbsoluteCap(bytes32 indexed id, bytes idData, uint256 newAbsoluteCap);
Emitted when an absolute cap is increased.
The ID whose cap is increased
The new absolute cap value
DecreaseRelativeCap
event DecreaseRelativeCap(address indexed sender, bytes32 indexed id, bytes idData, uint256 newRelativeCap);
Emitted when a relative cap is decreased.
The address initiating the decrease
The ID whose cap is decreased
The new relative cap value
IncreaseRelativeCap
event IncreaseRelativeCap(bytes32 indexed id, bytes idData, uint256 newRelativeCap);
Emitted when a relative cap is increased.
The ID whose cap is increased
The new relative cap value
SetMaxRate
event SetMaxRate(uint256 newMaxRate);
Emitted when the maximum rate is changed.
SetForceDeallocatePenalty
event SetForceDeallocatePenalty(address indexed adapter, uint256 forceDeallocatePenalty);
Emitted when the force deallocate penalty is changed.
The adapter whose penalty is changed
The new force deallocate penalty
Source code
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity ^0.8.0;
library EventsLib {
// ERC20 events
event Approval(address indexed owner, address indexed spender, uint256 shares);
event Transfer(address indexed from, address indexed to, uint256 shares);
/// @dev Emitted when the allowance is updated by transferFrom (not when it is updated by permit, approve, withdraw,
/// redeem because their respective events allow to track the allowance).
event AllowanceUpdatedByTransferFrom(address indexed owner, address indexed spender, uint256 shares);
event Permit(address indexed owner, address indexed spender, uint256 shares, uint256 nonce, uint256 deadline);
// ERC4626 events
event Deposit(address indexed sender, address indexed onBehalf, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender, address indexed receiver, address indexed onBehalf, uint256 assets, uint256 shares
);
// Vault creation events
event Constructor(address indexed owner, address indexed asset);
// Allocation events
event Allocate(address indexed sender, address indexed adapter, uint256 assets, bytes32[] ids, int256 change);
event Deallocate(address indexed sender, address indexed adapter, uint256 assets, bytes32[] ids, int256 change);
event ForceDeallocate(
address indexed sender,
address adapter,
uint256 assets,
address indexed onBehalf,
bytes32[] ids,
uint256 penaltyAssets
);
// Fee and interest events
event AccrueInterest(
uint256 previousTotalAssets, uint256 newTotalAssets, uint256 performanceFeeShares, uint256 managementFeeShares
);
// Timelock events
event Revoke(address indexed sender, bytes4 indexed selector, bytes data);
event Submit(bytes4 indexed selector, bytes data, uint256 executableAt);
event Accept(bytes4 indexed selector, bytes data);
// Configuration events
event SetOwner(address indexed newOwner);
event SetCurator(address indexed newCurator);
event SetIsSentinel(address indexed account, bool newIsSentinel);
event SetName(string newName);
event SetSymbol(string newSymbol);
event SetIsAllocator(address indexed account, bool newIsAllocator);
event SetReceiveSharesGate(address indexed newReceiveSharesGate);
event SetSendSharesGate(address indexed newSendSharesGate);
event SetReceiveAssetsGate(address indexed newReceiveAssetsGate);
event SetSendAssetsGate(address indexed newSendAssetsGate);
event SetAdapterRegistry(address indexed newAdapterRegistry);
event AddAdapter(address indexed account);
event RemoveAdapter(address indexed account);
event DecreaseTimelock(bytes4 indexed selector, uint256 newDuration);
event IncreaseTimelock(bytes4 indexed selector, uint256 newDuration);
event Abdicate(bytes4 indexed selector);
event SetLiquidityAdapterAndData(
address indexed sender, address indexed newLiquidityAdapter, bytes indexed newLiquidityData
);
event SetPerformanceFee(uint256 newPerformanceFee);
event SetPerformanceFeeRecipient(address indexed newPerformanceFeeRecipient);
event SetManagementFee(uint256 newManagementFee);
event SetManagementFeeRecipient(address indexed newManagementFeeRecipient);
event DecreaseAbsoluteCap(address indexed sender, bytes32 indexed id, bytes idData, uint256 newAbsoluteCap);
event IncreaseAbsoluteCap(bytes32 indexed id, bytes idData, uint256 newAbsoluteCap);
event DecreaseRelativeCap(address indexed sender, bytes32 indexed id, bytes idData, uint256 newRelativeCap);
event IncreaseRelativeCap(bytes32 indexed id, bytes idData, uint256 newRelativeCap);
event SetMaxRate(uint256 newMaxRate);
event SetForceDeallocatePenalty(address indexed adapter, uint256 forceDeallocatePenalty);
}