Documentation Index
Fetch the complete documentation index at: https://mintlify.com/morpho-org/vault-v2/llms.txt
Use this file to discover all available pages before exploring further.
The ErrorsLib library defines all custom errors used throughout the Morpho Vault V2 system for gas-efficient error handling.
Errors
Abdicated
Thrown when attempting to use a function that has been abdicated (permanently disabled).
AbsoluteCapExceeded
error AbsoluteCapExceeded();
Thrown when an operation would exceed the absolute cap limit.
AbsoluteCapNotDecreasing
error AbsoluteCapNotDecreasing();
Thrown when attempting to decrease an absolute cap to a value that is not lower than the current cap.
AbsoluteCapNotIncreasing
error AbsoluteCapNotIncreasing();
Thrown when attempting to increase an absolute cap to a value that is not higher than the current cap.
ApproveReturnedFalse
error ApproveReturnedFalse();
Thrown when an ERC20 approve call returns false.
ApproveReverted
Thrown when an ERC20 approve call reverts.
AutomaticallyTimelocked
error AutomaticallyTimelocked();
Thrown when attempting to execute a function that requires timelock submission first.
CannotReceiveShares
error CannotReceiveShares();
Thrown when a recipient is not allowed to receive shares based on the receive shares gate.
CannotReceiveAssets
error CannotReceiveAssets();
Thrown when a recipient is not allowed to receive assets based on the receive assets gate.
CannotSendShares
error CannotSendShares();
Thrown when a sender is not allowed to send shares based on the send shares gate.
CannotSendAssets
error CannotSendAssets();
Thrown when a sender is not allowed to send assets based on the send assets gate.
CapExceeded
Thrown when a general cap limit is exceeded.
CastOverflow
Thrown when a type cast would result in overflow.
DataAlreadyPending
error DataAlreadyPending();
Thrown when attempting to submit timelocked data that is already pending.
DataNotTimelocked
error DataNotTimelocked();
Thrown when attempting to execute data that has not been submitted to the timelock.
FeeInvariantBroken
error FeeInvariantBroken();
Thrown when the fee invariant is violated.
FeeTooHigh
Thrown when a fee exceeds the maximum allowed value.
InvalidSigner
Thrown when a signature verification fails due to an invalid signer.
MaxRateTooHigh
Thrown when attempting to set a maximum rate that exceeds the allowed limit.
NoCode
Thrown when an expected contract address has no code deployed.
NotAdapter
Thrown when an address is not a registered adapter.
NotInAdapterRegistry
error NotInAdapterRegistry();
Thrown when an adapter is not found in the adapter registry.
PenaltyTooHigh
Thrown when a penalty exceeds the maximum allowed value.
PermitDeadlineExpired
error PermitDeadlineExpired();
Thrown when a permit signature has expired.
RelativeCapAboveOne
error RelativeCapAboveOne();
Thrown when attempting to set a relative cap above 100% (1e18).
RelativeCapExceeded
error RelativeCapExceeded();
Thrown when an operation would exceed the relative cap limit.
RelativeCapNotDecreasing
error RelativeCapNotDecreasing();
Thrown when attempting to decrease a relative cap to a value that is not lower than the current cap.
RelativeCapNotIncreasing
error RelativeCapNotIncreasing();
Thrown when attempting to increase a relative cap to a value that is not higher than the current cap.
TimelockNotDecreasing
error TimelockNotDecreasing();
Thrown when attempting to decrease a timelock to a value that is not lower than the current duration.
TimelockNotExpired
error TimelockNotExpired();
Thrown when attempting to execute timelocked data before the timelock period has expired.
TimelockNotIncreasing
error TimelockNotIncreasing();
Thrown when attempting to increase a timelock to a value that is not higher than the current duration.
TransferFromReturnedFalse
error TransferFromReturnedFalse();
Thrown when an ERC20 transferFrom call returns false.
TransferFromReverted
error TransferFromReverted();
Thrown when an ERC20 transferFrom call reverts.
TransferReturnedFalse
error TransferReturnedFalse();
Thrown when an ERC20 transfer call returns false.
TransferReverted
error TransferReverted();
Thrown when an ERC20 transfer call reverts.
Unauthorized
Thrown when a caller does not have the required authorization.
ZeroAbsoluteCap
Thrown when attempting to set an absolute cap to zero.
ZeroAddress
Thrown when a zero address is provided where a valid address is required.
ZeroAllocation
Thrown when attempting an allocation with zero amount.
Source code
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity ^0.8.0;
library ErrorsLib {
error Abdicated();
error AbsoluteCapExceeded();
error AbsoluteCapNotDecreasing();
error AbsoluteCapNotIncreasing();
error ApproveReturnedFalse();
error ApproveReverted();
error AutomaticallyTimelocked();
error CannotReceiveShares();
error CannotReceiveAssets();
error CannotSendShares();
error CannotSendAssets();
error CapExceeded();
error CastOverflow();
error DataAlreadyPending();
error DataNotTimelocked();
error FeeInvariantBroken();
error FeeTooHigh();
error InvalidSigner();
error MaxRateTooHigh();
error NoCode();
error NotAdapter();
error NotInAdapterRegistry();
error PenaltyTooHigh();
error PermitDeadlineExpired();
error RelativeCapAboveOne();
error RelativeCapExceeded();
error RelativeCapNotDecreasing();
error RelativeCapNotIncreasing();
error TimelockNotDecreasing();
error TimelockNotExpired();
error TimelockNotIncreasing();
error TransferFromReturnedFalse();
error TransferFromReverted();
error TransferReturnedFalse();
error TransferReverted();
error Unauthorized();
error ZeroAbsoluteCap();
error ZeroAddress();
error ZeroAllocation();
}