Errors
Smart Contract Errors
Atomic Transation
AtomicTransaction_SlippageErrorDescription: This error is triggered if the bought amount of tokens during a swap operation is less than the expected amount, indicating that the slippage tolerance was exceeded.
Use Case: Typically occurs during the
splitAndSwapfunction when the price movement is unfavorable beyond the allowed limit.
AtomicTransaction_SwapErrorDescription: Indicates a generic failure during the swap operation.
Use Case: Although this error isn't explicitly used in the provided code, it could be a placeholder for more specific swap-related errors.
AtomicTransaction_InvalidBalanceDescription: This error occurs when the user's approved balance for the contract is insufficient to cover the specified operation, such as a deposit.
Use Case: Raised in the
depositfunction if the allowance of the underlying token is less than the amount the user intends to deposit.
AtomicTransaction_InvalidParamsDescription: Triggered when one or more input parameters for a function are invalid. This could mean that an address is zero, or an expected amount is set to zero.
Use Case: Encountered in the
splitAndSwapfunction if any of the required parameters (likeexpectedAmount,depositAmount,sellAmount, orsellToken) are zero or improperly set.
AtomicTransaction_BalancerErrorDescription: Raised when there is an issue related to the Balancer pool, such as when the sell or buy tokens are not bound to the specified pool.
Use Case: Occurs in the
splitAndSwapfunction if the provided Balancer pool does not support the specified tokens.
AtomicTransaction_ExpiryReachedDescription: This error is triggered when the operation is attempted after the expiry date has passed.
Use Case: Used in the
expiryDateCheckmodifier to ensure that time-sensitive operations are not executed after the allowed period.
FlashLoans
FlashLoan__InsufficientUnderlyingDescription: This error is triggered when the flash loan operation cannot proceed due to insufficient underlying assets in the pool.
Use Case: Raised in the
flashLoanfunction when the pool does not have enough assets to lend to the borrower.
FlashLoan__FailedExecOpsDescription: This error occurs when the receiver contract fails to execute the flash loan operation (i.e., the
executeOperationcall returns false).Use Case: Raised during the execution of the flash loan after transferring assets to the receiver contract, indicating the receiver failed to fulfill the expected operations.
FlashLoan__FailedRepaymentsDescription: Indicates that the borrower failed to repay the flash loan, along with any applicable premiums, back to the contract.
Use Case: Raised after the borrower receives the loan and fails to return the loan amount plus any premiums, preventing the contract from completing the flash loan process.
FlashLoan__InvalidReceiverDescription: Raised when the receiver address for the flash loan is invalid (i.e., it is a zero address).
Use Case: Encountered in the
flashLoanfunction if an invalid receiver address is passed as a parameter
Misc
BaseContract Errors
BaseContract__SanctionedAddressDescription: Raised when an address attempting to interact with the contract is found on a sanctions list.
Use Case: Occurs during any operation protected by the
onlyNotSanctionedmodifier, which checks whether an address is sanctioned before allowing the operation.
BaseContract__DepositCircuitBreakerDescription: Triggered when a deposit attempt is made while the deposit circuit breaker is activated, which halts deposits during emergency situations.
Use Case: Raised in the
stopDepositmodifier to prevent deposits if the circuit breaker is active.
BaseContract__WithdrawCircuitBreakerDescription: This error is triggered when a withdrawal attempt is made while the withdrawal circuit breaker is active.
Use Case: Occurs in the
stopWithdrawmodifier when withdrawal operations are halted during emergencies.
BaseContract__TransferCircuitBreakerDescription: Triggered when a transfer attempt is made while the transfer circuit breaker is active.
Use Case: Raised in the
stopTransfermodifier, halting transfers during emergencies.
BaseContract__RebalanceCircuitBreakerDescription: Raised when an attempt is made to perform a rebalance while the rebalance circuit breaker is active.
Use Case: Raised in the
stopRebalancemodifier when rebalancing is halted due to an emergency.
BaseContract__FlashLoanCircuitBreakerDescription: Triggered when a flash loan operation is attempted while the flash loan circuit breaker is active.
Use Case: Encountered when the
stopFlashLoanmodifier is used to prevent flash loan operations during emergencies.
SMART Token
SmartToken__NotTokenFactoryDescription: Raised when an unauthorized contract (i.e., not the TokenFactory) attempts to interact with the SmartToken contract.
Use Case: Raised in the
onlyTokenFactorymodifier to ensure only the TokenFactory contract can call certain functions.
SmartToken__MethodNotAllowedDescription: Raised when an invalid or restricted method is called in a situation where it is not allowed, such as handling non-native tokens with certain operations.
Use Case: Encountered when restricted operations are attempted in the contract, such as draining non-native tokens.
SmartToken__DepositMoreThanMaxDescription: Raised when a deposit exceeds the allowed limit.
Use Case: Raised in functions handling deposits if the amount exceeds the maximum allowed for the user.
SmartToken__MintMoreThanMaxDescription: Raised when an attempt is made to mint more than the maximum allowed tokens.
Use Case: Raised in the
mintfunction if the minting amount exceeds the allowed limit for the user.
SmartToken__WithdrawMoreThanMaxDescription: Raised when a withdrawal attempt exceeds the allowed limit.
Use Case: Occurs in the
withdrawfunction if the amount being withdrawn is more than the allowed maximum for the user.
SmartToken__RedeemMoreThanMaxDescription: Raised when a redemption attempt exceeds the maximum limit allowed for the user.
Use Case: Occurs when attempting to redeem more tokens than allowed in the
redeemfunction.
SmartToken__OnlyAssetOwnerDescription: Raised when a function is called by an address that is not the owner of the asset.
Use Case: Triggered by the
onlyAssetOwnermodifier to ensure only the token holder can perform specific actions.
SmartToken__ZeroDepositDescription: Raised when a deposit attempt is made with zero tokens, which is not allowed.
Use Case: Encountered in deposit functions if the user tries to deposit an amount of zero tokens.
SmartToken__InsufficientUnderlyingDescription: Raised when there are insufficient underlying assets in the TokenFactory contract to proceed with the requested action.
Use Case: Occurs when there are not enough assets to meet the user's request, often during withdrawals.
SmartToken__DepositLimitHitDescription: Triggered when a user hits the periodic deposit limit, preventing further deposits.
Use Case: Encountered in functions that involve depositing tokens if the user reaches their deposit limit.
SmartToken__WithdrawLimitHitDescription: Raised when a user hits the periodic withdrawal limit, preventing further withdrawals.
Use Case: Occurs in functions handling withdrawals if the user exceeds the allowed withdrawal amount.
SmartToken__ExpiryDateReachedDescription: Triggered when an operation is attempted after the expiry date has passed.
Use Case: Raised in functions with expiry checks when the current time exceeds the specified expiry date.
SmartToken__WithdrawNativeFailedDescription: Raised when a native token withdrawal fails.
Use Case: Occurs when attempting to withdraw native tokens (e.g., ETH) and the operation fails
Token Factory
TokenFactory__MethodNotAllowedDescription: Raised when a function is called by an unauthorized address or when the function is not permitted to be executed in the current context.
Use Case: Commonly encountered in functions guarded by the
onlySmartTokens,onlyOrchestrator, or similar modifiers to ensure that only specific entities can invoke them.
TokenFactory__InvalidDivisionDescription: Indicates an attempt to perform an invalid division operation, such as dividing by zero or when an invalid time period is encountered.
Use Case: Typically raised during management fee calculations or other scenarios where division operations are critical.
TokenFactory__InvalidRebalanceParamsDescription: Triggered when the parameters provided for a rebalance operation are invalid or do not meet the expected conditions.
Use Case: Encountered during the execution of the
rebalancefunction if the provided smart token prices or underlying values do not align with expectations.
TokenFactory__InvalidSequenceNumberDescription: Raised when the sequence number provided for a rebalance operation is either out of order or has already been applied.
Use Case: Occurs in the
executeRebalancefunction when the sequence number is checked against the expected next sequence number.
TokenFactory__InvalidNaturalRebalanceDescription: Indicates that a natural rebalance was attempted before the scheduled interval has passed.
Use Case: Raised when the
executeRebalancefunction detects that the current timestamp is earlier than the expected time for a natural rebalance.
TokenFactory__AlreadyInitializedDescription: Triggered when an attempt is made to initialize the contract or a component of the contract that has already been initialized.
Use Case: Encountered during the
initializeSMARTfunction to prevent multiple initializations of the smart tokens.
TokenFactory__InvalidSignatureDescription: Raised when the signature provided for a rebalance operation does not match any of the authorized signers.
Use Case: Occurs in the
verifyAndDecodefunction when verifying the authenticity of a rebalance request.
TokenFactory__InvalidSignatureLengthDescription: Indicates that the length of the provided signature is invalid.
Use Case: Typically used in the context of signature verification where the length of the provided data does not match expected values.
TokenFactory__InvalidManagementFeesDescription: Raised when an invalid management fee rate is provided, typically if it exceeds allowable limits.
Use Case: Encountered during the
setManagementFeeRatefunction when setting a new management fee rate.
TokenFactory__SmartTokenArrayOutOfBoundsDescription: Triggered when an attempt is made to access a smart token that does not exist in the array.
Use Case: Typically encountered when interacting with the
smartTokenArrayand accessing an invalid index.
TokenFactory__NoPremiumsToDrainDescription: Raised when an attempt is made to drain flashloan premiums, but no premiums are available to drain.
Use Case: Encountered in the
drainFlashloanPremiumsfunction when there are no collected premiums to distribute
Orchestrator
Orchestrator_FailedOperationDescription: Triggered when an operation executed by the
Orchestratorcontract fails. This generally occurs when a call to a destination address within an operation does not return the expected result.Use Case: This error is raised during the
rebalancefunction if one of the downstream operations fails to execute successfully.
Orchestrator_Index_Out_BoundsDescription: Raised when an index provided as an argument to a function is outside the valid range of the array being accessed.
Use Case: This error is encountered when performing operations like adding, removing, or enabling/disabling an operation or balancer pool at an invalid index.
Orchestrator_Wrong_Dest_AddrDescription: Indicates that the destination address provided to modify the status of an operation does not match the expected address for that index.
Use Case: This error is raised in the
setOperationEnabledfunction when the provided destination address does not match the destination address stored at the specified index in the operations array.
Last updated
